diff --git a/bin/java-petstore-all.sh b/bin/java-petstore-all.sh index 4abe8e6c303..effca1a0bde 100755 --- a/bin/java-petstore-all.sh +++ b/bin/java-petstore-all.sh @@ -1,19 +1,5 @@ #!/bin/sh # update java petstore for all supported http libraries -./bin/java-petstore-jersey1.sh -./bin/java-petstore-jersey2.sh -./bin/java-petstore-feign.sh -./bin/java-petstore-okhttp-gson.sh -./bin/java-petstore-okhttp-gson-parcelable.sh -./bin/java-petstore-retrofit.sh -./bin/java-petstore-retrofit2.sh -./bin/java-petstore-retrofit2rx.sh -./bin/java-petstore-retrofit2rx2.sh -./bin/java8-petstore-jersey2.sh -./bin/java-petstore-retrofit2-play24.sh -./bin/java-petstore-jersey2-java6.sh -./bin/java-petstore-resttemplate.sh -./bin/java-petstore-resttemplate-withxml.sh -./bin/java-petstore-resteasy.sh -./bin/java-petstore-google-api-client.sh +./bin/java-petstore-server-all.sh +./bin/java-petstore-client-all.sh diff --git a/bin/java-petstore-client-all.sh b/bin/java-petstore-client-all.sh new file mode 100644 index 00000000000..1b11da50391 --- /dev/null +++ b/bin/java-petstore-client-all.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# update java petstore for all supported http client libraries + +./bin/java-petstore-jersey1.sh +./bin/java-petstore-jersey2.sh +./bin/java-petstore-feign.sh +./bin/java-petstore-okhttp-gson.sh +./bin/java-petstore-okhttp-gson-parcelable.sh +./bin/java-petstore-retrofit.sh +./bin/java-petstore-retrofit2.sh +./bin/java-petstore-retrofit2rx.sh +./bin/java-petstore-retrofit2rx2.sh +./bin/java8-petstore-jersey2.sh +./bin/java-petstore-retrofit2-play24.sh +./bin/java-petstore-retrofit2-play25.sh +./bin/java-petstore-jersey2-java6.sh +./bin/java-petstore-resttemplate.sh +./bin/java-petstore-resttemplate-withxml.sh +./bin/java-petstore-resteasy.sh +./bin/java-petstore-google-api-client.sh +./bin/java-petstore-vertx.sh diff --git a/bin/java-petstore-server-all.sh b/bin/java-petstore-server-all.sh new file mode 100644 index 00000000000..1185221c560 --- /dev/null +++ b/bin/java-petstore-server-all.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# update java petstore for all supported http server libraries + +./bin/java-inflector-petstore-server.sh +./bin/java-msf4j-petstore-server.sh +./bin/java-play-framework-petstore-server-all.sh +./bin/java-undertow-petstore-server.sh +./bin/java-vertx-async-petstore-server.sh +./bin/java-vertx-rx-petstore-server.sh +./bin/jaxrs-cxf-cdi-petstore-server.sh +./bin/jaxrs-cxf-petstore-server.sh +./bin/jaxrs-cxf-petstore-server-annotated-base-path.sh +./bin/jaxrs-cxf-petstore-server-non-spring-application.sh +./bin/jaxrs-jersey1-petstore-server.sh +./bin/jaxrs-jersey1-usetags-petstore-server.sh +./bin/jaxrs-petstore-server.sh +./bin/jaxrs-resteasy-eap-java8-petstore-server.sh +./bin/jaxrs-resteasy-eap-joda-petstore-server.sh +./bin/jaxrs-resteasy-eap-petstore-server.sh +./bin/jaxrs-resteasy-joda-petstore-server.sh +./bin/jaxrs-resteasy-petstore-server.sh +./bin/jaxrs-spec-petstore-server.sh +./bin/jaxrs-spec-petstore-server-interface.sh +./bin/jaxrs-usetags-petstore-server.sh +./bin/spring-mvc-petstore-j8-async-server.sh +./bin/spring-mvc-petstore-server.sh +./bin/springboot-petstore-server.sh +./bin/springboot-petstore-server-beanvalidation.sh +./bin/springboot-petstore-server-implicitHeaders.sh +./bin/springboot-petstore-server-useOptional.sh diff --git a/bin/utils/maven/java-petstore-client-all-build.sh b/bin/utils/maven/java-petstore-client-all-build.sh new file mode 100644 index 00000000000..02a23e6e021 --- /dev/null +++ b/bin/utils/maven/java-petstore-client-all-build.sh @@ -0,0 +1,49 @@ +#!/bin/sh +# build client projects generated by java-petstore-client-all.sh +# run it from swagger-codegen base directory + +red=`tput setaf 1` +green=`tput setaf 2` +reset_clr=`tput sgr0` + +declare -a projects=( \ + feign \ + google-api-client \ + jersey1 \ + jersey2 \ + jersey2-java6 \ + jersey2-java8 \ + okhttp-gson \ + okhttp-gson-parcelableModel \ + resteasy \ + resttemplate \ + resttemplate-withXml \ + retrofit \ + retrofit2 \ + retrofit2-play24 \ + retrofit2-play25 \ + retrofit2rx \ + retrofit2rx2 \ + vertx \ +) + +echo Build java petstore client projects.. + +base_dir=`pwd` + +for i in "${projects[@]}" +do + proj_dir=$base_dir/samples/client/petstore/java/$i + if [ -d "$proj_dir" ]; then + cd $proj_dir + mvn package > ./build.log + if [ $? = 0 ]; then + echo " $i - ${green}SUCCEED${reset_clr}" + else + echo " $i - ${red}FAILED${reset_clr}" + fi + mvn clean &>/dev/null + else + echo ${red}project not found:${reset_clr} $proj_dir + fi +done diff --git a/bin/utils/maven/java-petstore-server-all-build.sh b/bin/utils/maven/java-petstore-server-all-build.sh new file mode 100644 index 00000000000..64a8f08577d --- /dev/null +++ b/bin/utils/maven/java-petstore-server-all-build.sh @@ -0,0 +1,49 @@ +#!/bin/sh +# build server projects generated by java-petstore-server-all.sh +# run it from swagger-codegen base directory + +red=`tput setaf 1` +green=`tput setaf 2` +reset_clr=`tput sgr0` + +declare -a projects=( \ + java-inflector \ + java-msf4j \ + java-vertx/async java-vertx/rx \ + jaxrs/jersey1 jaxrs/jersey1-useTags jaxrs/jersey2 jaxrs/jersey2-useTags \ + jaxrs-cxf \ + jaxrs-cxf-annotated-base-path \ + jaxrs-cxf-cdi \ + jaxrs-cxf-non-spring-app \ + jaxrs-resteasy/eap jaxrs-resteasy/eap-java8 jaxrs-resteasy/eap-joda jaxrs-resteasy/joda jaxrs-resteasy/default \ + jaxrs-spec \ + jaxrs-spec-interface \ + spring-mvc \ + spring-mvc-j8-async \ + springboot \ + springboot-beanvalidation \ + springboot-implicitHeaders \ + springboot-useoptional \ + undertow \ +) + +echo Build java petstore server projects.. + +base_dir=`pwd` + +for i in "${projects[@]}" +do + proj_dir=$base_dir/samples/server/petstore/$i + if [ -d "$proj_dir" ]; then + cd $proj_dir + mvn package > ./build.log + if [ $? = 0 ]; then + echo " $i - ${green}SUCCEED${reset_clr}" + else + echo " $i - ${red}FAILED${reset_clr}" + fi + mvn clean &>/dev/null + else + echo ${red}project not found:${reset_clr} $proj_dir + fi +done diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConfig.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConfig.java index bd44d7a3979..153861043fe 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConfig.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConfig.java @@ -113,6 +113,8 @@ public interface CodegenConfig { Map modelTestTemplateFiles(); + Map modelTestResourceTemplateFiles(); + Map apiDocTemplateFiles(); Map modelDocTemplateFiles(); @@ -135,6 +137,8 @@ public interface CodegenConfig { String toApiTestFilename(String name); + String toModelTestResourceFilename(String name); + String toModelTestFilename(String name); String toApiDocFilename(String name); diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConstants.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConstants.java index 379102f417a..616f7db2c5d 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConstants.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenConstants.java @@ -4,6 +4,9 @@ * A class for storing constants that are used throughout the project. */ public class CodegenConstants { + public static final String TEMPLATE_EXTENSION = "mustache"; + public static final String DOT_TEMPLATE_EXTENSION = "." + TEMPLATE_EXTENSION; + public static final String APIS = "apis"; public static final String MODELS = "models"; public static final String SUPPORTING_FILES = "supportingFiles"; diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java index 2593f85c3ba..5a93c31c17a 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java @@ -80,6 +80,7 @@ public class DefaultCodegen { protected Map modelTemplateFiles = new HashMap(); protected Map apiTestTemplateFiles = new HashMap(); protected Map modelTestTemplateFiles = new HashMap(); + protected Map modelTestResourceTemplateFiles = new HashMap(); protected Map apiDocTemplateFiles = new HashMap(); protected Map modelDocTemplateFiles = new HashMap(); protected Map reservedWordsMappings = new HashMap(); @@ -499,6 +500,10 @@ public Map modelTestTemplateFiles() { return modelTestTemplateFiles; } + public Map modelTestResourceTemplateFiles() { + return modelTestResourceTemplateFiles; + } + public Map apiTemplateFiles() { return apiTemplateFiles; } @@ -665,6 +670,13 @@ public String toModelTestFilename(String name) { return initialCaps(name) + "Test"; } + /** + * Return the name of static resource for model test + */ + public String toModelTestResourceFilename(String name) { + return name; + } + /** * Return the capitalized file name of the model documentation * diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java index bba4e9f0511..9f550154037 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java @@ -1,6 +1,7 @@ package io.swagger.codegen; import com.samskivert.mustache.Mustache; +import com.samskivert.mustache.MustacheException; import com.samskivert.mustache.Template; import io.swagger.codegen.ignore.CodegenIgnoreProcessor; import io.swagger.codegen.languages.AbstractJavaCodegen; @@ -19,6 +20,7 @@ import java.io.*; import java.util.*; +import java.util.regex.Matcher; public class DefaultGenerator extends AbstractGenerator implements Generator { protected final Logger LOGGER = LoggerFactory.getLogger(DefaultGenerator.class); @@ -257,6 +259,28 @@ private void generateModelTests(List files, Map models, St } } + /** + * Add resource files (either java or any other type) for test model. + */ + private void generateModelTestsResourceFiles(List files) { + Map templates = config.modelTestResourceTemplateFiles(); + if (templates != null && !templates.isEmpty()) { + Map properties = new HashMap<>(config.additionalProperties()); + properties.put("package", config.modelPackage()); + for (String templateName : templates.keySet()) { + String suffix = templates.get(templateName); + String templateFile = getFullTemplateFile(config, templateName); + String outputFileName = config.modelTestFileFolder() + File.separator + config.toModelTestResourceFilename(templateName) + suffix; + outputFileName = outputFileName.replaceAll("[/|\\\\]", Matcher.quoteReplacement(File.separator)); + try { + processTemplateResourceFile(files, properties, templateFile , outputFileName); + } catch (Exception e) { + LOGGER.error("Could not generate model test resource file: '" + templateName + "'", e); + } + } + } + } + private void generateModelDocumentation(List files, Map models, String modelName) throws IOException { for (String templateName : config.modelDocTemplateFiles().keySet()) { String suffix = config.modelDocTemplateFiles().get(templateName); @@ -417,6 +441,11 @@ private Model getParent(Model model) { throw new RuntimeException("Could not generate model '" + modelName + "'", e); } } + + if (generateModelTests) { + generateModelTestsResourceFiles(files); + } + if (System.getProperty("debugModels") != null) { LOGGER.info("############ Model info ############"); Json.prettyPrint(allModels); @@ -586,44 +615,7 @@ private void generateSupportingFiles(List files, Map bundl } if (ignoreProcessor.allowsFile(new File(outputFilename))) { - if (templateFile.endsWith("mustache")) { - String template = readTemplate(templateFile); - Mustache.Compiler compiler = Mustache.compiler(); - compiler = config.processCompiler(compiler); - Template tmpl = compiler - .withLoader(new Mustache.TemplateLoader() { - @Override - public Reader getTemplate(String name) { - return getTemplateReader(getFullTemplateFile(config, name + ".mustache")); - } - }) - .defaultValue("") - .compile(template); - - writeToFile(outputFilename, tmpl.execute(bundle)); - files.add(new File(outputFilename)); - } else { - InputStream in = null; - - try { - in = new FileInputStream(templateFile); - } catch (Exception e) { - // continue - } - if (in == null) { - in = this.getClass().getClassLoader().getResourceAsStream(getCPResourcePath(templateFile)); - } - File outputFile = new File(outputFilename); - OutputStream out = new FileOutputStream(outputFile, false); - if (in != null) { - LOGGER.info("writing file " + outputFile); - IOUtils.copy(in, out); - out.close(); - } else { - LOGGER.error("can't open " + templateFile + " for input"); - } - files.add(outputFile); - } + processTemplateResourceFile(files, bundle, templateFile, outputFilename); } else { LOGGER.info("Skipped generation of " + outputFilename + " due to rule in .swagger-codegen-ignore"); } @@ -679,6 +671,47 @@ public Reader getTemplate(String name) { } + private void processTemplateResourceFile(List files, Map bundle, String templateFile, String outputFilename) throws MustacheException, IOException { + if (templateFile.endsWith("mustache")) { + String template = readTemplate(templateFile); + Mustache.Compiler compiler = Mustache.compiler(); + compiler = config.processCompiler(compiler); + Template tmpl = compiler + .withLoader(new Mustache.TemplateLoader() { + @Override + public Reader getTemplate(String name) { + return getTemplateReader(getFullTemplateFile(config, name + ".mustache")); + } + }) + .defaultValue("") + .compile(template); + + writeToFile(outputFilename, tmpl.execute(bundle)); + files.add(new File(outputFilename)); + } else { + InputStream in = null; + + try { + in = new FileInputStream(templateFile); + } catch (Exception e) { + // continue + } + if (in == null) { + in = this.getClass().getClassLoader().getResourceAsStream(getCPResourcePath(templateFile)); + } + File outputFile = new File(outputFilename); + OutputStream out = new FileOutputStream(outputFile, false); + if (in != null) { + LOGGER.info("writing file " + outputFile); + IOUtils.copy(in, out); + out.close(); + } else { + LOGGER.error("can't open " + templateFile + " for input"); + } + files.add(outputFile); + } + } + private Map buildSupportFileBundle(List allOperations, List allModels) { Map bundle = new HashMap(); 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 4b51baeac63..2cada83fb10 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 @@ -92,6 +92,8 @@ public AbstractJavaCodegen() { modelTemplateFiles.put("model.mustache", ".java"); apiTemplateFiles.put("api.mustache", ".java"); apiTestTemplateFiles.put("api_test.mustache", ".java"); + modelTestTemplateFiles.put("model_test.mustache", ".java"); + modelTestResourceTemplateFiles.put("util/ModelTestUtils.mustache", ".java"); modelDocTemplateFiles.put("model_doc.mustache", ".md"); apiDocTemplateFiles.put("api_doc.mustache", ".md"); @@ -467,6 +469,11 @@ public String apiTestFileFolder() { return outputFolder + "/" + testFolder + "/" + apiPackage().replace('.', '/'); } + @Override + public String modelTestFileFolder() { + return outputFolder + "/" + testFolder + "/" + modelPackage().replace('.', '/'); + } + @Override public String modelFileFolder() { return outputFolder + "/" + sourceFolder + "/" + modelPackage().replace('.', '/'); @@ -611,6 +618,16 @@ public String toModelFilename(String name) { return toModelName(name); } + @Override + public String toModelTestFilename(String name) { + return toModelName(name) + "Test"; + } + + @Override + public String toModelTestResourceFilename(String name) { + return StringUtils.substringBefore(name, CodegenConstants.DOT_TEMPLATE_EXTENSION); + } + @Override public String getTypeDeclaration(Property p) { if (p instanceof ArrayProperty) { diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaJAXRSServerCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaJAXRSServerCodegen.java index ab1ddb7ea82..05737c62b28 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaJAXRSServerCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractJavaJAXRSServerCodegen.java @@ -16,7 +16,6 @@ import io.swagger.codegen.CodegenResponse; import io.swagger.codegen.CodegenType; import io.swagger.codegen.languages.features.BeanValidationFeatures; -import io.swagger.codegen.languages.features.UseGenericResponseFeatures; import io.swagger.models.Operation; import io.swagger.models.Path; import io.swagger.models.Swagger; diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/GroovyClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/GroovyClientCodegen.java index 033dceeb669..da9081a01c1 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/GroovyClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/GroovyClientCodegen.java @@ -18,6 +18,9 @@ public GroovyClientCodegen() { sourceFolder = projectFolder + File.separator + "groovy"; outputFolder = "generated-code/groovy"; + // TODO: implement model tests for Groovy + modelTestTemplateFiles.clear(); //remove java model test templates + modelTestResourceTemplateFiles.clear(); //remove java model test resource templates modelTemplateFiles.put("model.mustache", ".groovy"); apiTemplateFiles.put("api.mustache", ".groovy"); apiTestTemplateFiles.clear(); // TODO: add test template diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaJAXRSSpecServerCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaJAXRSSpecServerCodegen.java index ba0c837be39..61479b07217 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaJAXRSSpecServerCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaJAXRSSpecServerCodegen.java @@ -41,7 +41,7 @@ public JavaJAXRSSpecServerCodegen() modelPackage = "io.swagger.model"; apiTestTemplateFiles.clear(); // TODO: add api test template - modelTestTemplateFiles.clear(); // TODO: add model test template +// modelTestTemplateFiles.clear(); // TODO: add model test template // clear model and api doc template as this codegen // does not support auto-generated markdown doc at the moment diff --git a/modules/swagger-codegen/src/main/resources/Java/modelEnum_test.mustache b/modules/swagger-codegen/src/main/resources/Java/modelEnum_test.mustache new file mode 100644 index 00000000000..188e44a720d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/Java/modelEnum_test.mustache @@ -0,0 +1 @@ +{{! TODO: implement modelEnum_test.mustache }} diff --git a/modules/swagger-codegen/src/main/resources/Java/model_test.mustache b/modules/swagger-codegen/src/main/resources/Java/model_test.mustache new file mode 100644 index 00000000000..ab312292f5d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/Java/model_test.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} + +package {{package}}; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +{{#imports}}import {{import}}; +{{/imports}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import {{package}}.util.ModelTestUtils; + +/** + * Model tests for {{#isEnum}}enum{{/isEnum}}{{^isEnum}}entity{{/isEnum}} {{classname}} + */ +// @Ignore +public class {{classname}}Test { +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum_test}}{{/isEnum}}{{^isEnum}}{{>pojo_test}}{{/isEnum}} +{{/model}} +{{/models}} +} diff --git a/modules/swagger-codegen/src/main/resources/Java/pojo.mustache b/modules/swagger-codegen/src/main/resources/Java/pojo.mustache index fa0a84b2c65..8cec3db2ac6 100644 --- a/modules/swagger-codegen/src/main/resources/Java/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/pojo.mustache @@ -180,7 +180,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela StringBuilder sb = new StringBuilder(); sb.append("class {{classname}} {\n"); {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}}{{#vendorExtensions.x-obfuscated}}, true{{/vendorExtensions.x-obfuscated}})).append("\n"); {{/vars}}sb.append("}"); return sb.toString(); } @@ -190,9 +190,20 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#parcela * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/modules/swagger-codegen/src/main/resources/Java/pojo_test.mustache b/modules/swagger-codegen/src/main/resources/Java/pojo_test.mustache new file mode 100644 index 00000000000..b05720c5591 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/Java/pojo_test.mustache @@ -0,0 +1,16 @@ + + @Test + public void testInstance() { + new {{classname}}(); + } +{{#vars}}{{#vendorExtensions.x-obfuscated}} + @Test + public void testObfuscation_{{name}}() { + {{classname}} model = new {{classname}}(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: null")); + {{datatypeWithEnum}} value = ModelTestUtils.getInstanceOf({{datatypeWithEnum}}.class); + model.{{setter}}(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } +{{/vendorExtensions.x-obfuscated}}{{/vars}} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/Java/util/ModelTestUtils.mustache b/modules/swagger-codegen/src/main/resources/Java/util/ModelTestUtils.mustache new file mode 100644 index 00000000000..931718b1a44 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/Java/util/ModelTestUtils.mustache @@ -0,0 +1,121 @@ +{{>licenseInfo}} +package {{package}}.util; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } +{{#joda}} + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/joda}} +{{#threetenbp}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } +{{/java8}} +{{/threetenbp}} + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaInflector/licenseInfo.mustache b/modules/swagger-codegen/src/main/resources/JavaInflector/licenseInfo.mustache new file mode 100644 index 00000000000..94c36dda3af --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaInflector/licenseInfo.mustache @@ -0,0 +1,11 @@ +/* + * {{{appName}}} + * {{{appDescription}}} + * + * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} + * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * + * 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. + */ diff --git a/modules/swagger-codegen/src/main/resources/JavaInflector/model.mustache b/modules/swagger-codegen/src/main/resources/JavaInflector/model.mustache index b9512d2b83c..73ed5154208 100644 --- a/modules/swagger-codegen/src/main/resources/JavaInflector/model.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaInflector/model.mustache @@ -1,3 +1,5 @@ +{{>licenseInfo}} + package {{package}}; import java.util.Objects; diff --git a/modules/swagger-codegen/src/main/resources/JavaInflector/modelEnum_test.mustache b/modules/swagger-codegen/src/main/resources/JavaInflector/modelEnum_test.mustache new file mode 100644 index 00000000000..188e44a720d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaInflector/modelEnum_test.mustache @@ -0,0 +1 @@ +{{! TODO: implement modelEnum_test.mustache }} diff --git a/modules/swagger-codegen/src/main/resources/JavaInflector/model_test.mustache b/modules/swagger-codegen/src/main/resources/JavaInflector/model_test.mustache new file mode 100644 index 00000000000..ab312292f5d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaInflector/model_test.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} + +package {{package}}; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +{{#imports}}import {{import}}; +{{/imports}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import {{package}}.util.ModelTestUtils; + +/** + * Model tests for {{#isEnum}}enum{{/isEnum}}{{^isEnum}}entity{{/isEnum}} {{classname}} + */ +// @Ignore +public class {{classname}}Test { +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum_test}}{{/isEnum}}{{^isEnum}}{{>pojo_test}}{{/isEnum}} +{{/model}} +{{/models}} +} diff --git a/modules/swagger-codegen/src/main/resources/JavaInflector/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaInflector/pojo.mustache index 74859ab39b4..82e3b5f32f0 100644 --- a/modules/swagger-codegen/src/main/resources/JavaInflector/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaInflector/pojo.mustache @@ -75,7 +75,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali StringBuilder sb = new StringBuilder(); sb.append("class {{classname}} {\n"); {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}}{{#vendorExtensions.x-obfuscated}}, true{{/vendorExtensions.x-obfuscated}})).append("\n"); {{/vars}}sb.append("}"); return sb.toString(); } @@ -85,9 +85,20 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/modules/swagger-codegen/src/main/resources/JavaInflector/pojo_test.mustache b/modules/swagger-codegen/src/main/resources/JavaInflector/pojo_test.mustache new file mode 100644 index 00000000000..b05720c5591 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaInflector/pojo_test.mustache @@ -0,0 +1,16 @@ + + @Test + public void testInstance() { + new {{classname}}(); + } +{{#vars}}{{#vendorExtensions.x-obfuscated}} + @Test + public void testObfuscation_{{name}}() { + {{classname}} model = new {{classname}}(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: null")); + {{datatypeWithEnum}} value = ModelTestUtils.getInstanceOf({{datatypeWithEnum}}.class); + model.{{setter}}(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } +{{/vendorExtensions.x-obfuscated}}{{/vars}} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaInflector/pom.mustache b/modules/swagger-codegen/src/main/resources/JavaInflector/pom.mustache index 1737c94615b..977ac2ed85b 100644 --- a/modules/swagger-codegen/src/main/resources/JavaInflector/pom.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaInflector/pom.mustache @@ -126,6 +126,12 @@ swagger-inflector ${swagger-inflector-version} + + junit + junit + ${junit-version} + test + diff --git a/modules/swagger-codegen/src/main/resources/JavaInflector/util/ModelTestUtils.mustache b/modules/swagger-codegen/src/main/resources/JavaInflector/util/ModelTestUtils.mustache new file mode 100644 index 00000000000..931718b1a44 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaInflector/util/ModelTestUtils.mustache @@ -0,0 +1,121 @@ +{{>licenseInfo}} +package {{package}}.util; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } +{{#joda}} + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/joda}} +{{#threetenbp}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } +{{/java8}} +{{/threetenbp}} + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/licenseInfo.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/licenseInfo.mustache new file mode 100644 index 00000000000..94c36dda3af --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/licenseInfo.mustache @@ -0,0 +1,11 @@ +/* + * {{{appName}}} + * {{{appDescription}}} + * + * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} + * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * + * 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. + */ diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache index 225cfd719cc..636c86f6a82 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/model.mustache @@ -1,3 +1,5 @@ +{{>licenseInfo}} + package {{package}}; {{#imports}}import {{import}}; diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/modelEnum_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/modelEnum_test.mustache new file mode 100644 index 00000000000..188e44a720d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/modelEnum_test.mustache @@ -0,0 +1 @@ +{{! TODO: implement modelEnum_test.mustache }} diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/model_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/model_test.mustache new file mode 100644 index 00000000000..ab312292f5d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/model_test.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} + +package {{package}}; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +{{#imports}}import {{import}}; +{{/imports}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import {{package}}.util.ModelTestUtils; + +/** + * Model tests for {{#isEnum}}enum{{/isEnum}}{{^isEnum}}entity{{/isEnum}} {{classname}} + */ +// @Ignore +public class {{classname}}Test { +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum_test}}{{/isEnum}}{{^isEnum}}{{>pojo_test}}{{/isEnum}} +{{/model}} +{{/models}} +} 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 05543a0dd0e..4188829a753 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 @@ -66,7 +66,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali StringBuilder sb = new StringBuilder(); sb.append("class {{classname}} {\n"); {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}}{{#vendorExtensions.x-obfuscated}}, true{{/vendorExtensions.x-obfuscated}})).append("\n"); {{/vars}}sb.append("}"); return sb.toString(); } @@ -76,9 +76,20 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/pojo_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/pojo_test.mustache new file mode 100644 index 00000000000..b05720c5591 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/pojo_test.mustache @@ -0,0 +1,16 @@ + + @Test + public void testInstance() { + new {{classname}}(); + } +{{#vars}}{{#vendorExtensions.x-obfuscated}} + @Test + public void testObfuscation_{{name}}() { + {{classname}} model = new {{classname}}(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: null")); + {{datatypeWithEnum}} value = ModelTestUtils.getInstanceOf({{datatypeWithEnum}}.class); + model.{{setter}}(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } +{{/vendorExtensions.x-obfuscated}}{{/vars}} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache index 99a7dea4153..5d308e449f5 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/pom.mustache @@ -5,11 +5,9 @@ war {{artifactId}} {{artifactVersion}} - src/main/java - @@ -31,7 +29,6 @@ - maven-war-plugin @@ -42,9 +39,7 @@ - - javax @@ -52,7 +47,6 @@ 7.0 provided - org.apache.cxf @@ -62,21 +56,18 @@ 3.0.2 provided - com.fasterxml.jackson.jaxrs jackson-jaxrs-json-provider [2.8.3,3) - io.swagger swagger-annotations [1.5.3,1.5.16] - {{#useBeanValidation}} @@ -86,7 +77,14 @@ provided {{/useBeanValidation}} - + + junit + junit + ${junit-version} + test + - + + 4.12 + diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/util/ModelTestUtils.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/util/ModelTestUtils.mustache new file mode 100644 index 00000000000..931718b1a44 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf-cdi/util/ModelTestUtils.mustache @@ -0,0 +1,121 @@ +{{>licenseInfo}} +package {{package}}.util; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } +{{#joda}} + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/joda}} +{{#threetenbp}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } +{{/java8}} +{{/threetenbp}} + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/model.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/model.mustache index 0030cf7dd0c..c167f9fe80d 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/model.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/model.mustache @@ -1,3 +1,5 @@ +{{>licenseInfo}} + package {{package}}; {{#imports}}import {{import}}; diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/modelEnum_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/modelEnum_test.mustache new file mode 100644 index 00000000000..188e44a720d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/modelEnum_test.mustache @@ -0,0 +1 @@ +{{! TODO: implement modelEnum_test.mustache }} diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/model_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/model_test.mustache new file mode 100644 index 00000000000..ab312292f5d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/model_test.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} + +package {{package}}; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +{{#imports}}import {{import}}; +{{/imports}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import {{package}}.util.ModelTestUtils; + +/** + * Model tests for {{#isEnum}}enum{{/isEnum}}{{^isEnum}}entity{{/isEnum}} {{classname}} + */ +// @Ignore +public class {{classname}}Test { +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum_test}}{{/isEnum}}{{^isEnum}}{{>pojo_test}}{{/isEnum}} +{{/model}} +{{/models}} +} 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 f1bcb38e57d..3c0693a4b53 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/pojo.mustache @@ -109,7 +109,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} { StringBuilder sb = new StringBuilder(); sb.append("class {{classname}} {\n"); {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}}{{#vendorExtensions.x-obfuscated}}, true{{/vendorExtensions.x-obfuscated}})).append("\n"); {{/vars}}sb.append("}"); return sb.toString(); } @@ -118,10 +118,21 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/pojo_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/pojo_test.mustache new file mode 100644 index 00000000000..b05720c5591 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/pojo_test.mustache @@ -0,0 +1,16 @@ + + @Test + public void testInstance() { + new {{classname}}(); + } +{{#vars}}{{#vendorExtensions.x-obfuscated}} + @Test + public void testObfuscation_{{name}}() { + {{classname}} model = new {{classname}}(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: null")); + {{datatypeWithEnum}} value = ModelTestUtils.getInstanceOf({{datatypeWithEnum}}.class); + model.{{setter}}(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } +{{/vendorExtensions.x-obfuscated}}{{/vars}} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/util/ModelTestUtils.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/util/ModelTestUtils.mustache new file mode 100644 index 00000000000..931718b1a44 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/cxf/util/ModelTestUtils.mustache @@ -0,0 +1,121 @@ +{{>licenseInfo}} +package {{package}}.util; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } +{{#joda}} + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/joda}} +{{#threetenbp}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } +{{/java8}} +{{/threetenbp}} + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/modelEnum_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/modelEnum_test.mustache new file mode 100644 index 00000000000..188e44a720d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/modelEnum_test.mustache @@ -0,0 +1 @@ +{{! TODO: implement modelEnum_test.mustache }} diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/model_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/model_test.mustache new file mode 100644 index 00000000000..ab312292f5d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/model_test.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} + +package {{package}}; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +{{#imports}}import {{import}}; +{{/imports}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import {{package}}.util.ModelTestUtils; + +/** + * Model tests for {{#isEnum}}enum{{/isEnum}}{{^isEnum}}entity{{/isEnum}} {{classname}} + */ +// @Ignore +public class {{classname}}Test { +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum_test}}{{/isEnum}}{{^isEnum}}{{>pojo_test}}{{/isEnum}} +{{/model}} +{{/models}} +} diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/pojo.mustache index 69a60003102..4f3f802f718 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/pojo.mustache @@ -147,7 +147,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali StringBuilder sb = new StringBuilder(); sb.append("class {{classname}} {\n"); {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}}{{#vendorExtensions.x-obfuscated}}, true{{/vendorExtensions.x-obfuscated}})).append("\n"); {{/vars}}sb.append("}"); return sb.toString(); } @@ -157,9 +157,20 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/pojo_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/pojo_test.mustache new file mode 100644 index 00000000000..b05720c5591 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/pojo_test.mustache @@ -0,0 +1,16 @@ + + @Test + public void testInstance() { + new {{classname}}(); + } +{{#vars}}{{#vendorExtensions.x-obfuscated}} + @Test + public void testObfuscation_{{name}}() { + {{classname}} model = new {{classname}}(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: null")); + {{datatypeWithEnum}} value = ModelTestUtils.getInstanceOf({{datatypeWithEnum}}.class); + model.{{setter}}(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } +{{/vendorExtensions.x-obfuscated}}{{/vars}} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/pom.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/pom.mustache index 589b0501e83..0ba3306d1c5 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/pom.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/pom.mustache @@ -15,7 +15,7 @@ - src/main/java + org.apache.maven.plugins diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/licenseInfo.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/licenseInfo.mustache new file mode 100644 index 00000000000..94c36dda3af --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/licenseInfo.mustache @@ -0,0 +1,11 @@ +/* + * {{{appName}}} + * {{{appDescription}}} + * + * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} + * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * + * 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. + */ diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/model.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/model.mustache index 2ff294581f5..95fb816c8b9 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/model.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/model.mustache @@ -1,3 +1,5 @@ +{{>licenseInfo}} + package {{package}}; import java.util.Objects; diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/modelEnum_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/modelEnum_test.mustache new file mode 100644 index 00000000000..188e44a720d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/modelEnum_test.mustache @@ -0,0 +1 @@ +{{! TODO: implement modelEnum_test.mustache }} diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/model_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/model_test.mustache new file mode 100644 index 00000000000..ab312292f5d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/model_test.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} + +package {{package}}; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +{{#imports}}import {{import}}; +{{/imports}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import {{package}}.util.ModelTestUtils; + +/** + * Model tests for {{#isEnum}}enum{{/isEnum}}{{^isEnum}}entity{{/isEnum}} {{classname}} + */ +// @Ignore +public class {{classname}}Test { +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum_test}}{{/isEnum}}{{^isEnum}}{{>pojo_test}}{{/isEnum}} +{{/model}} +{{/models}} +} 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 a2c7e8c000c..8edd8cd9fcb 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 @@ -61,7 +61,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali StringBuilder sb = new StringBuilder(); sb.append("class {{classname}} {\n"); {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}}{{#vendorExtensions.x-obfuscated}}, true{{/vendorExtensions.x-obfuscated}})).append("\n"); {{/vars}}sb.append("}"); return sb.toString(); } @@ -70,10 +70,21 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/pojo_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/pojo_test.mustache new file mode 100644 index 00000000000..b05720c5591 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/pojo_test.mustache @@ -0,0 +1,16 @@ + + @Test + public void testInstance() { + new {{classname}}(); + } +{{#vars}}{{#vendorExtensions.x-obfuscated}} + @Test + public void testObfuscation_{{name}}() { + {{classname}} model = new {{classname}}(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: null")); + {{datatypeWithEnum}} value = ModelTestUtils.getInstanceOf({{datatypeWithEnum}}.class); + model.{{setter}}(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } +{{/vendorExtensions.x-obfuscated}}{{/vars}} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/util/ModelTestUtils.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/util/ModelTestUtils.mustache new file mode 100644 index 00000000000..931718b1a44 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/eap/util/ModelTestUtils.mustache @@ -0,0 +1,121 @@ +{{>licenseInfo}} +package {{package}}.util; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } +{{#joda}} + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/joda}} +{{#threetenbp}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } +{{/java8}} +{{/threetenbp}} + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/licenseInfo.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/licenseInfo.mustache new file mode 100644 index 00000000000..94c36dda3af --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/licenseInfo.mustache @@ -0,0 +1,11 @@ +/* + * {{{appName}}} + * {{{appDescription}}} + * + * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} + * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * + * 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. + */ diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/model.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/model.mustache index 2ff294581f5..95fb816c8b9 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/model.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/model.mustache @@ -1,3 +1,5 @@ +{{>licenseInfo}} + package {{package}}; import java.util.Objects; diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/modelEnum_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/modelEnum_test.mustache new file mode 100644 index 00000000000..188e44a720d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/modelEnum_test.mustache @@ -0,0 +1 @@ +{{! TODO: implement modelEnum_test.mustache }} diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/model_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/model_test.mustache new file mode 100644 index 00000000000..ab312292f5d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/model_test.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} + +package {{package}}; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +{{#imports}}import {{import}}; +{{/imports}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import {{package}}.util.ModelTestUtils; + +/** + * Model tests for {{#isEnum}}enum{{/isEnum}}{{^isEnum}}entity{{/isEnum}} {{classname}} + */ +// @Ignore +public class {{classname}}Test { +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum_test}}{{/isEnum}}{{^isEnum}}{{>pojo_test}}{{/isEnum}} +{{/model}} +{{/models}} +} 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 8abd4bcd94b..ef9ca9dedf4 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/pojo.mustache @@ -61,7 +61,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali StringBuilder sb = new StringBuilder(); sb.append("class {{classname}} {\n"); {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}}{{#vendorExtensions.x-obfuscated}}, true{{/vendorExtensions.x-obfuscated}})).append("\n"); {{/vars}}sb.append("}"); return sb.toString(); } @@ -71,9 +71,20 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/pojo_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/pojo_test.mustache new file mode 100644 index 00000000000..b05720c5591 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/pojo_test.mustache @@ -0,0 +1,16 @@ + + @Test + public void testInstance() { + new {{classname}}(); + } +{{#vars}}{{#vendorExtensions.x-obfuscated}} + @Test + public void testObfuscation_{{name}}() { + {{classname}} model = new {{classname}}(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: null")); + {{datatypeWithEnum}} value = ModelTestUtils.getInstanceOf({{datatypeWithEnum}}.class); + model.{{setter}}(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } +{{/vendorExtensions.x-obfuscated}}{{/vars}} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/util/ModelTestUtils.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/util/ModelTestUtils.mustache new file mode 100644 index 00000000000..931718b1a44 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/resteasy/util/ModelTestUtils.mustache @@ -0,0 +1,121 @@ +{{>licenseInfo}} +package {{package}}.util; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } +{{#joda}} + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/joda}} +{{#threetenbp}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } +{{/java8}} +{{/threetenbp}} + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/licenseInfo.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/licenseInfo.mustache new file mode 100644 index 00000000000..94c36dda3af --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/licenseInfo.mustache @@ -0,0 +1,11 @@ +/* + * {{{appName}}} + * {{{appDescription}}} + * + * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} + * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * + * 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. + */ diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/model.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/model.mustache index 3fb7e3cfb9d..ad1a1cd9ac5 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/model.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/model.mustache @@ -1,3 +1,5 @@ +{{>licenseInfo}} + package {{package}}; {{#imports}}import {{import}}; diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/modelEnum_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/modelEnum_test.mustache new file mode 100644 index 00000000000..188e44a720d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/modelEnum_test.mustache @@ -0,0 +1 @@ +{{! TODO: implement modelEnum_test.mustache }} diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/model_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/model_test.mustache new file mode 100644 index 00000000000..ab312292f5d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/model_test.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} + +package {{package}}; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +{{#imports}}import {{import}}; +{{/imports}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import {{package}}.util.ModelTestUtils; + +/** + * Model tests for {{#isEnum}}enum{{/isEnum}}{{^isEnum}}entity{{/isEnum}} {{classname}} + */ +// @Ignore +public class {{classname}}Test { +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum_test}}{{/isEnum}}{{^isEnum}}{{>pojo_test}}{{/isEnum}} +{{/model}} +{{/models}} +} 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 73d96a3b16b..cb8c6c72a1d 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/pojo.mustache @@ -64,7 +64,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali StringBuilder sb = new StringBuilder(); sb.append("class {{classname}} {\n"); {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}}{{#vendorExtensions.x-obfuscated}}, true{{/vendorExtensions.x-obfuscated}})).append("\n"); {{/vars}}sb.append("}"); return sb.toString(); } @@ -74,9 +74,20 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/pojo_test.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/pojo_test.mustache new file mode 100644 index 00000000000..b05720c5591 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/pojo_test.mustache @@ -0,0 +1,16 @@ + + @Test + public void testInstance() { + new {{classname}}(); + } +{{#vars}}{{#vendorExtensions.x-obfuscated}} + @Test + public void testObfuscation_{{name}}() { + {{classname}} model = new {{classname}}(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: null")); + {{datatypeWithEnum}} value = ModelTestUtils.getInstanceOf({{datatypeWithEnum}}.class); + model.{{setter}}(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } +{{/vendorExtensions.x-obfuscated}}{{/vars}} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/util/ModelTestUtils.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/util/ModelTestUtils.mustache new file mode 100644 index 00000000000..931718b1a44 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/util/ModelTestUtils.mustache @@ -0,0 +1,121 @@ +{{>licenseInfo}} +package {{package}}.util; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } +{{#joda}} + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/joda}} +{{#threetenbp}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } +{{/java8}} +{{/threetenbp}} + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/util/ModelTestUtils.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/util/ModelTestUtils.mustache new file mode 100644 index 00000000000..931718b1a44 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/util/ModelTestUtils.mustache @@ -0,0 +1,121 @@ +{{>licenseInfo}} +package {{package}}.util; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } +{{#joda}} + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/joda}} +{{#threetenbp}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } +{{/java8}} +{{/threetenbp}} + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaPlayFramework/licenseInfo.mustache b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/licenseInfo.mustache new file mode 100644 index 00000000000..94c36dda3af --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/licenseInfo.mustache @@ -0,0 +1,11 @@ +/* + * {{{appName}}} + * {{{appDescription}}} + * + * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} + * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * + * 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. + */ diff --git a/modules/swagger-codegen/src/main/resources/JavaPlayFramework/model.mustache b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/model.mustache index 2f149aac0a1..a17da7a92d2 100644 --- a/modules/swagger-codegen/src/main/resources/JavaPlayFramework/model.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/model.mustache @@ -1,3 +1,5 @@ +{{>licenseInfo}} + package {{package}}; {{#imports}}import {{import}}; diff --git a/modules/swagger-codegen/src/main/resources/JavaPlayFramework/modelEnum_test.mustache b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/modelEnum_test.mustache new file mode 100644 index 00000000000..188e44a720d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/modelEnum_test.mustache @@ -0,0 +1 @@ +{{! TODO: implement modelEnum_test.mustache }} diff --git a/modules/swagger-codegen/src/main/resources/JavaPlayFramework/model_test.mustache b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/model_test.mustache new file mode 100644 index 00000000000..ab312292f5d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/model_test.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} + +package {{package}}; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +{{#imports}}import {{import}}; +{{/imports}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import {{package}}.util.ModelTestUtils; + +/** + * Model tests for {{#isEnum}}enum{{/isEnum}}{{^isEnum}}entity{{/isEnum}} {{classname}} + */ +// @Ignore +public class {{classname}}Test { +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum_test}}{{/isEnum}}{{^isEnum}}{{>pojo_test}}{{/isEnum}} +{{/model}} +{{/models}} +} diff --git a/modules/swagger-codegen/src/main/resources/JavaPlayFramework/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/pojo.mustache index c7ce1c4dadb..5d17f2293df 100644 --- a/modules/swagger-codegen/src/main/resources/JavaPlayFramework/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/pojo.mustache @@ -119,7 +119,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali StringBuilder sb = new StringBuilder(); sb.append("class {{classname}} {\n"); {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}}{{#vendorExtensions.x-obfuscated}}, true{{/vendorExtensions.x-obfuscated}})).append("\n"); {{/vars}}sb.append("}"); return sb.toString(); } @@ -129,9 +129,20 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/modules/swagger-codegen/src/main/resources/JavaPlayFramework/pojo_test.mustache b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/pojo_test.mustache new file mode 100644 index 00000000000..b05720c5591 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/pojo_test.mustache @@ -0,0 +1,16 @@ + + @Test + public void testInstance() { + new {{classname}}(); + } +{{#vars}}{{#vendorExtensions.x-obfuscated}} + @Test + public void testObfuscation_{{name}}() { + {{classname}} model = new {{classname}}(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: null")); + {{datatypeWithEnum}} value = ModelTestUtils.getInstanceOf({{datatypeWithEnum}}.class); + model.{{setter}}(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } +{{/vendorExtensions.x-obfuscated}}{{/vars}} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaPlayFramework/util/ModelTestUtils.mustache b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/util/ModelTestUtils.mustache new file mode 100644 index 00000000000..931718b1a44 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaPlayFramework/util/ModelTestUtils.mustache @@ -0,0 +1,121 @@ +{{>licenseInfo}} +package {{package}}.util; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } +{{#joda}} + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/joda}} +{{#threetenbp}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } +{{/java8}} +{{/threetenbp}} + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache b/modules/swagger-codegen/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache index 076073d099e..a39bd19287c 100644 --- a/modules/swagger-codegen/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaSpring/libraries/spring-boot/pom.mustache @@ -10,6 +10,7 @@ ${java.version} ${java.version} 2.7.0 + 4.12 org.springframework.boot @@ -92,5 +93,11 @@ validation-api {{/useBeanValidation}} + + junit + junit + ${junit-version} + test + diff --git a/modules/swagger-codegen/src/main/resources/JavaSpring/licenseInfo.mustache b/modules/swagger-codegen/src/main/resources/JavaSpring/licenseInfo.mustache new file mode 100644 index 00000000000..94c36dda3af --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaSpring/licenseInfo.mustache @@ -0,0 +1,11 @@ +/* + * {{{appName}}} + * {{{appDescription}}} + * + * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} + * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * + * 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. + */ diff --git a/modules/swagger-codegen/src/main/resources/JavaSpring/modelEnum_test.mustache b/modules/swagger-codegen/src/main/resources/JavaSpring/modelEnum_test.mustache new file mode 100644 index 00000000000..188e44a720d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaSpring/modelEnum_test.mustache @@ -0,0 +1 @@ +{{! TODO: implement modelEnum_test.mustache }} diff --git a/modules/swagger-codegen/src/main/resources/JavaSpring/model_test.mustache b/modules/swagger-codegen/src/main/resources/JavaSpring/model_test.mustache new file mode 100644 index 00000000000..ab312292f5d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaSpring/model_test.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} + +package {{package}}; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +{{#imports}}import {{import}}; +{{/imports}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import {{package}}.util.ModelTestUtils; + +/** + * Model tests for {{#isEnum}}enum{{/isEnum}}{{^isEnum}}entity{{/isEnum}} {{classname}} + */ +// @Ignore +public class {{classname}}Test { +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum_test}}{{/isEnum}}{{^isEnum}}{{>pojo_test}}{{/isEnum}} +{{/model}} +{{/models}} +} diff --git a/modules/swagger-codegen/src/main/resources/JavaSpring/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaSpring/pojo.mustache index 96aea0b41c7..caea3221e58 100644 --- a/modules/swagger-codegen/src/main/resources/JavaSpring/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaSpring/pojo.mustache @@ -122,7 +122,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali StringBuilder sb = new StringBuilder(); sb.append("class {{classname}} {\n"); {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}}{{#vendorExtensions.x-obfuscated}}, true{{/vendorExtensions.x-obfuscated}})).append("\n"); {{/vars}}sb.append("}"); return sb.toString(); } @@ -132,9 +132,20 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/modules/swagger-codegen/src/main/resources/JavaSpring/pojo_test.mustache b/modules/swagger-codegen/src/main/resources/JavaSpring/pojo_test.mustache new file mode 100644 index 00000000000..b05720c5591 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaSpring/pojo_test.mustache @@ -0,0 +1,16 @@ + + @Test + public void testInstance() { + new {{classname}}(); + } +{{#vars}}{{#vendorExtensions.x-obfuscated}} + @Test + public void testObfuscation_{{name}}() { + {{classname}} model = new {{classname}}(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: null")); + {{datatypeWithEnum}} value = ModelTestUtils.getInstanceOf({{datatypeWithEnum}}.class); + model.{{setter}}(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } +{{/vendorExtensions.x-obfuscated}}{{/vars}} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaSpring/util/ModelTestUtils.mustache b/modules/swagger-codegen/src/main/resources/JavaSpring/util/ModelTestUtils.mustache new file mode 100644 index 00000000000..931718b1a44 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaSpring/util/ModelTestUtils.mustache @@ -0,0 +1,121 @@ +{{>licenseInfo}} +package {{package}}.util; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } +{{#joda}} + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/joda}} +{{#threetenbp}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } +{{/java8}} +{{/threetenbp}} + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaVertXServer/licenseInfo.mustache b/modules/swagger-codegen/src/main/resources/JavaVertXServer/licenseInfo.mustache new file mode 100644 index 00000000000..94c36dda3af --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaVertXServer/licenseInfo.mustache @@ -0,0 +1,11 @@ +/* + * {{{appName}}} + * {{{appDescription}}} + * + * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} + * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * + * 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. + */ diff --git a/modules/swagger-codegen/src/main/resources/JavaVertXServer/model.mustache b/modules/swagger-codegen/src/main/resources/JavaVertXServer/model.mustache index 46f9f77357d..e557528e4a3 100644 --- a/modules/swagger-codegen/src/main/resources/JavaVertXServer/model.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaVertXServer/model.mustache @@ -1,3 +1,5 @@ +{{>licenseInfo}} + package {{package}}; import java.util.Objects; diff --git a/modules/swagger-codegen/src/main/resources/JavaVertXServer/modelEnum_test.mustache b/modules/swagger-codegen/src/main/resources/JavaVertXServer/modelEnum_test.mustache new file mode 100644 index 00000000000..188e44a720d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaVertXServer/modelEnum_test.mustache @@ -0,0 +1 @@ +{{! TODO: implement modelEnum_test.mustache }} diff --git a/modules/swagger-codegen/src/main/resources/JavaVertXServer/model_test.mustache b/modules/swagger-codegen/src/main/resources/JavaVertXServer/model_test.mustache new file mode 100644 index 00000000000..ab312292f5d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaVertXServer/model_test.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} + +package {{package}}; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +{{#imports}}import {{import}}; +{{/imports}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import {{package}}.util.ModelTestUtils; + +/** + * Model tests for {{#isEnum}}enum{{/isEnum}}{{^isEnum}}entity{{/isEnum}} {{classname}} + */ +// @Ignore +public class {{classname}}Test { +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum_test}}{{/isEnum}}{{^isEnum}}{{>pojo_test}}{{/isEnum}} +{{/model}} +{{/models}} +} diff --git a/modules/swagger-codegen/src/main/resources/JavaVertXServer/pojo.mustache b/modules/swagger-codegen/src/main/resources/JavaVertXServer/pojo.mustache index c3f95a095c2..ddb3d0b752d 100644 --- a/modules/swagger-codegen/src/main/resources/JavaVertXServer/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaVertXServer/pojo.mustache @@ -53,7 +53,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali StringBuilder sb = new StringBuilder(); sb.append("class {{classname}} {\n"); {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}}{{#vendorExtensions.x-obfuscated}}, true{{/vendorExtensions.x-obfuscated}})).append("\n"); {{/vars}}sb.append("}"); return sb.toString(); } @@ -62,10 +62,21 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/modules/swagger-codegen/src/main/resources/JavaVertXServer/pojo_test.mustache b/modules/swagger-codegen/src/main/resources/JavaVertXServer/pojo_test.mustache new file mode 100644 index 00000000000..b05720c5591 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaVertXServer/pojo_test.mustache @@ -0,0 +1,16 @@ + + @Test + public void testInstance() { + new {{classname}}(); + } +{{#vars}}{{#vendorExtensions.x-obfuscated}} + @Test + public void testObfuscation_{{name}}() { + {{classname}} model = new {{classname}}(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: null")); + {{datatypeWithEnum}} value = ModelTestUtils.getInstanceOf({{datatypeWithEnum}}.class); + model.{{setter}}(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } +{{/vendorExtensions.x-obfuscated}}{{/vars}} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/JavaVertXServer/util/ModelTestUtils.mustache b/modules/swagger-codegen/src/main/resources/JavaVertXServer/util/ModelTestUtils.mustache new file mode 100644 index 00000000000..931718b1a44 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/JavaVertXServer/util/ModelTestUtils.mustache @@ -0,0 +1,121 @@ +{{>licenseInfo}} +package {{package}}.util; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } +{{#joda}} + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/joda}} +{{#threetenbp}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } +{{/java8}} +{{/threetenbp}} + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/MSF4J/licenseInfo.mustache b/modules/swagger-codegen/src/main/resources/MSF4J/licenseInfo.mustache new file mode 100644 index 00000000000..94c36dda3af --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/MSF4J/licenseInfo.mustache @@ -0,0 +1,11 @@ +/* + * {{{appName}}} + * {{{appDescription}}} + * + * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} + * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * + * 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. + */ diff --git a/modules/swagger-codegen/src/main/resources/MSF4J/model.mustache b/modules/swagger-codegen/src/main/resources/MSF4J/model.mustache index d52b90c8bec..acc81828357 100644 --- a/modules/swagger-codegen/src/main/resources/MSF4J/model.mustache +++ b/modules/swagger-codegen/src/main/resources/MSF4J/model.mustache @@ -1,3 +1,5 @@ +{{>licenseInfo}} + package {{package}}; import java.util.Objects; diff --git a/modules/swagger-codegen/src/main/resources/MSF4J/modelEnum_test.mustache b/modules/swagger-codegen/src/main/resources/MSF4J/modelEnum_test.mustache new file mode 100644 index 00000000000..188e44a720d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/MSF4J/modelEnum_test.mustache @@ -0,0 +1 @@ +{{! TODO: implement modelEnum_test.mustache }} diff --git a/modules/swagger-codegen/src/main/resources/MSF4J/model_test.mustache b/modules/swagger-codegen/src/main/resources/MSF4J/model_test.mustache new file mode 100644 index 00000000000..ab312292f5d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/MSF4J/model_test.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} + +package {{package}}; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +{{#imports}}import {{import}}; +{{/imports}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import {{package}}.util.ModelTestUtils; + +/** + * Model tests for {{#isEnum}}enum{{/isEnum}}{{^isEnum}}entity{{/isEnum}} {{classname}} + */ +// @Ignore +public class {{classname}}Test { +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum_test}}{{/isEnum}}{{^isEnum}}{{>pojo_test}}{{/isEnum}} +{{/model}} +{{/models}} +} diff --git a/modules/swagger-codegen/src/main/resources/MSF4J/pojo.mustache b/modules/swagger-codegen/src/main/resources/MSF4J/pojo.mustache index 3f1179dee46..945dffad497 100644 --- a/modules/swagger-codegen/src/main/resources/MSF4J/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/MSF4J/pojo.mustache @@ -119,7 +119,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali StringBuilder sb = new StringBuilder(); sb.append("class {{classname}} {\n"); {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}}{{#vendorExtensions.x-obfuscated}}, true{{/vendorExtensions.x-obfuscated}})).append("\n"); {{/vars}}sb.append("}"); return sb.toString(); } @@ -129,9 +129,20 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/modules/swagger-codegen/src/main/resources/MSF4J/pojo_test.mustache b/modules/swagger-codegen/src/main/resources/MSF4J/pojo_test.mustache new file mode 100644 index 00000000000..b05720c5591 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/MSF4J/pojo_test.mustache @@ -0,0 +1,16 @@ + + @Test + public void testInstance() { + new {{classname}}(); + } +{{#vars}}{{#vendorExtensions.x-obfuscated}} + @Test + public void testObfuscation_{{name}}() { + {{classname}} model = new {{classname}}(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: null")); + {{datatypeWithEnum}} value = ModelTestUtils.getInstanceOf({{datatypeWithEnum}}.class); + model.{{setter}}(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } +{{/vendorExtensions.x-obfuscated}}{{/vars}} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/MSF4J/pom.mustache b/modules/swagger-codegen/src/main/resources/MSF4J/pom.mustache index 2c890843eac..b09a0325ea3 100644 --- a/modules/swagger-codegen/src/main/resources/MSF4J/pom.mustache +++ b/modules/swagger-codegen/src/main/resources/MSF4J/pom.mustache @@ -61,6 +61,12 @@ jackson-datatype-joda 2.4.1 + + junit + junit + ${junit-version} + test + diff --git a/modules/swagger-codegen/src/main/resources/MSF4J/util/ModelTestUtils.mustache b/modules/swagger-codegen/src/main/resources/MSF4J/util/ModelTestUtils.mustache new file mode 100644 index 00000000000..931718b1a44 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/MSF4J/util/ModelTestUtils.mustache @@ -0,0 +1,121 @@ +{{>licenseInfo}} +package {{package}}.util; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } +{{#joda}} + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/joda}} +{{#threetenbp}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } +{{/java8}} +{{/threetenbp}} + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/undertow/licenseInfo.mustache b/modules/swagger-codegen/src/main/resources/undertow/licenseInfo.mustache new file mode 100644 index 00000000000..94c36dda3af --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/undertow/licenseInfo.mustache @@ -0,0 +1,11 @@ +/* + * {{{appName}}} + * {{{appDescription}}} + * + * {{#version}}OpenAPI spec version: {{{version}}}{{/version}} + * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} + * + * 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. + */ diff --git a/modules/swagger-codegen/src/main/resources/undertow/model.mustache b/modules/swagger-codegen/src/main/resources/undertow/model.mustache index b9512d2b83c..73ed5154208 100644 --- a/modules/swagger-codegen/src/main/resources/undertow/model.mustache +++ b/modules/swagger-codegen/src/main/resources/undertow/model.mustache @@ -1,3 +1,5 @@ +{{>licenseInfo}} + package {{package}}; import java.util.Objects; diff --git a/modules/swagger-codegen/src/main/resources/undertow/modelEnum_test.mustache b/modules/swagger-codegen/src/main/resources/undertow/modelEnum_test.mustache new file mode 100644 index 00000000000..188e44a720d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/undertow/modelEnum_test.mustache @@ -0,0 +1 @@ +{{! TODO: implement modelEnum_test.mustache }} diff --git a/modules/swagger-codegen/src/main/resources/undertow/model_test.mustache b/modules/swagger-codegen/src/main/resources/undertow/model_test.mustache new file mode 100644 index 00000000000..ab312292f5d --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/undertow/model_test.mustache @@ -0,0 +1,53 @@ +{{>licenseInfo}} + +package {{package}}; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +{{#imports}}import {{import}}; +{{/imports}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import {{package}}.util.ModelTestUtils; + +/** + * Model tests for {{#isEnum}}enum{{/isEnum}}{{^isEnum}}entity{{/isEnum}} {{classname}} + */ +// @Ignore +public class {{classname}}Test { +{{#models}} +{{#model}} +{{#isEnum}}{{>modelEnum_test}}{{/isEnum}}{{^isEnum}}{{>pojo_test}}{{/isEnum}} +{{/model}} +{{/models}} +} diff --git a/modules/swagger-codegen/src/main/resources/undertow/pojo.mustache b/modules/swagger-codegen/src/main/resources/undertow/pojo.mustache index fd6a4b34fa1..584d20c7a13 100644 --- a/modules/swagger-codegen/src/main/resources/undertow/pojo.mustache +++ b/modules/swagger-codegen/src/main/resources/undertow/pojo.mustache @@ -55,7 +55,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali StringBuilder sb = new StringBuilder(); sb.append("class {{classname}} {\n"); {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); + {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}}{{#vendorExtensions.x-obfuscated}}, true{{/vendorExtensions.x-obfuscated}})).append("\n"); {{/vars}}sb.append("}"); return sb.toString(); } @@ -65,9 +65,20 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/modules/swagger-codegen/src/main/resources/undertow/pojo_test.mustache b/modules/swagger-codegen/src/main/resources/undertow/pojo_test.mustache new file mode 100644 index 00000000000..b05720c5591 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/undertow/pojo_test.mustache @@ -0,0 +1,16 @@ + + @Test + public void testInstance() { + new {{classname}}(); + } +{{#vars}}{{#vendorExtensions.x-obfuscated}} + @Test + public void testObfuscation_{{name}}() { + {{classname}} model = new {{classname}}(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: null")); + {{datatypeWithEnum}} value = ModelTestUtils.getInstanceOf({{datatypeWithEnum}}.class); + model.{{setter}}(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("{{name}}: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } +{{/vendorExtensions.x-obfuscated}}{{/vars}} \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/undertow/util/ModelTestUtils.mustache b/modules/swagger-codegen/src/main/resources/undertow/util/ModelTestUtils.mustache new file mode 100644 index 00000000000..931718b1a44 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/undertow/util/ModelTestUtils.mustache @@ -0,0 +1,121 @@ +{{>licenseInfo}} +package {{package}}.util; + +{{#joda}} +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +{{/joda}} +{{#threetenbp}} +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; +{{/java8}} +{{/threetenbp}} + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } +{{#joda}} + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/joda}} +{{#threetenbp}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } +{{/threetenbp}} +{{^threetenbp}} +{{#java8}} + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } +{{/java8}} +{{/threetenbp}} + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml index d84d621f687..337535465ee 100644 --- a/modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -1015,6 +1015,7 @@ definitions: type: string password: type: string + x-obfuscated: true phone: type: string userStatus: diff --git a/modules/swagger-codegen/src/test/resources/2_0/petstore.json b/modules/swagger-codegen/src/test/resources/2_0/petstore.json index 4290daed14d..484e4a71bed 100644 --- a/modules/swagger-codegen/src/test/resources/2_0/petstore.json +++ b/modules/swagger-codegen/src/test/resources/2_0/petstore.json @@ -843,7 +843,8 @@ "type": "string" }, "password": { - "type": "string" + "type": "string", + "x-obfuscated": true }, "phone": { "type": "string" diff --git a/modules/swagger-codegen/src/test/resources/2_0/petstore.yaml b/modules/swagger-codegen/src/test/resources/2_0/petstore.yaml index 787e72399c0..685763f946f 100644 --- a/modules/swagger-codegen/src/test/resources/2_0/petstore.yaml +++ b/modules/swagger-codegen/src/test/resources/2_0/petstore.yaml @@ -631,6 +631,7 @@ definitions: type: string password: type: string + x-obfuscated: true phone: type: string userStatus: diff --git a/modules/swagger-codegen/src/test/resources/petstore.json b/modules/swagger-codegen/src/test/resources/petstore.json index dd9b1f42edf..91d6991f334 100644 --- a/modules/swagger-codegen/src/test/resources/petstore.json +++ b/modules/swagger-codegen/src/test/resources/petstore.json @@ -844,7 +844,8 @@ "type": "string" }, "password": { - "type": "string" + "type": "string", + "x-obfuscated": true }, "phone": { "type": "string" diff --git a/samples/client/petstore-security-test/java/okhttp-gson/build.gradle b/samples/client/petstore-security-test/java/okhttp-gson/build.gradle index 534d4777929..c11d2e8f805 100644 --- a/samples/client/petstore-security-test/java/okhttp-gson/build.gradle +++ b/samples/client/petstore-security-test/java/okhttp-gson/build.gradle @@ -98,6 +98,7 @@ dependencies { compile 'com.squareup.okhttp:okhttp:2.7.5' compile 'com.squareup.okhttp:logging-interceptor:2.7.5' compile 'com.google.code.gson:gson:2.8.1' + compile 'io.gsonfire:gson-fire:1.8.0' compile 'org.threeten:threetenbp:1.3.5' testCompile 'junit:junit:4.12' } diff --git a/samples/client/petstore-security-test/java/okhttp-gson/build.sbt b/samples/client/petstore-security-test/java/okhttp-gson/build.sbt index 03c3ac9e231..db083233db7 100644 --- a/samples/client/petstore-security-test/java/okhttp-gson/build.sbt +++ b/samples/client/petstore-security-test/java/okhttp-gson/build.sbt @@ -14,6 +14,7 @@ lazy val root = (project in file(".")). "com.squareup.okhttp" % "logging-interceptor" % "2.7.5", "com.google.code.gson" % "gson" % "2.8.1", "org.threeten" % "threetenbp" % "1.3.5" % "compile", + "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/samples/client/petstore-security-test/java/okhttp-gson/git_push.sh b/samples/client/petstore-security-test/java/okhttp-gson/git_push.sh index ed374619b13..ae01b182ae9 100644 --- a/samples/client/petstore-security-test/java/okhttp-gson/git_push.sh +++ b/samples/client/petstore-security-test/java/okhttp-gson/git_push.sh @@ -36,7 +36,7 @@ git_remote=`git remote` if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git else git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git diff --git a/samples/client/petstore-security-test/java/okhttp-gson/pom.xml b/samples/client/petstore-security-test/java/okhttp-gson/pom.xml index be10638bf71..e09ff26b992 100644 --- a/samples/client/petstore-security-test/java/okhttp-gson/pom.xml +++ b/samples/client/petstore-security-test/java/okhttp-gson/pom.xml @@ -1,217 +1,242 @@ - 4.0.0 - io.swagger - swagger-petstore-okhttp-gson - jar - swagger-petstore-okhttp-gson - 1.0.0 - https://github.com/swagger-api/swagger-codegen - Swagger Java - - scm:git:git@github.com:swagger-api/swagger-codegen.git - scm:git:git@github.com:swagger-api/swagger-codegen.git + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + io.swagger + swagger-petstore-okhttp-gson + jar + swagger-petstore-okhttp-gson + 1.0.0 https://github.com/swagger-api/swagger-codegen - - - 2.2.0 - + Swagger Java + + scm:git:git@github.com:swagger-api/swagger-codegen.git + scm:git:git@github.com:swagger-api/swagger-codegen.git + https://github.com/swagger-api/swagger-codegen + - - - Unlicense - http://www.apache.org/licenses/LICENSE-2.0.html *_/ ' \" =end -- \\r\\n \\n \\r - repo - - + + + Unlicense + http://www.apache.org/licenses/LICENSE-2.0.html *_/ ' \" =end -- \\r\\n \\n \\r + repo + + - - - Swagger - apiteam@swagger.io - Swagger - http://swagger.io - - + + + Swagger + apiteam@swagger.io + Swagger + http://swagger.io + + - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - pertest - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - jar - test-jar - - - - - - + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + - - org.codehaus.mojo - build-helper-maven-plugin - 1.10 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.4 - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + - - - + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + - - - io.swagger - swagger-annotations - ${swagger-core-version} - - - com.squareup.okhttp - okhttp - ${okhttp-version} - - - com.squareup.okhttp - logging-interceptor - ${okhttp-version} - - - com.google.code.gson - gson - ${gson-version} - - - org.threeten - threetenbp - ${threetenbp-version} - - - - junit - junit - ${junit-version} - test - - - - 1.7 - ${java.version} - ${java.version} - 1.5.15 - 2.7.5 - 2.8.1 - 1.3.5 - 1.0.0 - 4.12 - UTF-8 - + + + io.swagger + swagger-annotations + ${swagger-core-version} + + + com.squareup.okhttp + okhttp + ${okhttp-version} + + + com.squareup.okhttp + logging-interceptor + ${okhttp-version} + + + com.google.code.gson + gson + ${gson-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + + org.threeten + threetenbp + ${threetenbp-version} + + + + junit + junit + ${junit-version} + test + + + + 1.7 + ${java.version} + ${java.version} + 1.8.0 + 1.5.15 + 2.7.5 + 2.8.1 + 1.3.5 + 1.0.0 + 4.12 + UTF-8 + diff --git a/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/io/swagger/client/JSON.java b/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/io/swagger/client/JSON.java index 1c06ba2a65f..62a4bca746a 100644 --- a/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/io/swagger/client/JSON.java +++ b/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/io/swagger/client/JSON.java @@ -20,10 +20,15 @@ import com.google.gson.internal.bind.util.ISO8601Utils; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonElement; +import io.gsonfire.GsonFireBuilder; +import io.gsonfire.TypeSelector; import org.threeten.bp.LocalDate; import org.threeten.bp.OffsetDateTime; import org.threeten.bp.format.DateTimeFormatter; +import io.swagger.client.model.*; + import java.io.IOException; import java.io.StringReader; import java.lang.reflect.Type; @@ -31,6 +36,8 @@ import java.text.ParseException; import java.text.ParsePosition; import java.util.Date; +import java.util.Map; +import java.util.HashMap; public class JSON { private Gson gson; @@ -40,8 +47,30 @@ public class JSON { private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder() + ; + return fireBuilder.createGsonBuilder(); + } + + private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if(null == element) { + throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); + } + + private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue.toUpperCase()); + if(null == clazz) { + throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; + } + public JSON() { - gson = new GsonBuilder() + gson = createGson() .registerTypeAdapter(Date.class, dateTypeAdapter) .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) diff --git a/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelReturn.java index 3f716d81dfd..2e01ee0d46a 100644 --- a/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore-security-test/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelReturn.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore-security-test/java/okhttp-gson/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore-security-test/java/okhttp-gson/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..c57a4a722cf --- /dev/null +++ b/samples/client/petstore-security-test/java/okhttp-gson/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,58 @@ +/* + * Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end -- + * + * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r + * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore-security-test/java/okhttp-gson/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore-security-test/java/okhttp-gson/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..0b5829a7558 --- /dev/null +++ b/samples/client/petstore-security-test/java/okhttp-gson/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end -- + * + * OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r + * Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r + * + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/feign/README.md b/samples/client/petstore/java/feign/README.md index d5d447e2865..debee3090f7 100644 --- a/samples/client/petstore/java/feign/README.md +++ b/samples/client/petstore/java/feign/README.md @@ -34,7 +34,7 @@ After the client library is installed/deployed, you can use it in your Maven pro ## 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/feign/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index 7fe69e168fd..835e61cf560 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -122,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java index 590f36c0ae0..dd67c86fcc1 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Animal.java @@ -110,9 +110,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/AnimalFarm.java index 0b1d6a74cc6..77debcbb4bf 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -55,9 +55,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index b7e59a030a4..a8dbad3c79b 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index fdfeb6856f3..fe3aa91fa0b 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ArrayTest.java index 62665c2536a..8ea0e220981 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ArrayTest.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Capitalization.java index a72b0a72f46..9d3ad009209 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Capitalization.java @@ -195,9 +195,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Cat.java index b882da0ad90..9d37d2ddc2c 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Cat.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Category.java index 464f4375c4b..c8aa31c3b31 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Category.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ClassModel.java index 4f764fde68d..001903b555b 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ClassModel.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Client.java index a7c4253499c..2744720fca8 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Client.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Dog.java index 7de179b2ade..8543a31fff5 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Dog.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/EnumArrays.java index 12caa480285..b1fa858c53b 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/EnumArrays.java @@ -183,9 +183,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/EnumTest.java index 93d0da037b6..d9ac9c73d07 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/EnumTest.java @@ -257,9 +257,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/FormatTest.java index 4118656d29e..6b1493aa0fb 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/FormatTest.java @@ -370,9 +370,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 6dc9f12c4b8..1c583390fdc 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/MapTest.java index e6344a1df0f..5d84882844d 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/MapTest.java @@ -157,9 +157,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 29bfc7e8c08..51d69a4d4bd 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -140,9 +140,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Model200Response.java index 58624475e43..b1919c97d7d 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Model200Response.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ModelApiResponse.java index b010e53b48c..8e8c9ce43fb 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -126,9 +126,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ModelReturn.java index 27d08557248..106b625f889 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ModelReturn.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Name.java index f2b9b1703bd..8c7b16d11d6 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Name.java @@ -132,9 +132,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/NumberOnly.java index ec93aba0531..1657a8eabdd 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/NumberOnly.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Order.java index 6976ceb8fba..f2956b3405d 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Order.java @@ -233,9 +233,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/OuterComposite.java index 02c16a99b70..332bd7964b3 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/OuterComposite.java @@ -127,9 +127,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Pet.java index 4c351dec3e4..52c4a0c01b7 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Pet.java @@ -249,9 +249,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index 76f8a912f36..aae35f87ff2 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/SpecialModelName.java index 784eb8baca8..d9531b57cb8 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Tag.java index 1cf2f5bc5e6..3485e1392c8 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Tag.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/User.java index de5bc439c5a..103d935054d 100644 --- a/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/User.java @@ -229,7 +229,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -241,9 +241,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeApiTest.java index bc6cb13b3b2..0e01d8c37bc 100644 --- a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -168,4 +168,33 @@ public void testEnumParametersTestQueryMap() { // TODO: test validations } + /** + * test inline additionalProperties + * + * + */ + @Test + public void testInlineAdditionalPropertiesTest() { + Object param = null; + // api.testInlineAdditionalProperties(param); + + // TODO: test validations + } + + + /** + * test json serialization of form data + * + * + */ + @Test + public void testJsonFormDataTest() { + String param = null; + String param2 = null; + // api.testJsonFormData(param, param2); + + // TODO: test validations + } + + } diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java index 77930522c3c..515a9f02c5e 100644 --- a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java @@ -35,5 +35,6 @@ public void testClassnameTest() { // TODO: test validations } + } diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/PetApiTest.java index c27524de1f6..9d295a6c163 100644 --- a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/PetApiTest.java +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/PetApiTest.java @@ -1,251 +1,177 @@ package io.swagger.client.api; -import io.swagger.TestUtils; - import io.swagger.client.ApiClient; -import io.swagger.client.model.*; - -import java.io.BufferedWriter; import java.io.File; -import java.io.FileWriter; +import io.swagger.client.model.ModelApiResponse; +import io.swagger.client.model.Pet; +import org.junit.Before; +import org.junit.Test; + import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; -import okhttp3.mockwebserver.MockResponse; -import okhttp3.mockwebserver.MockWebServer; -import okhttp3.mockwebserver.RecordedRequest; -import org.junit.*; -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.*; - +/** + * API tests for PetApi + */ public class PetApiTest { - ApiClient apiClient; - PetApi api; - MockWebServer localServer; - ApiClient localClient; + + private PetApi api; @Before public void setup() { - apiClient = new ApiClient(); - api = apiClient.buildClient(PetApi.class); - localServer = new MockWebServer(); - localClient = new ApiClient(); + api = new ApiClient().buildClient(PetApi.class); } + + /** + * Add a new pet to the store + * + * + */ @Test - public void testApiClient() { - // the default api client is used - assertEquals("http://petstore.swagger.io:80/v2", apiClient.getBasePath()); - - ApiClient newClient = new ApiClient(); - newClient.setBasePath("http://example.com"); + public void addPetTest() { + Pet body = null; + // api.addPet(body); - assertEquals("http://example.com", newClient.getBasePath()); + // TODO: test validations } + + /** + * Deletes a pet + * + * + */ @Test - public void testCreateAndGetPet() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); - - Pet fetched = api.getPetById(pet.getId()); - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); + public void deletePetTest() { + Long petId = null; + String apiKey = null; + // api.deletePet(petId, apiKey); + + // TODO: test validations } + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + */ @Test - public void testUpdatePet() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); - - api.updatePet(pet); + public void findPetsByStatusTest() { + List status = null; + // List response = api.findPetsByStatus(status); - 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 + * + * This tests the overload of the method that uses a Map for query parameters instead of + * listing them out individually. + */ @Test - public void testFindPetsByStatus() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - - api.updatePet(pet); - - List pets = api.findPetsByStatus(Collections.singletonList("available")); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - - assertTrue(found); - + public void findPetsByStatusTestQueryMap() { PetApi.FindPetsByStatusQueryParams queryParams = new PetApi.FindPetsByStatusQueryParams() - .status(Arrays.asList(new String[]{"available"})); - pets = api.findPetsByStatus(queryParams); - assertNotNull(pets); - - found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - - assertTrue(found); - } + .status(null); + // List response = api.findPetsByStatus(queryParams); + // TODO: test validations + } + + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + */ @Test - public void testFindPetsByTags() throws Exception { - Pet pet = createRandomPet(); - pet.setName("monster"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - - List tags = new ArrayList<>(); - Tag tag1 = new Tag(); - tag1.setName("friendly"); - tags.add(tag1); - pet.setTags(tags); - - api.updatePet(pet); - - List pets = api.findPetsByTags(Collections.singletonList("friendly")); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - assertTrue(found); + public void findPetsByTagsTest() { + List tags = null; + // List response = api.findPetsByTags(tags); - PetApi.FindPetsByTagsQueryParams queryParams = new PetApi.FindPetsByTagsQueryParams() - .tags(Arrays.asList(new String[]{"friendly"})); - pets = api.findPetsByTags(queryParams); - assertNotNull(pets); - - found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - assertTrue(found); + // TODO: test validations } + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * + * This tests the overload of the method that uses a Map for query parameters instead of + * listing them out individually. + */ @Test - public void testUpdatePetWithForm() throws Exception { - Pet pet = createRandomPet(); - pet.setName("frank"); - api.addPet(pet); - - Pet fetched = api.getPetById(pet.getId()); - - api.updatePetWithForm(fetched.getId(), "furt", null); - Pet updated = api.getPetById(fetched.getId()); + public void findPetsByTagsTestQueryMap() { + PetApi.FindPetsByTagsQueryParams queryParams = new PetApi.FindPetsByTagsQueryParams() + .tags(null); + // List response = api.findPetsByTags(queryParams); - assertEquals(updated.getName(), "furt"); + // TODO: test validations } - + + /** + * Find pet by ID + * + * Returns a single pet + */ @Test - public void testDeletePet() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); - - Pet fetched = api.getPetById(pet.getId()); - api.deletePet(fetched.getId(), null); - - try { - api.getPetById(fetched.getId()); - fail("expected an error"); - } catch (Exception e) { -// assertEquals(404, e.getCode()); - } + public void getPetByIdTest() { + Long petId = null; + // Pet response = api.getPetById(petId); + + // TODO: test validations } + + /** + * Update an existing pet + * + * + */ @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(); + public void updatePetTest() { + Pet body = null; + // api.updatePet(body); - api.uploadFile(pet.getId(), "a test file", new File(file.getAbsolutePath())); + // TODO: test validations } + + /** + * Updates a pet in the store with form data + * + * + */ @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("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("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()); - } + public void updatePetWithFormTest() { + Long petId = null; + String name = null; + String status = null; + // api.updatePetWithForm(petId, name, status); - @Test - public void testCSVDelimitedArray() throws Exception { - localServer.enqueue(new MockResponse().setBody("[{\"id\":5,\"name\":\"rocky\"}]")); - localServer.start(); - PetApi api = localClient.setBasePath(localServer.url("/").toString()).buildClient(PetApi.class); - PetApi.FindPetsByTagsQueryParams queryParams = new PetApi.FindPetsByTagsQueryParams() - .tags(Arrays.asList("friendly","energetic")); - List pets = api.findPetsByTags(queryParams); - assertNotNull(pets); - RecordedRequest request = localServer.takeRequest(); - assertThat(request.getPath()).contains("tags=friendly,energetic"); - localServer.shutdown(); + // TODO: test validations } - 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("http://foo.bar.com/1", "http://foo.bar.com/2"); - pet.setPhotoUrls(photos); + + /** + * uploads an image + * + * + */ + @Test + public void uploadFileTest() { + Long petId = null; + String additionalMetadata = null; + File file = null; + // ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - return pet; + // TODO: test validations } + + } diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/StoreApiTest.java index 5492695f8aa..d72a3687cf2 100644 --- a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/StoreApiTest.java @@ -1,82 +1,81 @@ package io.swagger.client.api; -import feign.FeignException; - -import io.swagger.TestUtils; - import io.swagger.client.ApiClient; -import io.swagger.client.model.*; +import io.swagger.client.model.Order; +import org.junit.Before; +import org.junit.Test; -import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; import java.util.Map; -import org.junit.*; -import org.threeten.bp.OffsetDateTime; - -import static org.junit.Assert.*; - +/** + * API tests for StoreApi + */ public class StoreApiTest { + private StoreApi api; @Before public void setup() { - ApiClient apiClient = new ApiClient(); - api = apiClient.buildClient(StoreApi.class); + api = new ApiClient().buildClient(StoreApi.class); } + + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + */ @Test - public void testGetInventory() throws Exception { - Map inventory = api.getInventory(); - assertTrue(inventory.keySet().size() > 0); + public void deleteOrderTest() { + String orderId = null; + // api.deleteOrder(orderId); + + // TODO: test validations } + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + */ @Test - public void testPlaceOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); + public void getInventoryTest() { + // Map response = api.getInventory(); - 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 } + + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + */ @Test - public void testDeleteOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); + public void getOrderByIdTest() { + Long orderId = null; + // Order response = api.getOrderById(orderId); - Order fetched = api.getOrderById(order.getId()); - assertEquals(fetched.getId(), order.getId()); - - api.deleteOrder(order.getId().toString()); - - try { - api.getOrderById(order.getId()); - fail("expected an error"); - } catch (FeignException e) { - assertTrue(e.getMessage().startsWith("status 404 ")); - } + // TODO: test validations } - 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); - } + + /** + * Place an order for a pet + * + * + */ + @Test + public void placeOrderTest() { + Order body = null; + // Order response = api.placeOrder(body); - return order; + // TODO: test validations } + + } diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/UserApiTest.java index d1c9b67f722..d41fc7355f1 100644 --- a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/api/UserApiTest.java @@ -1,93 +1,156 @@ package io.swagger.client.api; -import io.swagger.TestUtils; - import io.swagger.client.ApiClient; -import io.swagger.client.model.*; - -import java.util.Arrays; - -import org.junit.*; -import static org.junit.Assert.*; - +import io.swagger.client.model.User; +import org.junit.Before; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for UserApi + */ public class UserApiTest { + private UserApi api; @Before public void setup() { - ApiClient apiClient = new ApiClient(); - api = apiClient.buildClient(UserApi.class); + api = new ApiClient().buildClient(UserApi.class); } + + /** + * Create user + * + * This can only be done by the logged in user. + */ @Test - public void testCreateUser() throws Exception { - User user = createUser(); - - api.createUser(user); + public void createUserTest() { + User body = null; + // api.createUser(body); - User fetched = api.getUserByName(user.getUsername()); - assertEquals(user.getId(), fetched.getId()); + // TODO: test validations } + + /** + * Creates list of users with given input array + * + * + */ @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() { + List body = null; + // api.createUsersWithArrayInput(body); - api.createUsersWithArrayInput(Arrays.asList(user1, user2)); + // TODO: test validations + } + + + /** + * Creates list of users with given input array + * + * + */ + @Test + public void createUsersWithListInputTest() { + List body = null; + // api.createUsersWithListInput(body); - 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. + */ @Test - public void testCreateUsersWithList() throws Exception { - User user1 = createUser(); - user1.setUsername("user" + user1.getId()); - User user2 = createUser(); - user2.setUsername("user" + user2.getId()); + public void deleteUserTest() { + String username = null; + // api.deleteUser(username); - api.createUsersWithListInput(Arrays.asList(user1, user2)); + // TODO: test validations + } - User fetched = api.getUserByName(user1.getUsername()); - assertEquals(user1.getId(), fetched.getId()); + + /** + * Get user by user name + * + * + */ + @Test + public void getUserByNameTest() { + String username = null; + // User response = api.getUserByName(username); + + // TODO: test validations } - // ignore for the time being, please refer to the following for more info: - // https://github.com/swagger-api/swagger-codegen/issues/1660 - @Ignore @Test - public void testLoginUser() throws Exception { - User user = createUser(); - api.createUser(user); + + /** + * Logs user into the system + * + * + */ + @Test + public void loginUserTest() { + String username = null; + String password = null; + // String response = api.loginUser(username, password); - String token = api.loginUser(user.getUsername(), user.getPassword()); - assertTrue(token.startsWith("logged in user session:")); + // TODO: test validations + } + /** + * Logs user into the system + * + * + * + * This tests the overload of the method that uses a Map for query parameters instead of + * listing them out individually. + */ + @Test + public void loginUserTestQueryMap() { UserApi.LoginUserQueryParams queryParams = new UserApi.LoginUserQueryParams() - .username(user.getUsername()) - .password(user.getPassword()); - token = api.loginUser(queryParams); - assertTrue(token.startsWith("logged in user session:")); - } + .username(null) + .password(null); + // String response = api.loginUser(queryParams); + // TODO: test validations + } + + /** + * Logs out current logged in user session + * + * + */ @Test - public void logoutUser() throws Exception { - api.logoutUser(); + public void logoutUserTest() { + // api.logoutUser(); + + // TODO: test validations } - 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; + + /** + * Updated user + * + * This can only be done by the logged in user. + */ + @Test + public void updateUserTest() { + String username = null; + User body = null; + // api.updateUser(username, body); + + // TODO: test validations } + + } diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..b4f92a36c34 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..64c259e27a8 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..f49a83b96c0 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..0835812b967 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..e1a135877f8 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..85df56981e1 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..37f246cef46 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..4c600ad6bfe --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..7c1c36eb1d8 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..0af24ee94c2 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..c5776ad73c1 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..391a26433df --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..c0afa7dcebd --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..173c6e24c09 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..98234657055 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..5d83bc6e110 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..39d72d21e2c --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..658e220c498 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..e387d196f41 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..1c5c0137b50 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8d7dbfe913b --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..aaf592b2eee --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..3eae383b79b --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..35b9473b6c5 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..0a9716c9783 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..f74d363aec1 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..4ec6e0ff791 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..e0f6a407ed5 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..2cd54e5cfc0 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..8cfe2bcdb76 --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..2568fd1fdaf --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,65 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/feign/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index 7fe69e168fd..835e61cf560 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -122,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Animal.java index 590f36c0ae0..dd67c86fcc1 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Animal.java @@ -110,9 +110,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/AnimalFarm.java index 0b1d6a74cc6..77debcbb4bf 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -55,9 +55,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index b7e59a030a4..a8dbad3c79b 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index fdfeb6856f3..fe3aa91fa0b 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ArrayTest.java index 62665c2536a..8ea0e220981 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ArrayTest.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Capitalization.java index a72b0a72f46..9d3ad009209 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Capitalization.java @@ -195,9 +195,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Cat.java index b882da0ad90..9d37d2ddc2c 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Cat.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Category.java index 464f4375c4b..c8aa31c3b31 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Category.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ClassModel.java index 4f764fde68d..001903b555b 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ClassModel.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Client.java index a7c4253499c..2744720fca8 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Client.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Dog.java index 7de179b2ade..8543a31fff5 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Dog.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/EnumArrays.java index 12caa480285..b1fa858c53b 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/EnumArrays.java @@ -183,9 +183,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/EnumTest.java index 93d0da037b6..d9ac9c73d07 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/EnumTest.java @@ -257,9 +257,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/FormatTest.java index 4118656d29e..6b1493aa0fb 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/FormatTest.java @@ -370,9 +370,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 6dc9f12c4b8..1c583390fdc 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/MapTest.java index e6344a1df0f..5d84882844d 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/MapTest.java @@ -157,9 +157,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 29bfc7e8c08..51d69a4d4bd 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -140,9 +140,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Model200Response.java index 58624475e43..b1919c97d7d 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Model200Response.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ModelApiResponse.java index b010e53b48c..8e8c9ce43fb 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -126,9 +126,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ModelReturn.java index 27d08557248..106b625f889 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ModelReturn.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Name.java index f2b9b1703bd..8c7b16d11d6 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Name.java @@ -132,9 +132,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/NumberOnly.java index ec93aba0531..1657a8eabdd 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/NumberOnly.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Order.java index 6976ceb8fba..f2956b3405d 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Order.java @@ -233,9 +233,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/OuterComposite.java index 02c16a99b70..332bd7964b3 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/OuterComposite.java @@ -127,9 +127,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Pet.java index 4c351dec3e4..52c4a0c01b7 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Pet.java @@ -249,9 +249,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index 76f8a912f36..aae35f87ff2 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/SpecialModelName.java index 784eb8baca8..d9531b57cb8 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Tag.java index 1cf2f5bc5e6..3485e1392c8 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/Tag.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/User.java index de5bc439c5a..103d935054d 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/io/swagger/client/model/User.java @@ -229,7 +229,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -241,9 +241,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..b4f92a36c34 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..64c259e27a8 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..f49a83b96c0 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..0835812b967 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..e1a135877f8 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..85df56981e1 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..37f246cef46 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..4c600ad6bfe --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..7c1c36eb1d8 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..0af24ee94c2 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..c5776ad73c1 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..391a26433df --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..c0afa7dcebd --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..173c6e24c09 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..98234657055 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..5d83bc6e110 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..39d72d21e2c --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..658e220c498 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..e387d196f41 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..1c5c0137b50 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8d7dbfe913b --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..aaf592b2eee --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..3eae383b79b --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..35b9473b6c5 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..0a9716c9783 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..f74d363aec1 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..4ec6e0ff791 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..e0f6a407ed5 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..2cd54e5cfc0 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..8cfe2bcdb76 --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..2568fd1fdaf --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,65 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/google-api-client/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/jersey1/README.md b/samples/client/petstore/java/jersey1/README.md index 264fe34c81a..6d2509300df 100644 --- a/samples/client/petstore/java/jersey1/README.md +++ b/samples/client/petstore/java/jersey1/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 - DateTime dateTime = new DateTime(); // DateTime | 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,12 +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* | [**testEnumQueryParameters**](docs/FakeApi.md#testEnumQueryParameters) | **GET** /fake | To test enum query 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 @@ -110,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 @@ -132,9 +131,11 @@ 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) - - [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) @@ -147,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 @@ -163,6 +168,16 @@ 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 + ### petstore_auth - **Type**: OAuth @@ -175,7 +190,7 @@ Authentication schemes defined for the API: ## 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/jersey1/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index 7fe69e168fd..835e61cf560 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -122,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Animal.java index 590f36c0ae0..dd67c86fcc1 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Animal.java @@ -110,9 +110,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/AnimalFarm.java index 0b1d6a74cc6..77debcbb4bf 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -55,9 +55,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index b7e59a030a4..a8dbad3c79b 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index fdfeb6856f3..fe3aa91fa0b 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ArrayTest.java index 62665c2536a..8ea0e220981 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ArrayTest.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Capitalization.java index a72b0a72f46..9d3ad009209 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Capitalization.java @@ -195,9 +195,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Cat.java index b882da0ad90..9d37d2ddc2c 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Cat.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Category.java index 464f4375c4b..c8aa31c3b31 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Category.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ClassModel.java index 4f764fde68d..001903b555b 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ClassModel.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Client.java index a7c4253499c..2744720fca8 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Client.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Dog.java index 7de179b2ade..8543a31fff5 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Dog.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/EnumArrays.java index 12caa480285..b1fa858c53b 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/EnumArrays.java @@ -183,9 +183,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/EnumTest.java index 93d0da037b6..d9ac9c73d07 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/EnumTest.java @@ -257,9 +257,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/FormatTest.java index 4118656d29e..6b1493aa0fb 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/FormatTest.java @@ -370,9 +370,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 6dc9f12c4b8..1c583390fdc 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/MapTest.java index e6344a1df0f..5d84882844d 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/MapTest.java @@ -157,9 +157,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 29bfc7e8c08..51d69a4d4bd 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -140,9 +140,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Model200Response.java index 58624475e43..b1919c97d7d 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Model200Response.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ModelApiResponse.java index b010e53b48c..8e8c9ce43fb 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -126,9 +126,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ModelReturn.java index 27d08557248..106b625f889 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ModelReturn.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Name.java index f2b9b1703bd..8c7b16d11d6 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Name.java @@ -132,9 +132,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/NumberOnly.java index ec93aba0531..1657a8eabdd 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/NumberOnly.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Order.java index 6976ceb8fba..f2956b3405d 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Order.java @@ -233,9 +233,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/OuterComposite.java index 02c16a99b70..332bd7964b3 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/OuterComposite.java @@ -127,9 +127,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Pet.java index 4c351dec3e4..52c4a0c01b7 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Pet.java @@ -249,9 +249,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index 76f8a912f36..aae35f87ff2 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/SpecialModelName.java index 784eb8baca8..d9531b57cb8 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Tag.java index 1cf2f5bc5e6..3485e1392c8 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/Tag.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/User.java index de5bc439c5a..103d935054d 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/model/User.java @@ -229,7 +229,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -241,9 +241,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/api/FakeApiTest.java index c564001ad70..0e4979b2906 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/jersey1/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 @@ /** * 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/jersey1/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/api/PetApiTest.java index fe6424a3f9e..349a55d93dc 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/api/PetApiTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/api/PetApiTest.java @@ -1,301 +1,170 @@ -package io.swagger.client.api; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.*; +/* + * 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. + */ -import io.swagger.TestUtils; -import io.swagger.client.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; +package io.swagger.client.api; -import java.io.BufferedWriter; +import io.swagger.client.ApiException; import java.io.File; -import java.io.FileWriter; -import java.util.*; - -import org.junit.*; -import static org.junit.Assert.*; - +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; +import java.util.List; +import java.util.Map; + +/** + * API tests for PetApi + */ +@Ignore public class PetApiTest { - private PetApi api; - private ObjectMapper mapper; - - @Before - public void setup() { - api = new PetApi(); - // setup authentication - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) api.getApiClient().getAuthentication("api_key"); - apiKeyAuth.setApiKey("special-key"); - } - - @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()); - - 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()); - } + private final PetApi api = new PetApi(); + + + /** + * Add a new pet to the store + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testCreateAndGetPet() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); + public void addPetTest() throws ApiException { + Pet body = null; + api.addPet(body); - 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 } - - /* - @Test - public void testCreateAndGetPetWithByteArray() throws Exception { - Pet pet = createRandomPet(); - byte[] bytes = serializeJson(pet).getBytes(); - api.addPetUsingByteArray(bytes); - - byte[] fetchedBytes = api.petPetIdtestingByteArraytrueGet(pet.getId()); - Pet fetched = deserializeJson(new String(fetchedBytes), Pet.class); - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); - } - - @Test - public void testGetPetByIdInObject() throws Exception { - Pet pet = new Pet(); - pet.setId(TestUtils.nextId()); - pet.setName("pet " + pet.getId()); - - 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")); - } - */ - + + /** + * Deletes a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testUpdatePet() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); + public void deletePetTest() throws ApiException { + Long petId = null; + String apiKey = null; + api.deletePet(petId, apiKey); - 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 } - + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testFindPetsByStatus() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - - api.updatePet(pet); - - List pets = api.findPetsByStatus(Collections.singletonList("available")); - assertNotNull(pets); + public void findPetsByStatusTest() throws ApiException { + List status = null; + List response = api.findPetsByStatus(status); - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - - assertTrue(found); + // 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 testFindPetsByTags() throws Exception { - Pet pet = createRandomPet(); - pet.setName("monster"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - - List tags = new ArrayList(); - Tag tag1 = new Tag(); - tag1.setName("friendly"); - tags.add(tag1); - pet.setTags(tags); + public void findPetsByTagsTest() throws ApiException { + List tags = null; + List response = api.findPetsByTags(tags); - api.updatePet(pet); - - List pets = api.findPetsByTags(Collections.singletonList("friendly")); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - assertTrue(found); + // TODO: test validations } - + + /** + * Find pet by ID + * + * Returns a single pet + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testUpdatePetWithForm() throws Exception { - Pet pet = createRandomPet(); - pet.setName("frank"); - api.addPet(pet); - - Pet fetched = api.getPetById(pet.getId()); + public void getPetByIdTest() throws ApiException { + Long petId = null; + Pet response = api.getPetById(petId); - api.updatePetWithForm(fetched.getId(), "furt", null); - Pet updated = api.getPetById(fetched.getId()); - - assertEquals(updated.getName(), "furt"); + // TODO: test validations } - + + /** + * Update an existing pet + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testDeletePet() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); - - Pet fetched = api.getPetById(pet.getId()); - api.deletePet(fetched.getId(), null); + public void updatePetTest() throws ApiException { + Pet body = null; + api.updatePet(body); - try { - fetched = api.getPetById(fetched.getId()); - fail("expected an error"); - } catch (ApiException e) { - assertEquals(404, e.getCode()); - } + // TODO: test validations } - + + /** + * Updates a pet in the store with form data + * + * + * + * @throws ApiException + * if the Api call fails + */ @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(); + public void updatePetWithFormTest() throws ApiException { + Long petId = null; + String name = null; + String status = null; + api.updatePetWithForm(petId, name, status); - api.uploadFile(pet.getId(), "a test file", new File(file.getAbsolutePath())); + // TODO: test validations } - + + /** + * uploads an image + * + * + * + * @throws ApiException + * if the Api call fails + */ @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("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("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"); + public void uploadFileTest() throws ApiException { + Long petId = null; + String additionalMetadata = null; + File file = null; + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - Category category = new Category(); - category.setName("really-happy"); - - pet.setCategory(category); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - List photos = Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"); - pet.setPhotoUrls(photos); - - return pet; - } - - /*private String serializeJson(Object o) { - if (mapper == null) { - mapper = createObjectMapper(); - } - try { - return mapper.writeValueAsString(o); - } catch (Exception e) { - throw new RuntimeException(e); - } + // TODO: test validations } - - private T deserializeJson(String json, Class klass) { - if (mapper == null) { - mapper = createObjectMapper(); - } - try { - return mapper.readValue(json, klass); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - private ObjectMapper createObjectMapper() { - ObjectMapper mapper = new ObjectMapper(); - mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); - mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); - mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); - mapper.registerModule(new JodaModule()); - return mapper; - }*/ + } diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/api/StoreApiTest.java index 215b06feff8..bef0884a2da 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/api/StoreApiTest.java @@ -1,102 +1,98 @@ -package io.swagger.client.api; +/* + * 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. + */ -import io.swagger.TestUtils; -import io.swagger.client.ApiException; +package io.swagger.client.api; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; +import io.swagger.client.ApiException; +import io.swagger.client.model.Order; +import org.junit.Test; +import org.junit.Ignore; -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); - /* - @Test - public void testGetInventoryInObject() throws Exception { - Object inventoryObj = api.getInventoryInObject(); - assertTrue(inventoryObj instanceof Map); - - 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 } - */ - + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testPlaceOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); + public void getInventoryTest() throws ApiException { + Map response = api.getInventory(); - 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 } - + + /** + * 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 testDeleteOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); - - Order fetched = api.getOrderById(order.getId()); - assertEquals(fetched.getId(), order.getId()); + public void getOrderByIdTest() throws ApiException { + Long orderId = null; + Order response = api.getOrderById(orderId); - api.deleteOrder(String.valueOf(order.getId())); - - try { - api.getOrderById(order.getId()); - // fail("expected an error"); - } catch (ApiException e) { - // ok - } + // TODO: test validations } + + /** + * Place an order for a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void placeOrderTest() throws ApiException { + Order body = null; + Order response = api.placeOrder(body); - 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/jersey1/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/api/UserApiTest.java index c7fb92d2552..4455b3920b9 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/api/UserApiTest.java @@ -1,88 +1,164 @@ -package io.swagger.client.api; +/* + * 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. + */ -import io.swagger.TestUtils; -import io.swagger.client.api.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; +package io.swagger.client.api; -import java.util.Arrays; +import io.swagger.client.ApiException; +import io.swagger.client.model.User; +import org.junit.Test; +import org.junit.Ignore; -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 deleteUserTest() throws ApiException { + String username = null; + api.deleteUser(username); + // TODO: test validations + } + + /** + * Get user by user name + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testLoginUser() throws Exception { - User user = createUser(); - api.createUser(user); + public void getUserByNameTest() throws ApiException { + String username = null; + User response = api.getUserByName(username); - String token = api.loginUser(user.getUsername(), user.getPassword()); - assertTrue(token.startsWith("logged in user session:")); + // 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 logoutUser() throws Exception { + 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); + // 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); - return user; + // TODO: test validations } + } diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..b4f92a36c34 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..64c259e27a8 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..f49a83b96c0 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..0835812b967 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..e1a135877f8 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..85df56981e1 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..37f246cef46 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..4c600ad6bfe --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..7c1c36eb1d8 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..0af24ee94c2 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..c5776ad73c1 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..391a26433df --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..c0afa7dcebd --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..173c6e24c09 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..98234657055 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..5d83bc6e110 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..39d72d21e2c --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..658e220c498 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..e387d196f41 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..1c5c0137b50 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8d7dbfe913b --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..aaf592b2eee --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..3eae383b79b --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..35b9473b6c5 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..0a9716c9783 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..f74d363aec1 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..4ec6e0ff791 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..e0f6a407ed5 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..2cd54e5cfc0 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..8cfe2bcdb76 --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..2568fd1fdaf --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,65 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/jersey1/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ 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 ea5261dff95..b53485ad7d9 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/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index 2be1838838c..4be2f9e03fc 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -122,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java index b64a9d4388d..e9ebb73a360 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Animal.java @@ -110,9 +110,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AnimalFarm.java index 382a9368aa0..888ba63bde2 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -55,9 +55,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index f4b8c8c9fb3..060e8d31756 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index 7eb9c03fc79..7c4edb5e2b1 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayTest.java index 11505132cd9..e955487ec31 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ArrayTest.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Capitalization.java index 8bf2311949e..5c33c173c90 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Capitalization.java @@ -195,9 +195,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Cat.java index 958c985cb92..7a77999303b 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Cat.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Category.java index 1853e6d1589..b965af92212 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Category.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ClassModel.java index 4f3a3145863..5869439d00f 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ClassModel.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Client.java index d85880077b5..09739a8b0e6 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Client.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Dog.java index 8c67027ad96..0b1dc534fb3 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Dog.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumArrays.java index fa58bb72b8c..48d44ddf464 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumArrays.java @@ -183,9 +183,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumTest.java index 1ff3b541245..ca5979b936f 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/EnumTest.java @@ -257,9 +257,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/FormatTest.java index 1eac24d55c6..8cff7be0e76 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/FormatTest.java @@ -370,9 +370,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index cbf3cb3f955..0d2ee21366a 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MapTest.java index 6e0a97bbc72..9e0bb4ff887 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MapTest.java @@ -157,9 +157,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5ff907a7900..59c0f0a7253 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -140,9 +140,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Model200Response.java index b32ea0a16c4..f5b95a9e130 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Model200Response.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelApiResponse.java index 764534696b7..67ae297fc51 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -126,9 +126,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelReturn.java index f8c0979d43c..7e9d39076ce 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ModelReturn.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Name.java index a3c678b021f..0bfef27320c 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Name.java @@ -132,9 +132,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/NumberOnly.java index a4fffd86805..19b1a4a1666 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/NumberOnly.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Order.java index fba033c63b9..da9fe97eca0 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Order.java @@ -233,9 +233,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/OuterComposite.java index 0f84b926a5b..ab80d1174be 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/OuterComposite.java @@ -127,9 +127,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Pet.java index be3b82347e4..d4753014716 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Pet.java @@ -249,9 +249,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index 8aa0c00583e..f7d885319e7 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/SpecialModelName.java index 6c750b2d75d..b81a0a275b7 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Tag.java index c1d2ba92ee2..2628e27c18f 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/Tag.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/User.java index 04bfc454d25..15753d73c95 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/io/swagger/client/model/User.java @@ -229,7 +229,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -241,9 +241,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } 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 6bfbad5dfac..0e4979b2906 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,23 +30,88 @@ /** * API tests for FakeApi */ +@Ignore public class FakeApiTest { private final FakeApi api = new FakeApi(); /** - * To test \"client\" model + * + * + * 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); + Client response = api.testClientModel(body); // TODO: test validations } @@ -82,10 +137,10 @@ public void testEndpointParametersTest() throws ApiException { 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 void testEndpointParametersTest() throws ApiException { /** * To test enum parameters * - * + * To test enum parameters * * @throws ApiException * if the Api call fails @@ -106,9 +161,42 @@ public void testEnumParametersTest() throws ApiException { 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 87594e9a61f..349a55d93dc 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 @@ /** * 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 void addPetTest() throws ApiException { 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 void deletePetTest() throws ApiException { @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 void findPetsByStatusTest() throws ApiException { @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 void findPetsByTagsTest() throws ApiException { @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 void getPetByIdTest() throws ApiException { @Test public void updatePetTest() throws ApiException { Pet body = null; - // api.updatePet(body); + api.updatePet(body); // TODO: test validations } @@ -154,7 +144,7 @@ public void updatePetWithFormTest() throws ApiException { 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 void uploadFileTest() throws ApiException { 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 f644c1ec73a..bef0884a2da 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 @@ 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 @@ /** * 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 void deleteOrderTest() throws ApiException { */ @Test public void getInventoryTest() throws ApiException { - // Map response = api.getInventory(); + Map response = api.getInventory(); // TODO: test validations } @@ -84,7 +74,7 @@ public void getInventoryTest() throws ApiException { @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 void getOrderByIdTest() throws ApiException { @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 f86ba413cdb..4455b3920b9 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 @@ 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 @@ /** * 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 void createUserTest() throws ApiException { @Test public void createUsersWithArrayInputTest() throws ApiException { List body = null; - // api.createUsersWithArrayInput(body); + api.createUsersWithArrayInput(body); // TODO: test validations } @@ -85,7 +75,7 @@ public void createUsersWithArrayInputTest() throws ApiException { @Test public void createUsersWithListInputTest() throws ApiException { List body = null; - // api.createUsersWithListInput(body); + api.createUsersWithListInput(body); // TODO: test validations } @@ -101,7 +91,7 @@ public void createUsersWithListInputTest() throws ApiException { @Test public void deleteUserTest() throws ApiException { String username = null; - // api.deleteUser(username); + api.deleteUser(username); // TODO: test validations } @@ -117,7 +107,7 @@ public void deleteUserTest() throws ApiException { @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 void getUserByNameTest() throws ApiException { 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 void loginUserTest() throws ApiException { */ @Test public void logoutUserTest() throws ApiException { - // api.logoutUser(); + api.logoutUser(); // TODO: test validations } @@ -166,7 +156,7 @@ public void logoutUserTest() throws ApiException { 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-java6/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..b4f92a36c34 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..64c259e27a8 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..f49a83b96c0 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..0835812b967 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..e1a135877f8 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..85df56981e1 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..37f246cef46 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..4c600ad6bfe --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..7c1c36eb1d8 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..0af24ee94c2 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..c5776ad73c1 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..391a26433df --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..c0afa7dcebd --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..173c6e24c09 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..98234657055 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..5d83bc6e110 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..39d72d21e2c --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..658e220c498 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..e387d196f41 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..1c5c0137b50 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8d7dbfe913b --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..aaf592b2eee --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..3eae383b79b --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..35b9473b6c5 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..0a9716c9783 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..f74d363aec1 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..4ec6e0ff791 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..e0f6a407ed5 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..2cd54e5cfc0 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..8cfe2bcdb76 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..2568fd1fdaf --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,65 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/jersey2-java6/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ 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 78f4711d060..8ceb02c6e3b 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/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index 0c24badae38..8865bc5b7a6 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -122,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Animal.java index 590f36c0ae0..dd67c86fcc1 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Animal.java @@ -110,9 +110,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/AnimalFarm.java index 0b1d6a74cc6..77debcbb4bf 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -55,9 +55,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index 5997b31cbd4..7028fb1f9e5 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index 2bc17f88eb3..c6aac8d602d 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ArrayTest.java index 6804a14e313..787c1f81cae 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ArrayTest.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Capitalization.java index a72b0a72f46..9d3ad009209 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Capitalization.java @@ -195,9 +195,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Cat.java index b882da0ad90..9d37d2ddc2c 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Cat.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Category.java index 464f4375c4b..c8aa31c3b31 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Category.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ClassModel.java index 4f764fde68d..001903b555b 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ClassModel.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Client.java index a7c4253499c..2744720fca8 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Client.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Dog.java index 7de179b2ade..8543a31fff5 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Dog.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/EnumArrays.java index 133a31f10b9..9d93f41ccdf 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/EnumArrays.java @@ -183,9 +183,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/EnumTest.java index 93d0da037b6..d9ac9c73d07 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/EnumTest.java @@ -257,9 +257,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/FormatTest.java index 3fba5124727..f758dc82950 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/FormatTest.java @@ -370,9 +370,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 6dc9f12c4b8..1c583390fdc 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/MapTest.java index 31a7dae7253..32198c109fc 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/MapTest.java @@ -157,9 +157,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 98c2ad2cc78..099aeb7feff 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -140,9 +140,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Model200Response.java index 58624475e43..b1919c97d7d 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Model200Response.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ModelApiResponse.java index b010e53b48c..8e8c9ce43fb 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -126,9 +126,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ModelReturn.java index 27d08557248..106b625f889 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ModelReturn.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Name.java index f2b9b1703bd..8c7b16d11d6 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Name.java @@ -132,9 +132,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/NumberOnly.java index ec93aba0531..1657a8eabdd 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/NumberOnly.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Order.java index 55f9a8dba21..81fd471eb1d 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Order.java @@ -233,9 +233,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/OuterComposite.java index 02c16a99b70..332bd7964b3 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/OuterComposite.java @@ -127,9 +127,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Pet.java index 6ece90bbfc3..5494a684ebd 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Pet.java @@ -249,9 +249,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index 76f8a912f36..aae35f87ff2 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/SpecialModelName.java index 784eb8baca8..d9531b57cb8 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Tag.java index 1cf2f5bc5e6..3485e1392c8 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/Tag.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/User.java index de5bc439c5a..103d935054d 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/io/swagger/client/model/User.java @@ -229,7 +229,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -241,9 +241,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } 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 1ea1e270634..9a7e76c1552 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 @@ /** * 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 694e9c152b0..349a55d93dc 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 @@ -package io.swagger.client.api; - -import com.fasterxml.jackson.databind.ObjectMapper; +/* + * 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. + */ -import io.swagger.TestUtils; -import io.swagger.client.*; -import io.swagger.client.api.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; +package io.swagger.client.api; -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()); - - Category category = new Category(); - category.setId(TestUtils.nextId()); - category.setName("category " + category.getId()); - pet.setCategory(category); + public void findPetsByTagsTest() throws ApiException { + List tags = null; + List response = api.findPetsByTags(tags); - 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"); - - api.updatePet(pet); + public void getPetByIdTest() throws ApiException { + Long petId = null; + Pet response = api.getPetById(petId); - 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); - - 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); + public void updatePetWithFormTest() throws ApiException { + Long petId = null; + String name = null; + String status = null; + api.updatePetWithForm(petId, name, status); - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - assertTrue(found); + // TODO: test validations } - - @Test - public void testUpdatePetWithForm() throws Exception { - Pet pet = createRandomPet(); - pet.setName("frank"); - api.addPet(pet); - - Pet fetched = api.getPetById(pet.getId()); - - api.updatePetWithForm(fetched.getId(), "furt", null); - Pet updated = api.getPetById(fetched.getId()); - - assertEquals(updated.getName(), "furt"); - } - + + /** + * uploads an image + * + * + * + * @throws ApiException + * if the Api call fails + */ @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); - } - } + public void uploadFileTest() throws ApiException { + Long petId = null; + String additionalMetadata = null; + File file = null; + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - 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 2d32880c43d..bef0884a2da 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 @@ -package io.swagger.client.api; +/* + * 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. + */ -import io.swagger.TestUtils; -import io.swagger.client.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; +package io.swagger.client.api; -import java.lang.reflect.Field; -import java.time.ZoneId; -import java.util.Map; -import java.text.SimpleDateFormat; +import io.swagger.client.ApiException; +import io.swagger.client.model.Order; +import org.junit.Test; +import org.junit.Ignore; -import java.time.OffsetDateTime; -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 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")); - } - - @Test - public void testGetInventory() throws Exception { - Map inventory = api.getInventory(); - assertTrue(inventory.keySet().size() > 0); - } - /* + 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 testGetInventoryInObject() throws Exception { - Object inventoryObj = api.getInventoryInObject(); - assertTrue(inventoryObj instanceof Map); + public void deleteOrderTest() throws ApiException { + String orderId = null; + api.deleteOrder(orderId); - 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 } - */ - + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testPlaceOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); + public void getInventoryTest() throws ApiException { + Map response = api.getInventory(); - 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 } - + + /** + * 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 testDeleteOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); - - Order fetched = api.getOrderById(order.getId()); - assertEquals(fetched.getId(), order.getId()); + public void getOrderByIdTest() throws ApiException { + Long orderId = null; + Order response = api.getOrderById(orderId); - api.deleteOrder(String.valueOf(order.getId())); - - try { - api.getOrderById(order.getId()); - // fail("expected an error"); - } catch (ApiException e) { - // ok - } + // TODO: test validations } + + /** + * Place an order for a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void placeOrderTest() throws ApiException { + Order body = null; + Order response = api.placeOrder(body); - 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 c7fb92d2552..4455b3920b9 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 @@ -package io.swagger.client.api; +/* + * 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. + */ -import io.swagger.TestUtils; -import io.swagger.client.api.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; +package io.swagger.client.api; -import java.util.Arrays; +import io.swagger.client.ApiException; +import io.swagger.client.model.User; +import org.junit.Test; +import org.junit.Ignore; -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 deleteUserTest() throws ApiException { + String username = null; + api.deleteUser(username); + // TODO: test validations + } + + /** + * Get user by user name + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testLoginUser() throws Exception { - User user = createUser(); - api.createUser(user); + public void getUserByNameTest() throws ApiException { + String username = null; + User response = api.getUserByName(username); - String token = api.loginUser(user.getUsername(), user.getPassword()); - assertTrue(token.startsWith("logged in user session:")); + // 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 logoutUser() throws Exception { + 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); + // 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); - return user; + // TODO: test validations } + } diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..84d02ecf658 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..424874055c3 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..9a4d95cb9e9 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..2501166ae24 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..ed6d33081af --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..515c25bc9d9 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..a42c147daf4 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..8e67d7d7287 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..f5bf813e51a --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..810b0c70eaf --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..ddb7c2410cb --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..e38deb742e5 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..308d38fa7e9 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..7aa1271379d --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..9147c2bab55 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..bed0aa15fe2 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..7eea2ebd5af --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..1c4e9068edf --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..e29225e3f1d --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..95380a5e509 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..55e2a4f8c5b --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..2c8ba2fe838 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..872650d606a --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..4fb276bc340 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..f37ead1f554 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..3fa82f98e2a --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..7d5a747ff42 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..2bfd265342a --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..e0830ba9360 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..805c806a70a --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..bdd993ba05f --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..82755d5c4e5 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,66 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..23774a11170 --- /dev/null +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,100 @@ +/* + * 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.model.util; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ 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 a1088603f3f..8ceb02c6e3b 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,68 +125,72 @@ 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: -### petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - 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 +### api_key_query - **Type**: API key -- **API key parameter name**: test_api_key_query +- **API key parameter name**: api_key_query - **Location**: URL query string -### test_api_key_header +### http_basic_test -- **Type**: API key -- **API key parameter name**: test_api_key_header -- **Location**: HTTP header +- **Type**: HTTP basic authentication + +### petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - write:pets: modify pets in your account + - read:pets: read your pets ## 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/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index 7fe69e168fd..835e61cf560 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -122,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Animal.java index 590f36c0ae0..dd67c86fcc1 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Animal.java @@ -110,9 +110,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/AnimalFarm.java index 0b1d6a74cc6..77debcbb4bf 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -55,9 +55,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index b7e59a030a4..a8dbad3c79b 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index fdfeb6856f3..fe3aa91fa0b 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ArrayTest.java index 62665c2536a..8ea0e220981 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ArrayTest.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Capitalization.java index a72b0a72f46..9d3ad009209 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Capitalization.java @@ -195,9 +195,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Cat.java index b882da0ad90..9d37d2ddc2c 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Cat.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Category.java index 464f4375c4b..c8aa31c3b31 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Category.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ClassModel.java index 4f764fde68d..001903b555b 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ClassModel.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Client.java index a7c4253499c..2744720fca8 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Client.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Dog.java index 7de179b2ade..8543a31fff5 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Dog.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/EnumArrays.java index 12caa480285..b1fa858c53b 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/EnumArrays.java @@ -183,9 +183,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/EnumTest.java index 93d0da037b6..d9ac9c73d07 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/EnumTest.java @@ -257,9 +257,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/FormatTest.java index 4118656d29e..6b1493aa0fb 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/FormatTest.java @@ -370,9 +370,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 6dc9f12c4b8..1c583390fdc 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/MapTest.java index e6344a1df0f..5d84882844d 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/MapTest.java @@ -157,9 +157,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 29bfc7e8c08..51d69a4d4bd 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -140,9 +140,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Model200Response.java index 58624475e43..b1919c97d7d 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Model200Response.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ModelApiResponse.java index b010e53b48c..8e8c9ce43fb 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -126,9 +126,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ModelReturn.java index 27d08557248..106b625f889 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ModelReturn.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Name.java index f2b9b1703bd..8c7b16d11d6 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Name.java @@ -132,9 +132,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/NumberOnly.java index ec93aba0531..1657a8eabdd 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/NumberOnly.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Order.java index 6976ceb8fba..f2956b3405d 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Order.java @@ -233,9 +233,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/OuterComposite.java index 02c16a99b70..332bd7964b3 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/OuterComposite.java @@ -127,9 +127,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Pet.java index 4c351dec3e4..52c4a0c01b7 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Pet.java @@ -249,9 +249,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index 76f8a912f36..aae35f87ff2 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/SpecialModelName.java index 784eb8baca8..d9531b57cb8 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Tag.java index 1cf2f5bc5e6..3485e1392c8 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Tag.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/User.java index de5bc439c5a..103d935054d 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/User.java @@ -229,7 +229,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -241,9 +241,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } 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 c564001ad70..0e4979b2906 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 @@ /** * 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 694e9c152b0..349a55d93dc 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 @@ -package io.swagger.client.api; - -import com.fasterxml.jackson.databind.ObjectMapper; +/* + * 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. + */ -import io.swagger.TestUtils; -import io.swagger.client.*; -import io.swagger.client.api.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; +package io.swagger.client.api; -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()); - - Category category = new Category(); - category.setId(TestUtils.nextId()); - category.setName("category " + category.getId()); - pet.setCategory(category); + public void findPetsByTagsTest() throws ApiException { + List tags = null; + List response = api.findPetsByTags(tags); - 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"); - - api.updatePet(pet); + public void getPetByIdTest() throws ApiException { + Long petId = null; + Pet response = api.getPetById(petId); - 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); - - 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); + public void updatePetWithFormTest() throws ApiException { + Long petId = null; + String name = null; + String status = null; + api.updatePetWithForm(petId, name, status); - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - assertTrue(found); + // TODO: test validations } - - @Test - public void testUpdatePetWithForm() throws Exception { - Pet pet = createRandomPet(); - pet.setName("frank"); - api.addPet(pet); - - Pet fetched = api.getPetById(pet.getId()); - - api.updatePetWithForm(fetched.getId(), "furt", null); - Pet updated = api.getPetById(fetched.getId()); - - assertEquals(updated.getName(), "furt"); - } - + + /** + * uploads an image + * + * + * + * @throws ApiException + * if the Api call fails + */ @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); - } - } + public void uploadFileTest() throws ApiException { + Long petId = null; + String additionalMetadata = null; + File file = null; + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - 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 b29acf6c3e2..bef0884a2da 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 @@ -package io.swagger.client.api; - -import io.swagger.TestUtils; +/* + * 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. + */ -import io.swagger.client.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; -import java.lang.reflect.Field; -import java.util.Map; -import java.text.SimpleDateFormat; +package io.swagger.client.api; -import org.junit.*; -import org.threeten.bp.OffsetDateTime; +import io.swagger.client.ApiException; +import io.swagger.client.model.Order; +import org.junit.Test; +import org.junit.Ignore; -import static org.junit.Assert.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +/** + * 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")); - } - - @Test - public void testGetInventory() throws Exception { - Map inventory = api.getInventory(); - assertTrue(inventory.keySet().size() > 0); - } - /* + 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 testGetInventoryInObject() throws Exception { - Object inventoryObj = api.getInventoryInObject(); - assertTrue(inventoryObj instanceof Map); - - Map inventoryMap = (Map) inventoryObj; - assertTrue(inventoryMap.keySet().size() > 0); + public void deleteOrderTest() throws ApiException { + String orderId = null; + api.deleteOrder(orderId); - Map.Entry firstEntry = (Map.Entry) inventoryMap.entrySet().iterator().next(); - assertTrue(firstEntry.getKey() instanceof String); - assertTrue(firstEntry.getValue() instanceof Integer); + // 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 testPlaceOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); + public void getInventoryTest() throws ApiException { + Map response = api.getInventory(); - 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 } - + + /** + * 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 testDeleteOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); - - Order fetched = api.getOrderById(order.getId()); - assertEquals(fetched.getId(), order.getId()); + public void getOrderByIdTest() throws ApiException { + Long orderId = null; + Order response = api.getOrderById(orderId); - api.deleteOrder(String.valueOf(order.getId())); - - try { - api.getOrderById(order.getId()); - // fail("expected an error"); - } catch (ApiException e) { - // ok - } + // TODO: test validations } + + /** + * Place an order for a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void placeOrderTest() throws ApiException { + Order body = null; + Order response = api.placeOrder(body); - 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 c7fb92d2552..4455b3920b9 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 @@ -package io.swagger.client.api; +/* + * 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. + */ -import io.swagger.TestUtils; -import io.swagger.client.api.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; +package io.swagger.client.api; -import java.util.Arrays; +import io.swagger.client.ApiException; +import io.swagger.client.model.User; +import org.junit.Test; +import org.junit.Ignore; -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 deleteUserTest() throws ApiException { + String username = null; + api.deleteUser(username); + // TODO: test validations + } + + /** + * Get user by user name + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testLoginUser() throws Exception { - User user = createUser(); - api.createUser(user); + public void getUserByNameTest() throws ApiException { + String username = null; + User response = api.getUserByName(username); - String token = api.loginUser(user.getUsername(), user.getPassword()); - assertTrue(token.startsWith("logged in user session:")); + // 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 logoutUser() throws Exception { + 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); + // 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); - return user; + // TODO: test validations } + } diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..b4f92a36c34 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..64c259e27a8 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..f49a83b96c0 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..0835812b967 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..e1a135877f8 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..85df56981e1 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..37f246cef46 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..4c600ad6bfe --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..7c1c36eb1d8 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..0af24ee94c2 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..c5776ad73c1 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..391a26433df --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..c0afa7dcebd --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..173c6e24c09 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..98234657055 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..5d83bc6e110 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..39d72d21e2c --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..658e220c498 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..e387d196f41 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..1c5c0137b50 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8d7dbfe913b --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..aaf592b2eee --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..3eae383b79b --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..35b9473b6c5 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..0a9716c9783 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..f74d363aec1 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..4ec6e0ff791 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..e0f6a407ed5 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..2cd54e5cfc0 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..8cfe2bcdb76 --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..2568fd1fdaf --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,65 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/jersey2/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/README.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/README.md index 8e55bbc51a2..296cfbd5d85 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/README.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/README.md @@ -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(); - Boolean body = true; // Boolean | Input boolean as post body + AnotherFakeApi apiInstance = new AnotherFakeApi(); + Client body = new Client(); // Client | client model try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + Client result = apiInstance.testSpecialTags(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Exception when calling AnotherFakeApi#testSpecialTags"); e.printStackTrace(); } } @@ -90,6 +90,7 @@ 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 | @@ -97,6 +98,9 @@ Class | Method | HTTP request | Description *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 @@ -164,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/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index b6ccfc43902..5dad6700f06 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -127,9 +127,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Animal.java index 89ddcdc99ec..72ad5d61030 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Animal.java @@ -109,9 +109,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AnimalFarm.java index a844db02e09..583095fc13d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -57,9 +57,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index cdaf9bf9d11..e0106741585 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index 31235c82a66..dbf54295c66 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayTest.java index a8a208ede45..0a79da60f95 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ArrayTest.java @@ -158,9 +158,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Capitalization.java index 01fdd9ca963..831f24360ee 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Capitalization.java @@ -200,9 +200,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Cat.java index 5fdb74cbd1e..ad4edb859af 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Cat.java @@ -87,9 +87,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Category.java index 9a604aa8227..f70d78ddd2d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Category.java @@ -108,9 +108,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ClassModel.java index 6cc1bac7b54..b7a86dd1b38 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ClassModel.java @@ -86,9 +86,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Client.java index 1b73505df83..bdd8d6af95c 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Client.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Dog.java index e6afcc17e57..e7c1446cf4d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Dog.java @@ -87,9 +87,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumArrays.java index 0bf8c81509b..cfaf9c74297 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumArrays.java @@ -212,9 +212,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumTest.java index 7740669efa2..983673ff629 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/EnumTest.java @@ -298,9 +298,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/FormatTest.java index c9128a2a52b..470428fe57a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/FormatTest.java @@ -375,9 +375,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index f95ff9951f9..eed95d5d622 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -90,9 +90,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MapTest.java index 079daa6d717..7250e7c03bc 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MapTest.java @@ -174,9 +174,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 345de387543..aaa16ece5d5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -145,9 +145,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Model200Response.java index fee0bdffb90..b540c838d63 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Model200Response.java @@ -109,9 +109,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelApiResponse.java index 80bad00f37b..612e41e6433 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -131,9 +131,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelReturn.java index d1cb38fd7cb..5e6924e5355 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ModelReturn.java @@ -86,9 +86,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Name.java index 60cbdc3aa5d..cee685969ad 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Name.java @@ -137,9 +137,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/NumberOnly.java index 2b28fe9bf57..cb177d67c83 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/NumberOnly.java @@ -86,9 +86,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Order.java index 008233f13a9..2b6e4a57ea3 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Order.java @@ -250,9 +250,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OuterComposite.java index cf9f2f1fc78..2a1a1125160 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/OuterComposite.java @@ -132,9 +132,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Pet.java index 37bbf49875f..86c5993d853 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Pet.java @@ -266,9 +266,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index d79499f240b..b35ac24ff19 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -99,9 +99,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/SpecialModelName.java index c04c8185f20..e1e97a01096 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Tag.java index 7557a6fbf34..b2ad0c02607 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/Tag.java @@ -108,9 +108,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/User.java index 0853d0673be..fcbcf8d5889 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/model/User.java @@ -234,7 +234,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -246,9 +246,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/api/FakeApiTest.java index 169209bd418..0e4979b2906 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -16,8 +16,8 @@ import io.swagger.client.ApiException; import java.math.BigDecimal; import io.swagger.client.model.Client; -import org.joda.time.DateTime; -import org.joda.time.LocalDate; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; import io.swagger.client.model.OuterComposite; import org.junit.Test; import org.junit.Ignore; @@ -137,7 +137,7 @@ public void testEndpointParametersTest() throws ApiException { 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); @@ -168,4 +168,37 @@ public void testEnumParametersTest() throws ApiException { // 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/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..76542a09459 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..b64cda4ae9a --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..1d5ea3ddd41 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..b7963b4bd24 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..bf2a685235d --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..a5045e3fef2 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..d9a0c2441a6 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..b501b59c7e1 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..c605c8ee727 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..d684ee437d5 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..bcd43788b31 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..95d11adf568 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..82e7fd4c7d7 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.annotations.SerializedName; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..89eac5b2562 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..242ef207201 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..64d25301aa8 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..a018bd04e36 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..35423f00eeb --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,64 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..d0ee9107a58 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..9f3655bd094 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8e5de3f5c6f --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..16bb069f0ea --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..1ce5c00a602 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..4c144e272b5 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..9d433c9721c --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..2d8b44d111c --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.annotations.SerializedName; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..3be0968db0f --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..bb1c14e2311 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..33412a6b8c2 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..0fe6b02fbad --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..e9a7b23cc87 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,68 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/okhttp-gson/README.md b/samples/client/petstore/java/okhttp-gson/README.md index 541407fec8b..296cfbd5d85 100644 --- a/samples/client/petstore/java/okhttp-gson/README.md +++ b/samples/client/petstore/java/okhttp-gson/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,71 +125,72 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - [Animal](docs/Animal.md) - - [Cat](docs/Cat.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) - - [Dog](docs/Dog.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: -### petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - 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 +### api_key_query - **Type**: API key -- **API key parameter name**: test_api_key_query +- **API key parameter name**: api_key_query - **Location**: URL query string -### test_api_key_header +### http_basic_test -- **Type**: API key -- **API key parameter name**: test_api_key_header -- **Location**: HTTP header +- **Type**: HTTP basic authentication + +### petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - write:pets: modify pets in your account + - read:pets: read your pets ## 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/okhttp-gson/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index b302fdf6012..0365a240a9a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -125,9 +125,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Animal.java index f65c5bffcb3..0f2496a7174 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Animal.java @@ -107,9 +107,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/AnimalFarm.java index 0b1d6a74cc6..77debcbb4bf 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -55,9 +55,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index f9956fe46d8..7bab354ff9b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index c79610d1c66..b1104901093 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ArrayTest.java index 747182e792e..f85b2be7ee8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ArrayTest.java @@ -156,9 +156,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Capitalization.java index 00c564ab727..76de2eb0ac4 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Capitalization.java @@ -198,9 +198,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Cat.java index 64d3fbdc7fe..a950640dbb6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Cat.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Category.java index 4e9f8f56e5e..6990e2cb869 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Category.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ClassModel.java index 4cf0a053250..93abc0b3447 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ClassModel.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Client.java index 43b20dce8da..1bbedfa3488 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Client.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Dog.java index 8fad06d9835..b87d1262d2b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Dog.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/EnumArrays.java index 5f063c2ec38..06e00b39a57 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/EnumArrays.java @@ -210,9 +210,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/EnumTest.java index fb20599a85c..59888d5eb0e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/EnumTest.java @@ -296,9 +296,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/FormatTest.java index ddb80771fda..d6c61f996f3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/FormatTest.java @@ -373,9 +373,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 1b7ff181941..e3e0255689e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -88,9 +88,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/MapTest.java index a791e68d8fb..003438690e6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/MapTest.java @@ -172,9 +172,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 7c99abe53eb..823f2893c93 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -143,9 +143,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Model200Response.java index 0d39eb7eff5..5628f9e5487 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Model200Response.java @@ -107,9 +107,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelApiResponse.java index 3d9352c50aa..193e69fd08a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -129,9 +129,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelReturn.java index ab6333ff86d..290780c8b5e 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ModelReturn.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Name.java index 1492add2952..35241e53af1 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Name.java @@ -135,9 +135,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/NumberOnly.java index b13c0536a13..d34198289ee 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/NumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Order.java index 4dcf75a7cd0..f12fb6e9413 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Order.java @@ -248,9 +248,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/OuterComposite.java index 56159fe5d93..795c17c57b5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/OuterComposite.java @@ -130,9 +130,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Pet.java index dac1250ac07..5982c3bc344 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Pet.java @@ -264,9 +264,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index f6e025412de..630bf812cd7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -97,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/SpecialModelName.java index e743292100b..2458c05b328 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Tag.java index bb6de58c8a1..cf94c065e5b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Tag.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/User.java index 4ccb8a1c147..5fbfde3bba6 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/User.java @@ -232,7 +232,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -244,9 +244,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/api/FakeApiTest.java index c564001ad70..0e4979b2906 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/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 @@ /** * 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/okhttp-gson/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/api/PetApiTest.java index b949d90ebdb..349a55d93dc 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/api/PetApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/api/PetApiTest.java @@ -1,393 +1,170 @@ -package io.swagger.client.api; +/* + * 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. + */ -import io.swagger.TestUtils; -import io.swagger.client.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; +package io.swagger.client.api; -import java.io.BufferedWriter; +import io.swagger.client.ApiException; import java.io.File; -import java.io.FileWriter; -import java.lang.reflect.Type; +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()); - - 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()); - } - + public void addPetTest() throws ApiException { + Pet body = null; + api.addPet(body); + + // 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); - - Pet fetched = api.getPetById(pet.getId()); - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); - } - - /* + public void deletePetTest() throws ApiException { + Long petId = null; + String apiKey = null; + api.deletePet(petId, apiKey); + + // 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); - - byte[] fetchedBytes = api.petPetIdtestingByteArraytrueGet(pet.getId()); - Type type = new TypeToken(){}.getType(); - Pet fetched = deserializeJson(new String(fetchedBytes), type, api.getApiClient()); - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); - } - */ - + public void findPetsByStatusTest() throws ApiException { + List status = null; + List response = api.findPetsByStatus(status); + + // 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 testCreateAndGetPetWithHttpInfo() throws Exception { - Pet pet = createRandomPet(); - api.addPetWithHttpInfo(pet); - - ApiResponse resp = api.getPetByIdWithHttpInfo(pet.getId()); - assertEquals(200, resp.getStatusCode()); - assertEquals("application/json", resp.getHeaders().get("Content-Type").get(0)); - Pet fetched = resp.getData(); - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); - } - + public void findPetsByTagsTest() throws ApiException { + List tags = null; + List response = api.findPetsByTags(tags); + + // TODO: test validations + } + + /** + * Find pet by ID + * + * Returns a single pet + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testCreateAndGetPetAsync() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); - // to store returned Pet or error message/exception - final Map result = new HashMap(); - - api.getPetByIdAsync(pet.getId(), new ApiCallback() { - @Override - public void onFailure(ApiException e, int statusCode, Map> responseHeaders) { - result.put("error", e.getMessage()); - } - - @Override - public void onSuccess(Pet pet, int statusCode, Map> responseHeaders) { - result.put("pet", pet); - } - - @Override - public void onUploadProgress(long bytesWritten, long contentLength, boolean done) { - //empty - } - - @Override - public void onDownloadProgress(long bytesRead, long contentLength, boolean done) { - //empty - } - }); - // the API call should be executed asynchronously, so result should be empty at the moment - assertTrue(result.isEmpty()); - - // wait for the asynchronous call to finish (at most 10 seconds) - final int maxTry = 10; - int tryCount = 1; - Pet fetched = null; - do { - if (tryCount > maxTry) fail("have not got result of getPetByIdAsync after 10 seconds"); - Thread.sleep(1000); - tryCount += 1; - if (result.get("error") != null) fail((String) result.get("error")); - if (result.get("pet") != null) { - fetched = (Pet) result.get("pet"); - break; - } - } while (result.isEmpty()); - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); - - // test getting a nonexistent pet - result.clear(); - api.getPetByIdAsync(-10000L, new ApiCallback() { - @Override - public void onFailure(ApiException e, int statusCode, Map> responseHeaders) { - result.put("exception", e); - } - - @Override - public void onSuccess(Pet pet, int statusCode, Map> responseHeaders) { - result.put("pet", pet); - } - - @Override - public void onUploadProgress(long bytesWritten, long contentLength, boolean done) { - //empty - } - - @Override - public void onDownloadProgress(long bytesRead, long contentLength, boolean done) { - //empty - } - }); - - // wait for the asynchronous call to finish (at most 10 seconds) - tryCount = 1; - ApiException exception = null; - do { - if (tryCount > maxTry) fail("have not got result of getPetByIdAsync after 10 seconds"); - Thread.sleep(1000); - tryCount += 1; - if (result.get("pet") != null) fail("expected an error"); - if (result.get("exception") != null) { - exception = (ApiException) result.get("exception"); - break; - } - } while (result.isEmpty()); - assertNotNull(exception); - assertEquals(404, exception.getCode()); - assertEquals("Not Found", exception.getMessage()); - assertEquals("application/json", exception.getResponseHeaders().get("Content-Type").get(0)); - } - - /* + public void getPetByIdTest() throws ApiException { + Long petId = null; + Pet response = api.getPetById(petId); + + // TODO: test validations + } + + /** + * Update an existing pet + * + * + * + * @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()); - - 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"); - // NOTE: Gson parses integer value to double. - assertTrue(categoryIdObj instanceof Double); - Long categoryIdLong = ((Double) categoryIdObj).longValue(); - assertEquals(category.getId(), categoryIdLong); - assertEquals(category.getName(), categoryMap.get("name")); - } - */ - + public void updatePetTest() throws ApiException { + Pet body = null; + api.updatePet(body); + + // TODO: test validations + } + + /** + * Updates a pet in the store with form data + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testUpdatePet() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); - - 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()); - } - - @Test - public void testFindPetsByStatus() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); - pet.setStatus(Pet.StatusEnum.PENDING); - - api.updatePet(pet); - - List pets = api.findPetsByStatus(Arrays.asList("pending")); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - - assertTrue(found); - - api.deletePet(pet.getId(), null); - } - - @Test - public void testFindPetsByTags() throws Exception { - Pet pet = createRandomPet(); - pet.setName("monster"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - - 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("friendly")); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - assertTrue(found); - - api.deletePet(pet.getId(), null); - } - + public void updatePetWithFormTest() throws ApiException { + Long petId = null; + String name = null; + String status = null; + api.updatePetWithForm(petId, name, status); + + // 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); - - 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("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("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("http://foo.bar.com/1", "http://foo.bar.com/2"); - pet.setPhotoUrls(photos); - - return pet; - } - - private String serializeJson(Object o, ApiClient apiClient) { - return apiClient.getJSON().serialize(o); - } + public void uploadFileTest() throws ApiException { + Long petId = null; + String additionalMetadata = null; + File file = null; + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - private T deserializeJson(String json, Type type, ApiClient apiClient) { - return (T) apiClient.getJSON().deserialize(json, type); + // TODO: test validations } + } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/api/StoreApiTest.java index c4c64fdda79..bef0884a2da 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/api/StoreApiTest.java @@ -1,99 +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.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 org.junit.*; -import org.threeten.bp.OffsetDateTime; - -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"); - } - - @Test - public void testGetInventory() throws Exception { - Map inventory = api.getInventory(); - assertTrue(inventory.keySet().size() > 0); - } - /* + 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 testGetInventoryInObject() throws Exception { - Object inventoryObj = api.getInventoryInObject(); - assertTrue(inventoryObj instanceof Map); - - Map inventoryMap = (Map) inventoryObj; - assertTrue(inventoryMap.keySet().size() > 0); + public void deleteOrderTest() throws ApiException { + String orderId = null; + api.deleteOrder(orderId); - Map.Entry firstEntry = (Map.Entry) inventoryMap.entrySet().iterator().next(); - assertTrue(firstEntry.getKey() instanceof String); - // NOTE: Gson parses integer value to double. - assertTrue(firstEntry.getValue() instanceof Double); + // 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 testPlaceOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); + public void getInventoryTest() throws ApiException { + Map response = api.getInventory(); - 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 } - + + /** + * 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 testDeleteOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); - - Order fetched = api.getOrderById(order.getId()); - assertEquals(fetched.getId(), order.getId()); + public void getOrderByIdTest() throws ApiException { + Long orderId = null; + Order response = api.getOrderById(orderId); - api.deleteOrder(String.valueOf(order.getId())); - - try { - api.getOrderById(order.getId()); - // fail("expected an error"); - } catch (ApiException e) { - // ok - } + // TODO: test validations } + + /** + * Place an order for a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void placeOrderTest() throws ApiException { + Order body = null; + Order response = api.placeOrder(body); - 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/okhttp-gson/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/api/UserApiTest.java index b47a146d737..4455b3920b9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/api/UserApiTest.java @@ -1,87 +1,164 @@ -package io.swagger.client.api; +/* + * 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. + */ -import io.swagger.TestUtils; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; +package io.swagger.client.api; -import java.util.Arrays; +import io.swagger.client.ApiException; +import io.swagger.client.model.User; +import org.junit.Test; +import org.junit.Ignore; -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 deleteUserTest() throws ApiException { + String username = null; + api.deleteUser(username); + // TODO: test validations + } + + /** + * Get user by user name + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testLoginUser() throws Exception { - User user = createUser(); - api.createUser(user); + public void getUserByNameTest() throws ApiException { + String username = null; + User response = api.getUserByName(username); - String token = api.loginUser(user.getUsername(), user.getPassword()); - assertTrue(token.startsWith("logged in user session:")); + // 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 logoutUser() throws Exception { + 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); + // 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); - return user; + // TODO: test validations } + } diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..76542a09459 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..b64cda4ae9a --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..1d5ea3ddd41 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..b7963b4bd24 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..bf2a685235d --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..a5045e3fef2 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..d9a0c2441a6 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..b501b59c7e1 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..c605c8ee727 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..d684ee437d5 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..bcd43788b31 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..95d11adf568 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..82e7fd4c7d7 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.annotations.SerializedName; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..89eac5b2562 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..242ef207201 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..64d25301aa8 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..a018bd04e36 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..35423f00eeb --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,64 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..d0ee9107a58 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..9f3655bd094 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8e5de3f5c6f --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..16bb069f0ea --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..1ce5c00a602 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..4c144e272b5 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..9d433c9721c --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..2d8b44d111c --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.annotations.SerializedName; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..3be0968db0f --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..bb1c14e2311 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..33412a6b8c2 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..0fe6b02fbad --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..e9a7b23cc87 --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,68 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/resteasy/README.md b/samples/client/petstore/java/resteasy/README.md index 4e4673592f7..dd232b43e7f 100644 --- a/samples/client/petstore/java/resteasy/README.md +++ b/samples/client/petstore/java/resteasy/README.md @@ -1,155 +1,198 @@ -# swagger-java-client - -## Requirements - -Building the API client library requires [Maven](https://maven.apache.org/) to be installed. - -## Installation - -To install the API client library to your local Maven repository, simply execute: - -```shell -mvn install -``` - -To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: - -```shell -mvn deploy -``` - -Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. - -### Maven users - -Add this dependency to your project's POM: - -```xml - - io.swagger - swagger-java-client - 1.0.0 - compile - -``` - -### Gradle users - -Add this dependency to your project's build file: - -```groovy -compile "io.swagger:swagger-java-client:1.0.0" -``` - -### Others - -At first generate the JAR by executing: - - mvn package - -Then manually install the following JARs: - -* target/swagger-java-client-1.0.0.jar -* target/lib/*.jar - -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following Java code: - -```java - -import io.swagger.client.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; -import io.swagger.client.api.PetApi; - -import java.io.File; -import java.util.*; - -public class PetApiExample { - - 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 - try { - apiInstance.addPet(body); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); - e.printStackTrace(); - } - } -} - -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*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 -*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* | [**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* | [**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* | [**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 -*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name -*UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system -*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user - - -## Documentation for Models - - - [Category](docs/Category.md) - - [ModelApiResponse](docs/ModelApiResponse.md) - - [Order](docs/Order.md) - - [Pet](docs/Pet.md) - - [Tag](docs/Tag.md) - - [User](docs/User.md) - - -## Documentation for Authorization - -Authentication schemes defined for the API: -### api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - -### petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorizatoin URL**: http://petstore.swagger.io/oauth/dialog -- **Scopes**: - - write:pets: modify pets in your account - - read:pets: read your pets - - -## Recommendation - -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. - -## Author - -apiteam@swagger.io - +# swagger-petstore-resteasy + +## Requirements + +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn deploy +``` + +Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + io.swagger + swagger-petstore-resteasy + 1.0.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "io.swagger:swagger-petstore-resteasy:1.0.0" +``` + +### Others + +At first generate the JAR by executing: + + mvn package + +Then manually install the following JARs: + +* target/swagger-petstore-resteasy-1.0.0.jar +* target/lib/*.jar + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +import io.swagger.client.*; +import io.swagger.client.auth.*; +import io.swagger.client.model.*; +import io.swagger.client.api.AnotherFakeApi; + +import java.io.File; +import java.util.*; + +public class AnotherFakeApiExample { + + public static void main(String[] args) { + + AnotherFakeApi apiInstance = new AnotherFakeApi(); + Client body = new Client(); // Client | client model + try { + Client result = apiInstance.testSpecialTags(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#testSpecialTags"); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +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 +*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* | [**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/{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/{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 +*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user +*UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user + + +## 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) + - [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 +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - write:pets: modify pets in your account + - read:pets: read your pets + + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + +apiteam@swagger.io + diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index 7fe69e168fd..835e61cf560 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -122,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Animal.java index 590f36c0ae0..dd67c86fcc1 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Animal.java @@ -110,9 +110,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/AnimalFarm.java index 0b1d6a74cc6..77debcbb4bf 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -55,9 +55,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index b7e59a030a4..a8dbad3c79b 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index fdfeb6856f3..fe3aa91fa0b 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ArrayTest.java index 62665c2536a..8ea0e220981 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ArrayTest.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Capitalization.java index a72b0a72f46..9d3ad009209 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Capitalization.java @@ -195,9 +195,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Cat.java index b882da0ad90..9d37d2ddc2c 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Cat.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Category.java index 464f4375c4b..c8aa31c3b31 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Category.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ClassModel.java index 4f764fde68d..001903b555b 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ClassModel.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Client.java index a7c4253499c..2744720fca8 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Client.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Dog.java index 7de179b2ade..8543a31fff5 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Dog.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/EnumArrays.java index 12caa480285..b1fa858c53b 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/EnumArrays.java @@ -183,9 +183,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/EnumTest.java index 93d0da037b6..d9ac9c73d07 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/EnumTest.java @@ -257,9 +257,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/FormatTest.java index 4118656d29e..6b1493aa0fb 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/FormatTest.java @@ -370,9 +370,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 6dc9f12c4b8..1c583390fdc 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/MapTest.java index e6344a1df0f..5d84882844d 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/MapTest.java @@ -157,9 +157,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 29bfc7e8c08..51d69a4d4bd 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -140,9 +140,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Model200Response.java index 58624475e43..b1919c97d7d 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Model200Response.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ModelApiResponse.java index b010e53b48c..8e8c9ce43fb 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -126,9 +126,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ModelReturn.java index 27d08557248..106b625f889 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ModelReturn.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Name.java index f2b9b1703bd..8c7b16d11d6 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Name.java @@ -132,9 +132,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/NumberOnly.java index ec93aba0531..1657a8eabdd 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/NumberOnly.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Order.java index 6976ceb8fba..f2956b3405d 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Order.java @@ -233,9 +233,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/OuterComposite.java index 02c16a99b70..332bd7964b3 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/OuterComposite.java @@ -127,9 +127,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Pet.java index 4c351dec3e4..52c4a0c01b7 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Pet.java @@ -249,9 +249,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index 76f8a912f36..aae35f87ff2 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/SpecialModelName.java index 784eb8baca8..d9531b57cb8 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Tag.java index 1cf2f5bc5e6..3485e1392c8 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/Tag.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/User.java index de5bc439c5a..103d935054d 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/resteasy/src/main/java/io/swagger/client/model/User.java @@ -229,7 +229,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -241,9 +241,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/FakeApiTest.java index f7a75022194..0e4979b2906 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -168,6 +168,22 @@ public void testEnumParametersTest() throws ApiException { // 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 * diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/PetApiTest.java index ced6e945d99..349a55d93dc 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/PetApiTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/PetApiTest.java @@ -1,168 +1,170 @@ -/* - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - -package io.swagger.client.api; - -import io.swagger.client.ApiException; -import java.io.File; -import io.swagger.client.model.ModelApiResponse; -import io.swagger.client.model.Pet; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for PetApi - */ -public class PetApiTest { - - private final PetApi api = new PetApi(); - - - /** - * Add a new pet to the store - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void addPetTest() throws ApiException { - Pet body = null; - // api.addPet(body); - - // TODO: test validations - } - - /** - * Deletes a pet - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deletePetTest() throws ApiException { - Long petId = null; - String apiKey = null; - // api.deletePet(petId, apiKey); - - // 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 findPetsByStatusTest() throws ApiException { - List status = null; - // List response = api.findPetsByStatus(status); - - // TODO: test validations - } - - /** - * Finds Pets by tags - * - * Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void findPetsByTagsTest() throws ApiException { - List tags = null; - // List response = api.findPetsByTags(tags); - - // TODO: test validations - } - - /** - * Find pet by ID - * - * Returns a single pet - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getPetByIdTest() throws ApiException { - Long petId = null; - // Pet response = api.getPetById(petId); - - // TODO: test validations - } - - /** - * Update an existing pet - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updatePetTest() throws ApiException { - Pet body = null; - // api.updatePet(body); - - // TODO: test validations - } - - /** - * Updates a pet in the store with form data - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updatePetWithFormTest() throws ApiException { - Long petId = null; - String name = null; - String status = null; - // api.updatePetWithForm(petId, name, status); - - // TODO: test validations - } - - /** - * uploads an image - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void uploadFileTest() throws ApiException { - Long petId = null; - String additionalMetadata = null; - File file = null; - // ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - - // TODO: test validations - } - -} +/* + * 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.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; +import java.util.List; +import java.util.Map; + +/** + * API tests for PetApi + */ +@Ignore +public class PetApiTest { + + private final PetApi api = new PetApi(); + + + /** + * Add a new pet to the store + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void addPetTest() throws ApiException { + Pet body = null; + api.addPet(body); + + // TODO: test validations + } + + /** + * Deletes a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deletePetTest() throws ApiException { + Long petId = null; + String apiKey = null; + api.deletePet(petId, apiKey); + + // 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 findPetsByStatusTest() throws ApiException { + List status = null; + List response = api.findPetsByStatus(status); + + // 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 findPetsByTagsTest() throws ApiException { + List tags = null; + List response = api.findPetsByTags(tags); + + // TODO: test validations + } + + /** + * Find pet by ID + * + * Returns a single pet + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getPetByIdTest() throws ApiException { + Long petId = null; + Pet response = api.getPetById(petId); + + // TODO: test validations + } + + /** + * Update an existing pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updatePetTest() throws ApiException { + Pet body = null; + api.updatePet(body); + + // TODO: test validations + } + + /** + * Updates a pet in the store with form data + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updatePetWithFormTest() throws ApiException { + Long petId = null; + String name = null; + String status = null; + api.updatePetWithForm(petId, name, status); + + // TODO: test validations + } + + /** + * uploads an image + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadFileTest() throws ApiException { + Long petId = null; + String additionalMetadata = null; + File file = null; + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); + + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/StoreApiTest.java index 290eb06ebe6..bef0884a2da 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/StoreApiTest.java @@ -1,96 +1,98 @@ -/* - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - -package io.swagger.client.api; - -import io.swagger.client.ApiException; -import io.swagger.client.model.Order; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for StoreApi - */ -public class StoreApiTest { - - private final StoreApi api = new StoreApi(); - - - /** - * Delete purchase order by ID - * - * For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteOrderTest() throws ApiException { - Long 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 getInventoryTest() throws ApiException { - // Map response = api.getInventory(); - - // TODO: test validations - } - - /** - * Find purchase order by ID - * - * For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getOrderByIdTest() throws ApiException { - Long orderId = null; - // Order response = api.getOrderById(orderId); - - // TODO: test validations - } - - /** - * Place an order for a pet - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void placeOrderTest() throws ApiException { - Order body = null; - // Order response = api.placeOrder(body); - - // TODO: test validations - } - -} +/* + * 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 io.swagger.client.model.Order; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for StoreApi + */ +@Ignore +public class StoreApiTest { + + 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 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 getInventoryTest() throws ApiException { + Map response = api.getInventory(); + + // 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 getOrderByIdTest() throws ApiException { + Long orderId = null; + Order response = api.getOrderById(orderId); + + // TODO: test validations + } + + /** + * Place an order for a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void placeOrderTest() throws ApiException { + Order body = null; + Order response = api.placeOrder(body); + + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/UserApiTest.java index 83845743210..4455b3920b9 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/api/UserApiTest.java @@ -1,162 +1,164 @@ -/* - * Swagger Petstore - * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. - * - * OpenAPI spec version: 1.0.0 - * Contact: apiteam@swagger.io - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - -package io.swagger.client.api; - -import io.swagger.client.ApiException; -import io.swagger.client.model.User; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for UserApi - */ -public class UserApiTest { - - 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 createUserTest() throws ApiException { - User body = null; - // api.createUser(body); - - // TODO: test validations - } - - /** - * Creates list of users with given input array - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createUsersWithArrayInputTest() throws ApiException { - List body = null; - // api.createUsersWithArrayInput(body); - - // TODO: test validations - } - - /** - * Creates list of users with given input array - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createUsersWithListInputTest() throws ApiException { - List body = null; - // api.createUsersWithListInput(body); - - // 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 deleteUserTest() throws ApiException { - String username = null; - // api.deleteUser(username); - - // TODO: test validations - } - - /** - * Get user by user name - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - 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(); - - // 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 - } - -} +/* + * 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 io.swagger.client.model.User; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for UserApi + */ +@Ignore +public class UserApiTest { + + 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 createUserTest() throws ApiException { + User body = null; + api.createUser(body); + + // TODO: test validations + } + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createUsersWithArrayInputTest() throws ApiException { + List body = null; + api.createUsersWithArrayInput(body); + + // TODO: test validations + } + + /** + * Creates list of users with given input array + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createUsersWithListInputTest() throws ApiException { + List body = null; + api.createUsersWithListInput(body); + + // 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 deleteUserTest() throws ApiException { + String username = null; + api.deleteUser(username); + + // TODO: test validations + } + + /** + * Get user by user name + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + 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(); + + // 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/resteasy/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..b4f92a36c34 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..64c259e27a8 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..f49a83b96c0 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..0835812b967 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..e1a135877f8 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..85df56981e1 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..37f246cef46 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..4c600ad6bfe --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..7c1c36eb1d8 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..0af24ee94c2 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..c5776ad73c1 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..391a26433df --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..c0afa7dcebd --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..173c6e24c09 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..98234657055 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..5d83bc6e110 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..39d72d21e2c --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..658e220c498 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..e387d196f41 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..1c5c0137b50 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8d7dbfe913b --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..aaf592b2eee --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..3eae383b79b --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..35b9473b6c5 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..0a9716c9783 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..f74d363aec1 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..4ec6e0ff791 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..e0f6a407ed5 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..2cd54e5cfc0 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..8cfe2bcdb76 --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..2568fd1fdaf --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,65 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/resteasy/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate-withXml/README.md b/samples/client/petstore/java/resttemplate-withXml/README.md index 6435fa1c756..c5192898f44 100644 --- a/samples/client/petstore/java/resttemplate-withXml/README.md +++ b/samples/client/petstore/java/resttemplate-withXml/README.md @@ -1,4 +1,4 @@ -# swagger-petstore-resttemplate +# swagger-pestore-resttemplate-withxml ## Requirements @@ -27,7 +27,7 @@ Add this dependency to your project's POM: ```xml io.swagger - swagger-petstore-resttemplate + swagger-pestore-resttemplate-withxml 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-resttemplate:1.0.0" +compile "io.swagger:swagger-pestore-resttemplate-withxml:1.0.0" ``` ### Others @@ -49,7 +49,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* target/swagger-petstore-resttemplate-1.0.0.jar +* target/swagger-pestore-resttemplate-withxml-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(); - Boolean body = true; // Boolean | Input boolean as post body + AnotherFakeApi apiInstance = new AnotherFakeApi(); + Client body = new Client(); // Client | client model try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + Client result = apiInstance.testSpecialTags(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Exception when calling AnotherFakeApi#testSpecialTags"); e.printStackTrace(); } } @@ -90,6 +90,7 @@ 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 | @@ -97,6 +98,9 @@ Class | Method | HTTP request | Description *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 @@ -164,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/resttemplate-withXml/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index 498232b10f3..59b1a125a80 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -135,9 +135,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Animal.java index 8bf17b5aa20..2d6dcc24199 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Animal.java @@ -119,9 +119,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/AnimalFarm.java index 4211624eadb..06d05dc183d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -60,9 +60,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index 3b8060ade59..6ecbfddc34c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -100,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index 35ac9d8f82f..4c483b347c9 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -100,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ArrayTest.java index 1d87c79cf23..04c7a66cef0 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ArrayTest.java @@ -170,9 +170,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Capitalization.java index e615819e615..74039b637cb 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Capitalization.java @@ -212,9 +212,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Cat.java index 2c3754590a1..638a0abd234 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Cat.java @@ -89,9 +89,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Category.java index 9b1a6831a5e..a5b09a48abc 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Category.java @@ -112,9 +112,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ClassModel.java index ff47df4679a..a99ed157548 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ClassModel.java @@ -88,9 +88,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Client.java index 6abf4ded943..448ab7cfc26 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Client.java @@ -87,9 +87,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Dog.java index 3a1c69148bc..1b2539d5beb 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Dog.java @@ -89,9 +89,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/EnumArrays.java index 826a8c7dc57..e000ada8cd0 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/EnumArrays.java @@ -194,9 +194,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/EnumTest.java index 5eed460c5f7..de73b0992e2 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/EnumTest.java @@ -270,9 +270,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/FormatTest.java index d0860fabab4..6cd5bb28a21 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/FormatTest.java @@ -401,9 +401,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 9d54eca095a..7971cb3eebb 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/MapTest.java index 72a58a1ee68..8e6f121cbf0 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/MapTest.java @@ -170,9 +170,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 2819b08e715..ba6f5747b0b 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Model200Response.java index fe0f079c094..b6cb589efd7 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Model200Response.java @@ -113,9 +113,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ModelApiResponse.java index 4fd7b7ec649..784bc1594b9 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -137,9 +137,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ModelReturn.java index 01db1577d56..c66c3a72eac 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ModelReturn.java @@ -88,9 +88,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Name.java index 546adf743d4..83bc43d596a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Name.java @@ -145,9 +145,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/NumberOnly.java index 657647cd2e3..14eebb957c6 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/NumberOnly.java @@ -88,9 +88,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Order.java index de1b90ef6a5..2b8befeed2c 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Order.java @@ -250,9 +250,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/OuterComposite.java index 1690010ca8c..b31bc4516a0 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/OuterComposite.java @@ -138,9 +138,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Pet.java index 0e43949b872..8218ddbbfbb 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Pet.java @@ -276,9 +276,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index 0b09758c5ea..d139fb81dff 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/SpecialModelName.java index b599c58ffdb..743faea8783 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -87,9 +87,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Tag.java index 624044bc22a..0dffad2a3eb 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/Tag.java @@ -112,9 +112,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/User.java index af41ec70447..c60d11759dd 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/io/swagger/client/model/User.java @@ -250,7 +250,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -262,9 +262,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/api/FakeApiTest.java index 65b341a3c52..47bebac6b92 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -167,6 +167,22 @@ public void testEnumParametersTest() { // TODO: test validations } + /** + * test inline additionalProperties + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testInlineAdditionalPropertiesTest() { + Object param = null; + api.testInlineAdditionalProperties(param); + + // TODO: test validations + } + /** * test json serialization of form data * diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..b4f92a36c34 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..64c259e27a8 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..f49a83b96c0 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..0835812b967 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..e1a135877f8 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..85df56981e1 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..37f246cef46 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..4c600ad6bfe --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..7c1c36eb1d8 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..0af24ee94c2 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..c5776ad73c1 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..391a26433df --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..c0afa7dcebd --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..173c6e24c09 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..98234657055 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..5d83bc6e110 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..39d72d21e2c --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..658e220c498 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..e387d196f41 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..1c5c0137b50 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8d7dbfe913b --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..aaf592b2eee --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..3eae383b79b --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..35b9473b6c5 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..0a9716c9783 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..f74d363aec1 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..4ec6e0ff791 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..e0f6a407ed5 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..2cd54e5cfc0 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..8cfe2bcdb76 --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..2568fd1fdaf --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,65 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/resttemplate/README.md b/samples/client/petstore/java/resttemplate/README.md index 4632c0742a4..7346000dce5 100644 --- a/samples/client/petstore/java/resttemplate/README.md +++ b/samples/client/petstore/java/resttemplate/README.md @@ -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(); - Boolean body = true; // Boolean | Input boolean as post body + AnotherFakeApi apiInstance = new AnotherFakeApi(); + Client body = new Client(); // Client | client model try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + Client result = apiInstance.testSpecialTags(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Exception when calling AnotherFakeApi#testSpecialTags"); e.printStackTrace(); } } @@ -90,6 +90,7 @@ 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 | @@ -97,6 +98,7 @@ Class | Method | HTTP request | Description *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 @@ -166,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/resttemplate/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index 7fe69e168fd..835e61cf560 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -122,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Animal.java index 590f36c0ae0..dd67c86fcc1 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Animal.java @@ -110,9 +110,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/AnimalFarm.java index 0b1d6a74cc6..77debcbb4bf 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -55,9 +55,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index b7e59a030a4..a8dbad3c79b 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index fdfeb6856f3..fe3aa91fa0b 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ArrayTest.java index 62665c2536a..8ea0e220981 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ArrayTest.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Capitalization.java index a72b0a72f46..9d3ad009209 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Capitalization.java @@ -195,9 +195,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Cat.java index b882da0ad90..9d37d2ddc2c 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Cat.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Category.java index 464f4375c4b..c8aa31c3b31 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Category.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ClassModel.java index 4f764fde68d..001903b555b 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ClassModel.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Client.java index a7c4253499c..2744720fca8 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Client.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Dog.java index 7de179b2ade..8543a31fff5 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Dog.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/EnumArrays.java index 12caa480285..b1fa858c53b 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/EnumArrays.java @@ -183,9 +183,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/EnumTest.java index 93d0da037b6..d9ac9c73d07 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/EnumTest.java @@ -257,9 +257,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/FormatTest.java index 4118656d29e..6b1493aa0fb 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/FormatTest.java @@ -370,9 +370,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 6dc9f12c4b8..1c583390fdc 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/MapTest.java index e6344a1df0f..5d84882844d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/MapTest.java @@ -157,9 +157,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 29bfc7e8c08..51d69a4d4bd 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -140,9 +140,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Model200Response.java index 58624475e43..b1919c97d7d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Model200Response.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ModelApiResponse.java index b010e53b48c..8e8c9ce43fb 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -126,9 +126,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ModelReturn.java index 27d08557248..106b625f889 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ModelReturn.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Name.java index f2b9b1703bd..8c7b16d11d6 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Name.java @@ -132,9 +132,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/NumberOnly.java index ec93aba0531..1657a8eabdd 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/NumberOnly.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Order.java index 6976ceb8fba..f2956b3405d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Order.java @@ -233,9 +233,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/OuterComposite.java index 02c16a99b70..332bd7964b3 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/OuterComposite.java @@ -127,9 +127,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Pet.java index 4c351dec3e4..52c4a0c01b7 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Pet.java @@ -249,9 +249,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index 76f8a912f36..aae35f87ff2 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/SpecialModelName.java index 784eb8baca8..d9531b57cb8 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Tag.java index 1cf2f5bc5e6..3485e1392c8 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/Tag.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/User.java index de5bc439c5a..103d935054d 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/io/swagger/client/model/User.java @@ -229,7 +229,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -241,9 +241,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/FakeApiTest.java index 65b341a3c52..47bebac6b92 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -167,6 +167,22 @@ public void testEnumParametersTest() { // TODO: test validations } + /** + * test inline additionalProperties + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testInlineAdditionalPropertiesTest() { + Object param = null; + api.testInlineAdditionalProperties(param); + + // TODO: test validations + } + /** * test json serialization of form data * diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/PetApiTest.java index fb1bb2810f6..f2c54db84a7 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/PetApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/PetApiTest.java @@ -1,317 +1,169 @@ -package io.swagger.client.api; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.*; +/* + * 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. + */ -import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule; -import io.swagger.TestUtils; -import io.swagger.client.*; -import io.swagger.client.api.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; +package io.swagger.client.api; -import java.io.BufferedWriter; 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 org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.RestClientException; -import org.threeten.bp.Instant; -import org.threeten.bp.OffsetDateTime; -import org.threeten.bp.ZonedDateTime; - -import static org.junit.Assert.*; - +/** + * API tests for PetApi + */ +@Ignore public class PetApiTest { - private PetApi api; - private ObjectMapper mapper; - - @Before - public void setup() { - api = new PetApi(); - // setup authentication - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) api.getApiClient().getAuthentication("api_key"); - apiKeyAuth.setApiKey("special-key"); - } - - @Test - public void testApiClient() { - // the default api client is used - assertNotNull(api.getApiClient()); - assertEquals("http://petstore.swagger.io:80/v2", api.getApiClient().getBasePath()); - assertFalse(api.getApiClient().isDebugging()); - - 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()); - } + private final PetApi api = new PetApi(); + + + /** + * Add a new pet to the store + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testCreateAndGetPet() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); + public void addPetTest() { + Pet body = null; + api.addPet(body); - 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 } - - /* + + /** + * Deletes a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testCreateAndGetPetWithByteArray() throws Exception { - Pet pet = createRandomPet(); - byte[] bytes = serializeJson(pet).getBytes(); - api.addPetUsingByteArray(bytes); + public void deletePetTest() { + Long petId = null; + String apiKey = null; + api.deletePet(petId, apiKey); - byte[] fetchedBytes = api.petPetIdtestingByteArraytrueGet(pet.getId()); - Pet fetched = deserializeJson(new String(fetchedBytes), Pet.class); - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); + // TODO: test validations } - - @Test - public void testGetPetByIdInObject() throws Exception { - Pet pet = new Pet(); - pet.setId(TestUtils.nextId()); - pet.setName("pet " + pet.getId()); - - 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")); - } - */ - + + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testUpdatePet() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); + public void findPetsByStatusTest() { + List status = null; + List response = api.findPetsByStatus(status); - 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 } - + + /** + * 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 testFindPetsByStatus() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - - api.updatePet(pet); - - List pets = api.findPetsByStatus(Arrays.asList(new String[]{"available"})); - assertNotNull(pets); + public void findPetsByTagsTest() { + List tags = null; + List response = api.findPetsByTags(tags); - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - - assertTrue(found); + // TODO: test validations } - -// this API is deprecated -// @Test -// public void testFindPetsByTags() throws Exception { -// Pet pet = createRandomPet(); -// pet.setName("monster"); -// pet.setStatus(Pet.StatusEnum.AVAILABLE); -// -// 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); -// } - + + /** + * Find pet by ID + * + * Returns a single pet + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testUpdatePetWithForm() throws Exception { - Pet pet = createRandomPet(); - pet.setName("frank"); - api.addPet(pet); + public void getPetByIdTest() { + Long petId = null; + Pet response = api.getPetById(petId); - Pet fetched = api.getPetById(pet.getId()); - - api.updatePetWithForm(fetched.getId(), "furt", null); - Pet updated = api.getPetById(fetched.getId()); - - assertEquals(updated.getName(), "furt"); + // TODO: test validations } - + + /** + * Update an existing pet + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testDeletePet() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); + public void updatePetTest() { + Pet body = null; + api.updatePet(body); - Pet fetched = api.getPetById(pet.getId()); - api.deletePet(fetched.getId(), null); - - try { - fetched = api.getPetById(fetched.getId()); - fail("expected an error"); - } catch (RestClientException e) { - assertTrue(e instanceof HttpClientErrorException); - assertEquals(404, ((HttpClientErrorException) e).getStatusCode().value()); - } + // TODO: test validations } - + + /** + * Updates a pet in the store with form data + * + * + * + * @throws ApiException + * if the Api call fails + */ @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(); + public void updatePetWithFormTest() { + Long petId = null; + String name = null; + String status = null; + api.updatePetWithForm(petId, name, status); - api.uploadFile(pet.getId(), "a test file", new File(file.getAbsolutePath())); + // TODO: test validations } - + + /** + * uploads an image + * + * + * + * @throws ApiException + * if the Api call fails + */ @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) { - if (mapper == null) { - mapper = createObjectMapper(); - } - try { - return mapper.writeValueAsString(o); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - private T deserializeJson(String json, Class klass) { - if (mapper == null) { - mapper = createObjectMapper(); - } - try { - return mapper.readValue(json, klass); - } catch (Exception e) { - throw new RuntimeException(e); - } - } + public void uploadFileTest() { + Long petId = null; + String additionalMetadata = null; + File file = null; + ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - private ObjectMapper createObjectMapper() { - ObjectMapper mapper = new ObjectMapper(); - mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); - mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); - mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); - ThreeTenModule module = new ThreeTenModule(); - module.addDeserializer(Instant.class, CustomInstantDeserializer.INSTANT); - module.addDeserializer(OffsetDateTime.class, CustomInstantDeserializer.OFFSET_DATE_TIME); - module.addDeserializer(ZonedDateTime.class, CustomInstantDeserializer.ZONED_DATE_TIME); - mapper.registerModule(module); - return mapper; + // TODO: test validations } + } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/StoreApiTest.java index 16b9531dea8..44d442e00ec 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/StoreApiTest.java @@ -1,102 +1,97 @@ -package io.swagger.client.api; - -import io.swagger.TestUtils; +/* + * 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. + */ -import io.swagger.client.*; -import io.swagger.client.api.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; -import java.lang.reflect.Field; -import java.util.Map; -import java.text.SimpleDateFormat; +package io.swagger.client.api; -import org.junit.*; -import org.springframework.web.client.RestClientException; -import org.threeten.bp.OffsetDateTime; +import io.swagger.client.model.Order; +import org.junit.Test; +import org.junit.Ignore; -import static org.junit.Assert.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +/** + * 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")); - } - - @Test - public void testGetInventory() throws Exception { - Map inventory = api.getInventory(); - assertTrue(inventory.keySet().size() > 0); - } - /* + 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 testGetInventoryInObject() throws Exception { - Object inventoryObj = api.getInventoryInObject(); - assertTrue(inventoryObj instanceof Map); - - Map inventoryMap = (Map) inventoryObj; - assertTrue(inventoryMap.keySet().size() > 0); + public void deleteOrderTest() { + String orderId = null; + api.deleteOrder(orderId); - Map.Entry firstEntry = (Map.Entry) inventoryMap.entrySet().iterator().next(); - assertTrue(firstEntry.getKey() instanceof String); - assertTrue(firstEntry.getValue() instanceof Integer); + // 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 testPlaceOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); + public void getInventoryTest() { + Map response = api.getInventory(); - 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 } - + + /** + * 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 testDeleteOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); - - Order fetched = api.getOrderById(order.getId()); - assertEquals(fetched.getId(), order.getId()); + public void getOrderByIdTest() { + Long orderId = null; + Order response = api.getOrderById(orderId); - api.deleteOrder(String.valueOf(order.getId())); - - try { - api.getOrderById(order.getId()); - // fail("expected an error"); - } catch (RestClientException e) { - // ok - } + // TODO: test validations } + + /** + * Place an order for a pet + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void placeOrderTest() { + Order body = null; + Order response = api.placeOrder(body); - private Order createOrder() { - Order order = new Order(); - order.setPetId(new Long(200)); - order.setQuantity(new Integer(13)); - 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/resttemplate/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/UserApiTest.java index c7fb92d2552..fca5f719231 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/api/UserApiTest.java @@ -1,88 +1,163 @@ -package io.swagger.client.api; +/* + * 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. + */ -import io.swagger.TestUtils; -import io.swagger.client.api.*; -import io.swagger.client.auth.*; -import io.swagger.client.model.*; +package io.swagger.client.api; -import java.util.Arrays; +import io.swagger.client.model.User; +import org.junit.Test; +import org.junit.Ignore; -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() { + 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() { + 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() { + 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 deleteUserTest() { + String username = null; + api.deleteUser(username); + // TODO: test validations + } + + /** + * Get user by user name + * + * + * + * @throws ApiException + * if the Api call fails + */ @Test - public void testLoginUser() throws Exception { - User user = createUser(); - api.createUser(user); + public void getUserByNameTest() { + String username = null; + User response = api.getUserByName(username); - String token = api.loginUser(user.getUsername(), user.getPassword()); - assertTrue(token.startsWith("logged in user session:")); + // TODO: test validations } + + /** + * Logs user into the system + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void loginUserTest() { + 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 logoutUser() throws Exception { + public void logoutUserTest() { 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); + // 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() { + String username = null; + User body = null; + api.updateUser(username, body); - return user; + // TODO: test validations } + } diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..b4f92a36c34 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..64c259e27a8 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..f49a83b96c0 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..0835812b967 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..e1a135877f8 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..85df56981e1 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..37f246cef46 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..4c600ad6bfe --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..7c1c36eb1d8 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..0af24ee94c2 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..c5776ad73c1 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..391a26433df --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..c0afa7dcebd --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..173c6e24c09 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..98234657055 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..5d83bc6e110 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..39d72d21e2c --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..658e220c498 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..e387d196f41 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..1c5c0137b50 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8d7dbfe913b --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..aaf592b2eee --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..3eae383b79b --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..35b9473b6c5 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..0a9716c9783 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..f74d363aec1 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..4ec6e0ff791 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..e0f6a407ed5 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..2cd54e5cfc0 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..8cfe2bcdb76 --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..2568fd1fdaf --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,65 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/resttemplate/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit/README.md b/samples/client/petstore/java/retrofit/README.md index 93488cf4e5c..424ab81784e 100644 --- a/samples/client/petstore/java/retrofit/README.md +++ b/samples/client/petstore/java/retrofit/README.md @@ -34,7 +34,7 @@ After the client library is installed/deployed, you can use it in your Maven pro ## 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/retrofit/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index b302fdf6012..0365a240a9a 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -125,9 +125,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Animal.java index f65c5bffcb3..0f2496a7174 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Animal.java @@ -107,9 +107,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/AnimalFarm.java index 0b1d6a74cc6..77debcbb4bf 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -55,9 +55,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index f9956fe46d8..7bab354ff9b 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index c79610d1c66..b1104901093 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ArrayTest.java index 747182e792e..f85b2be7ee8 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ArrayTest.java @@ -156,9 +156,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Capitalization.java index 00c564ab727..76de2eb0ac4 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Capitalization.java @@ -198,9 +198,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Cat.java index 64d3fbdc7fe..a950640dbb6 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Cat.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Category.java index 4e9f8f56e5e..6990e2cb869 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Category.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ClassModel.java index 4cf0a053250..93abc0b3447 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ClassModel.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Client.java index 43b20dce8da..1bbedfa3488 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Client.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Dog.java index 8fad06d9835..b87d1262d2b 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Dog.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/EnumArrays.java index 5f063c2ec38..06e00b39a57 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/EnumArrays.java @@ -210,9 +210,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/EnumTest.java index fb20599a85c..59888d5eb0e 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/EnumTest.java @@ -296,9 +296,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/FormatTest.java index 5c0f01dd86b..ecdda21caf7 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/FormatTest.java @@ -373,9 +373,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 1b7ff181941..e3e0255689e 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -88,9 +88,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/MapTest.java index a791e68d8fb..003438690e6 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/MapTest.java @@ -172,9 +172,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index d023144f768..f344d1cb9b0 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -143,9 +143,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Model200Response.java index 0d39eb7eff5..5628f9e5487 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Model200Response.java @@ -107,9 +107,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ModelApiResponse.java index 3d9352c50aa..193e69fd08a 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -129,9 +129,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ModelReturn.java index ab6333ff86d..290780c8b5e 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ModelReturn.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Name.java index 1492add2952..35241e53af1 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Name.java @@ -135,9 +135,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/NumberOnly.java index b13c0536a13..d34198289ee 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/NumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Order.java index bea33fc7fb3..7a4e3b45bd6 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Order.java @@ -248,9 +248,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/OuterComposite.java index 56159fe5d93..795c17c57b5 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/OuterComposite.java @@ -130,9 +130,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Pet.java index dac1250ac07..5982c3bc344 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Pet.java @@ -264,9 +264,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index f6e025412de..630bf812cd7 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -97,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/SpecialModelName.java index e743292100b..2458c05b328 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Tag.java index bb6de58c8a1..cf94c065e5b 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Tag.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/User.java index 4ccb8a1c147..5fbfde3bba6 100644 --- a/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/User.java @@ -232,7 +232,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -244,9 +244,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/FakeApiTest.java index 49bc4b90504..b365b5fc862 100644 --- a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -2,7 +2,10 @@ import io.swagger.client.ApiClient; import java.math.BigDecimal; -import java.util.Date; +import io.swagger.client.model.Client; +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +import io.swagger.client.model.OuterComposite; import org.junit.Before; import org.junit.Test; @@ -24,6 +27,71 @@ public void setup() { } + /** + * + * + * Test serialization of outer boolean types + */ + @Test + public void fakeOuterBooleanSerializeTest() { + Boolean body = null; + // Boolean response = api.fakeOuterBooleanSerialize(body); + + // TODO: test validations + } + + /** + * + * + * Test serialization of object with outer number type + */ + @Test + public void fakeOuterCompositeSerializeTest() { + OuterComposite body = null; + // OuterComposite response = api.fakeOuterCompositeSerialize(body); + + // TODO: test validations + } + + /** + * + * + * Test serialization of outer number types + */ + @Test + public void fakeOuterNumberSerializeTest() { + BigDecimal body = null; + // BigDecimal response = api.fakeOuterNumberSerialize(body); + + // TODO: test validations + } + + /** + * + * + * Test serialization of outer string types + */ + @Test + public void fakeOuterStringSerializeTest() { + String body = null; + // String response = api.fakeOuterStringSerialize(body); + + // TODO: test validations + } + + /** + * To test \"client\" model + * + * To test \"client\" model + */ + @Test + public void testClientModelTest() { + Client body = null; + // Client response = api.testClientModel(body); + + // TODO: test validations + } + /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @@ -33,17 +101,66 @@ public void setup() { public void testEndpointParametersTest() { 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; + DateTime dateTime = null; String password = null; - // Void response = api.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password); + String paramCallback = null; + // Void response = 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 + */ + @Test + public void testEnumParametersTest() { + List enumFormStringArray = null; + String enumFormString = null; + List enumHeaderStringArray = null; + String enumHeaderString = null; + List enumQueryStringArray = null; + String enumQueryString = null; + Integer enumQueryInteger = null; + Double enumQueryDouble = null; + // Void response = api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); + + // TODO: test validations + } + + /** + * test inline additionalProperties + * + * + */ + @Test + public void testInlineAdditionalPropertiesTest() { + Object param = null; + // Void response = api.testInlineAdditionalProperties(param); + + // TODO: test validations + } + + /** + * test json serialization of form data + * + * + */ + @Test + public void testJsonFormDataTest() { + String param = null; + String param2 = null; + // Void response = api.testJsonFormData(param, param2); // TODO: test validations } diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/PetApiTest.java index 70f8b5aa13f..a3688eb35c5 100644 --- a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/PetApiTest.java +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/PetApiTest.java @@ -1,190 +1,137 @@ package io.swagger.client.api; -import io.swagger.TestUtils; - -import io.swagger.client.*; -import io.swagger.client.CollectionFormats.*; -import io.swagger.client.model.*; - -import retrofit.RetrofitError; -import retrofit.mime.TypedFile; - -import java.io.BufferedWriter; +import io.swagger.client.ApiClient; import java.io.File; -import java.io.FileWriter; +import io.swagger.client.model.ModelApiResponse; +import io.swagger.client.model.Pet; +import org.junit.Before; +import org.junit.Test; + 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 + */ public class PetApiTest { - PetApi api = null; + + private PetApi api; @Before public void setup() { api = new ApiClient().createService(PetApi.class); } + + /** + * Add a new pet to the store + * + * + */ @Test - public void testCreateAndGetPet() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); + public void addPetTest() { + Pet body = null; + // Void response = api.addPet(body); - 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 } - + + /** + * Deletes a pet + * + * + */ @Test - public void testUpdatePet() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); - - api.updatePet(pet); + public void deletePetTest() { + Long petId = null; + String apiKey = null; + // Void response = 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 + */ @Test - public void testFindPetsByStatus() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - - api.updatePet(pet); - - List pets = api.findPetsByStatus(new CSVParams("available")); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } + public void findPetsByStatusTest() { + List status = null; + // List response = api.findPetsByStatus(status); - assertTrue(found); + // TODO: test validations } - + + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + */ @Test - public void testFindPetsByTags() throws Exception { - Pet pet = createRandomPet(); - pet.setName("monster"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - - List tags = new ArrayList(); - Tag tag1 = new Tag(); - tag1.setName("friendly"); - tags.add(tag1); - pet.setTags(tags); - - api.updatePet(pet); + public void findPetsByTagsTest() { + List tags = null; + // List response = api.findPetsByTags(tags); - List pets = api.findPetsByTags(new CSVParams("friendly")); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - assertTrue(found); + // TODO: test validations } - + + /** + * Find pet by ID + * + * Returns a single pet + */ @Test - public void testUpdatePetWithForm() throws Exception { - Pet pet = createRandomPet(); - pet.setName("frank"); - api.addPet(pet); - - Pet fetched = api.getPetById(pet.getId()); - - api.updatePetWithForm(fetched.getId(), "furt", null); - Pet updated = api.getPetById(fetched.getId()); + public void getPetByIdTest() { + Long petId = null; + // Pet response = api.getPetById(petId); - assertEquals(updated.getName(), "furt"); + // TODO: test validations } - + + /** + * Update an existing pet + * + * + */ @Test - public void testDeletePet() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet); - - Pet fetched = api.getPetById(pet.getId()); - api.deletePet(fetched.getId(), null); + public void updatePetTest() { + Pet body = null; + // Void response = api.updatePet(body); - try { - fetched = api.getPetById(fetched.getId()); - fail("expected an error"); - } catch (RetrofitError e) { - assertEquals(404, e.getResponse().getStatus()); - } + // TODO: test validations } - + + /** + * Updates a pet in the store with form data + * + * + */ @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(); + public void updatePetWithFormTest() { + Long petId = null; + String name = null; + String status = null; + // Void response = api.updatePetWithForm(petId, name, status); - api.uploadFile(pet.getId(), "a test file", new TypedFile("text/plain", file)); + // TODO: test validations } - + + /** + * uploads an image + * + * + */ @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); + public void uploadFileTest() { + Long petId = null; + String additionalMetadata = null; + File file = null; + // ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - return pet; + // TODO: test validations } + } diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/StoreApiTest.java index a290fadb847..1da787edf19 100644 --- a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/StoreApiTest.java @@ -1,80 +1,77 @@ package io.swagger.client.api; -import io.swagger.TestUtils; - import io.swagger.client.ApiClient; -import io.swagger.client.model.*; - -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import retrofit.RetrofitError; +import io.swagger.client.model.Order; +import org.junit.Before; +import org.junit.Test; -import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; import java.util.Map; -import org.junit.*; -import static org.junit.Assert.*; - +/** + * API tests for StoreApi + */ public class StoreApiTest { - StoreApi api = null; + + private StoreApi api; @Before public void setup() { api = new ApiClient().createService(StoreApi.class); } + + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + */ @Test - public void testGetInventory() throws Exception { - Map inventory = api.getInventory(); - assertTrue(inventory.keySet().size() > 0); - } + public void deleteOrderTest() { + String orderId = null; + // Void response = api.deleteOrder(orderId); + // TODO: test validations + } + + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + */ @Test - public void testPlaceOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); + public void getInventoryTest() { + // Map response = api.getInventory(); - Order fetched = api.getOrderById(order.getId()); - assertEquals(order.getId(), fetched.getId()); - assertEquals(order.getPetId(), fetched.getPetId()); - assertEquals(order.getQuantity(), fetched.getQuantity()); - assertEquals(order.getShipDate().withZone(DateTimeZone.UTC), fetched.getShipDate().withZone(DateTimeZone.UTC)); + // TODO: test validations } - + + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + */ @Test - public void testDeleteOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order); - - Order fetched = api.getOrderById(order.getId()); - assertEquals(fetched.getId(), order.getId()); - - api.deleteOrder(String.valueOf(order.getId())); + public void getOrderByIdTest() { + Long orderId = null; + // Order response = api.getOrderById(orderId); - try { - api.getOrderById(order.getId()); - // fail("expected an error"); - } catch (RetrofitError e) { - // ok - } + // TODO: test validations } + + /** + * Place an order for a pet + * + * + */ + @Test + public void placeOrderTest() { + Order body = null; + // Order response = api.placeOrder(body); - private Order createOrder() { - Order order = new Order(); - order.setPetId(new Long(200)); - order.setQuantity(new Integer(13)); - order.setShipDate(DateTime.now()); - 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/retrofit/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/UserApiTest.java index 84fae0e990f..cd8553d8419 100644 --- a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/api/UserApiTest.java @@ -1,85 +1,131 @@ package io.swagger.client.api; -import io.swagger.TestUtils; - import io.swagger.client.ApiClient; -import io.swagger.client.model.*; - - -import java.util.Arrays; - -import org.junit.*; -import static org.junit.Assert.*; - +import io.swagger.client.model.User; +import org.junit.Before; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for UserApi + */ public class UserApiTest { - UserApi api = null; + + private UserApi api; @Before public void setup() { api = new ApiClient().createService(UserApi.class); } + + /** + * Create user + * + * This can only be done by the logged in user. + */ @Test - public void testCreateUser() throws Exception { - User user = createUser(); - - api.createUser(user); + public void createUserTest() { + User body = null; + // Void response = api.createUser(body); - User fetched = api.getUserByName(user.getUsername()); - assertEquals(user.getId(), fetched.getId()); + // TODO: test validations } - + + /** + * Creates list of users with given input array + * + * + */ @Test - public void testCreateUsersWithArray() throws Exception { - User user1 = createUser(); - user1.setUsername("user" + user1.getId()); - User user2 = createUser(); - user2.setUsername("user" + user2.getId()); - - api.createUsersWithArrayInput(Arrays.asList(new User[]{user1, user2})); + public void createUsersWithArrayInputTest() { + List body = null; + // Void response = api.createUsersWithArrayInput(body); - User fetched = api.getUserByName(user1.getUsername()); - assertEquals(user1.getId(), fetched.getId()); + // TODO: test validations } - + + /** + * Creates list of users with given input array + * + * + */ @Test - public void testCreateUsersWithList() throws Exception { - User user1 = createUser(); - user1.setUsername("user" + user1.getId()); - User user2 = createUser(); - user2.setUsername("user" + user2.getId()); - - api.createUsersWithListInput(Arrays.asList(new User[]{user1, user2})); + public void createUsersWithListInputTest() { + List body = null; + // Void response = api.createUsersWithListInput(body); - 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. + */ @Test - public void testLoginUser() throws Exception { - User user = createUser(); - api.createUser(user); + public void deleteUserTest() { + String username = null; + // Void response = 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 + * + * + */ + @Test + public void getUserByNameTest() { + String username = null; + // User response = api.getUserByName(username); + // TODO: test validations + } + + /** + * Logs user into the system + * + * + */ @Test - public void logoutUser() throws Exception { - api.logoutUser(); + public void loginUserTest() { + String username = null; + String password = null; + // String response = api.loginUser(username, password); + + // TODO: test validations } + + /** + * Logs out current logged in user session + * + * + */ + @Test + public void logoutUserTest() { + // Void response = 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); + // TODO: test validations + } + + /** + * Updated user + * + * This can only be done by the logged in user. + */ + @Test + public void updateUserTest() { + String username = null; + User body = null; + // Void response = api.updateUser(username, body); - return user; + // TODO: test validations } + } diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..74046700000 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..8e413da6ec0 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..cbbc6f0ad9d --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..8a6c08553b3 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..fe91e996621 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..90d8387bacb --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..964024ac4f2 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..a2f870e0048 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..2f31c6c52ad --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..592f9fe0ef1 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..32ff0e644c5 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..c6d17620427 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..701665831ae --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..7553579c23a --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.annotations.SerializedName; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..034cd6a875f --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..0e8b5f06185 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.UUID; +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..24bb0845a2d --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..6d431520076 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..e3da7a0b3d9 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,64 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.joda.time.DateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..5f0c6be0108 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..19a406bc7c5 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..9ff808d60da --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..bff0d4833cb --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..65acf3703dd --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..74836a79130 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.joda.time.DateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..80f3c1d02c7 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..aa261cd748b --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.annotations.SerializedName; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..11f7b5b65b2 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..a7502d6961c --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..5d36e84e3c9 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..db107ff8b23 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..e1a6d2ca9ef --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,68 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..22b7b0b50e4 --- /dev/null +++ b/samples/client/petstore/java/retrofit/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index f03052a0c41..9de5c01f7b4 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -125,9 +125,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Animal.java index 023cb11b7eb..7a11640d9fe 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Animal.java @@ -113,9 +113,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/AnimalFarm.java index fc38d86a0aa..13aae599ec2 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -57,9 +57,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index a5f6292b7b4..2c104938973 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index 443501f0598..97be51cbd7f 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ArrayTest.java index 4934689e7dc..7ac89a7aa3c 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ArrayTest.java @@ -157,9 +157,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Capitalization.java index e7a0b0ac935..4bd82562ffb 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Capitalization.java @@ -197,9 +197,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Cat.java index 7c513d6d6dd..28e41790556 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Cat.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Category.java index bf8840d5fcf..c4b255c8029 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Category.java @@ -105,9 +105,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ClassModel.java index f3d9160e3db..b2c43181441 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ClassModel.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Client.java index a09f13e7a2c..d80fc01d6cb 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Client.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Dog.java index 3835e2aca37..c0844a8f7ae 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Dog.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/EnumArrays.java index f3cff0ea172..2e97479e1cc 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/EnumArrays.java @@ -185,9 +185,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/EnumTest.java index 779c3abcc1b..5ed24c5672b 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/EnumTest.java @@ -260,9 +260,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/FormatTest.java index 1d332a76d97..93888f145e5 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/FormatTest.java @@ -380,9 +380,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 5f86fb84a96..9be4526ac01 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -87,9 +87,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/MapTest.java index 1a15255161d..2afb394d73f 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/MapTest.java @@ -160,9 +160,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 01184029234..dae78da565a 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -145,9 +145,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Model200Response.java index 89ed29eca5d..36c50909d9e 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Model200Response.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ModelApiResponse.java index acfb194d9d7..4cbf8480fcd 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -128,9 +128,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ModelReturn.java index d372354eb7e..9da70cdf5de 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ModelReturn.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Name.java index c09048cce39..03d78b2a79c 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Name.java @@ -135,9 +135,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/NumberOnly.java index 91ab4497dc2..7548395f741 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/NumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Order.java index 752a57cbde8..9135851b33a 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Order.java @@ -236,9 +236,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/OuterComposite.java index 5b0e216eaa2..d607e29d2bd 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/OuterComposite.java @@ -130,9 +130,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Pet.java index 653a9765a66..906feaf5055 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Pet.java @@ -255,9 +255,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index dc2373a365d..f93a9acec23 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/SpecialModelName.java index f01a06d4c78..6236e72c023 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Tag.java index 71ff1bfcf67..8ad72da4f28 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/Tag.java @@ -105,9 +105,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/User.java index 82c6be534ec..71591f321ee 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/io/swagger/client/model/User.java @@ -231,7 +231,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -243,9 +243,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/FakeApiTest.java index ab4b7c2c53d..7d4d6f4ac3e 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -3,8 +3,9 @@ import io.swagger.client.ApiClient; import java.math.BigDecimal; import io.swagger.client.model.Client; -import org.joda.time.DateTime; -import org.joda.time.LocalDate; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import io.swagger.client.model.OuterComposite; import org.junit.Before; import org.junit.Test; @@ -25,11 +26,58 @@ public void setup() { api = new ApiClient().createService(FakeApi.class); } - /** - * To test \"client\" model + * + * + * Test serialization of outer boolean types + */ + @Test + public void fakeOuterBooleanSerializeTest() { + Boolean body = null; + // Boolean response = api.fakeOuterBooleanSerialize(body); + + // TODO: test validations + } + /** + * + * + * Test serialization of object with outer number type + */ + @Test + public void fakeOuterCompositeSerializeTest() { + OuterComposite body = null; + // OuterComposite response = api.fakeOuterCompositeSerialize(body); + + // TODO: test validations + } + /** + * * + * Test serialization of outer number types + */ + @Test + public void fakeOuterNumberSerializeTest() { + BigDecimal body = null; + // BigDecimal response = api.fakeOuterNumberSerialize(body); + + // TODO: test validations + } + /** * + * + * Test serialization of outer string types + */ + @Test + public void fakeOuterStringSerializeTest() { + String body = null; + // String response = api.fakeOuterStringSerialize(body); + + // TODO: test validations + } + /** + * To test \"client\" model + * + * To test \"client\" model */ @Test public void testClientModelTest() { @@ -38,7 +86,6 @@ public void testClientModelTest() { // TODO: test validations } - /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @@ -57,18 +104,17 @@ public void testEndpointParametersTest() { String string = null; byte[] binary = null; LocalDate date = null; - DateTime dateTime = null; + OffsetDateTime dateTime = null; String password = null; String paramCallback = null; // Void response = 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 */ @Test public void testEnumParametersTest() { @@ -78,11 +124,35 @@ public void testEnumParametersTest() { String enumHeaderString = null; List enumQueryStringArray = null; String enumQueryString = null; - BigDecimal enumQueryInteger = null; + Integer enumQueryInteger = null; Double enumQueryDouble = null; // Void response = api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); // TODO: test validations } - + /** + * test inline additionalProperties + * + * + */ + @Test + public void testInlineAdditionalPropertiesTest() { + Object param = null; + // Void response = api.testInlineAdditionalProperties(param); + + // TODO: test validations + } + /** + * test json serialization of form data + * + * + */ + @Test + public void testJsonFormDataTest() { + String param = null; + String param2 = null; + // Void response = api.testJsonFormData(param, param2); + + // TODO: test validations + } } diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java index 2fd2c16ed50..ac6b922d846 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java @@ -22,7 +22,6 @@ public void setup() { api = new ApiClient().createService(FakeClassnameTags123Api.class); } - /** * To test class name in snake case * @@ -35,5 +34,4 @@ public void testClassnameTest() { // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/PetApiTest.java index a3688eb35c5..3301ee8f78a 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/PetApiTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/PetApiTest.java @@ -24,7 +24,6 @@ public void setup() { api = new ApiClient().createService(PetApi.class); } - /** * Add a new pet to the store * @@ -37,7 +36,6 @@ public void addPetTest() { // TODO: test validations } - /** * Deletes a pet * @@ -51,7 +49,6 @@ public void deletePetTest() { // TODO: test validations } - /** * Finds Pets by status * @@ -64,7 +61,6 @@ public void findPetsByStatusTest() { // TODO: test validations } - /** * Finds Pets by tags * @@ -77,7 +73,6 @@ public void findPetsByTagsTest() { // TODO: test validations } - /** * Find pet by ID * @@ -90,7 +85,6 @@ public void getPetByIdTest() { // TODO: test validations } - /** * Update an existing pet * @@ -103,7 +97,6 @@ public void updatePetTest() { // TODO: test validations } - /** * Updates a pet in the store with form data * @@ -118,7 +111,6 @@ public void updatePetWithFormTest() { // TODO: test validations } - /** * uploads an image * @@ -133,5 +125,4 @@ public void uploadFileTest() { // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/StoreApiTest.java index 1da787edf19..2cf3744e388 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/StoreApiTest.java @@ -22,7 +22,6 @@ public void setup() { api = new ApiClient().createService(StoreApi.class); } - /** * Delete purchase order by ID * @@ -35,7 +34,6 @@ public void deleteOrderTest() { // TODO: test validations } - /** * Returns pet inventories by status * @@ -47,7 +45,6 @@ public void getInventoryTest() { // TODO: test validations } - /** * Find purchase order by ID * @@ -60,7 +57,6 @@ public void getOrderByIdTest() { // TODO: test validations } - /** * Place an order for a pet * @@ -73,5 +69,4 @@ public void placeOrderTest() { // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/UserApiTest.java index cd8553d8419..3fcb0215709 100644 --- a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/api/UserApiTest.java @@ -22,7 +22,6 @@ public void setup() { api = new ApiClient().createService(UserApi.class); } - /** * Create user * @@ -35,7 +34,6 @@ public void createUserTest() { // TODO: test validations } - /** * Creates list of users with given input array * @@ -48,7 +46,6 @@ public void createUsersWithArrayInputTest() { // TODO: test validations } - /** * Creates list of users with given input array * @@ -61,7 +58,6 @@ public void createUsersWithListInputTest() { // TODO: test validations } - /** * Delete user * @@ -74,7 +70,6 @@ public void deleteUserTest() { // TODO: test validations } - /** * Get user by user name * @@ -87,7 +82,6 @@ public void getUserByNameTest() { // TODO: test validations } - /** * Logs user into the system * @@ -101,7 +95,6 @@ public void loginUserTest() { // TODO: test validations } - /** * Logs out current logged in user session * @@ -113,7 +106,6 @@ public void logoutUserTest() { // TODO: test validations } - /** * Updated user * @@ -127,5 +119,4 @@ public void updateUserTest() { // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..84d02ecf658 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..424874055c3 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..9a4d95cb9e9 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..2501166ae24 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..ed6d33081af --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..515c25bc9d9 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..a42c147daf4 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..8e67d7d7287 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..f5bf813e51a --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..810b0c70eaf --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..ddb7c2410cb --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..e38deb742e5 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..308d38fa7e9 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..7aa1271379d --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..9147c2bab55 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..bed0aa15fe2 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..7eea2ebd5af --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..1c4e9068edf --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..e29225e3f1d --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..95380a5e509 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..55e2a4f8c5b --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..2c8ba2fe838 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..872650d606a --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..4fb276bc340 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..f37ead1f554 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..3fa82f98e2a --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..7d5a747ff42 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..2bfd265342a --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..e0830ba9360 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..805c806a70a --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..bdd993ba05f --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..82755d5c4e5 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,66 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..23774a11170 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play24/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,100 @@ +/* + * 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.model.util; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2-play25/build.gradle b/samples/client/petstore/java/retrofit2-play25/build.gradle index 949928aa0c7..03b89268001 100644 --- a/samples/client/petstore/java/retrofit2-play25/build.gradle +++ b/samples/client/petstore/java/retrofit2-play25/build.gradle @@ -101,6 +101,7 @@ ext { swagger_annotations_version = "1.5.15" junit_version = "4.12" threetenbp_version = "1.3.5" + json_fire_version = "1.8.0" } dependencies { @@ -109,6 +110,7 @@ dependencies { compile "com.squareup.retrofit2:converter-gson:$retrofit_version" compile "io.swagger:swagger-annotations:$swagger_annotations_version" compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version" + compile "io.gsonfire:gson-fire:$json_fire_version" compile "org.threeten:threetenbp:$threetenbp_version" compile "com.typesafe.play:play-java-ws_2.11:$play_version" compile "com.squareup.retrofit2:converter-jackson:$retrofit_version" diff --git a/samples/client/petstore/java/retrofit2-play25/build.sbt b/samples/client/petstore/java/retrofit2-play25/build.sbt index c1a0220619c..1988e88ce9a 100644 --- a/samples/client/petstore/java/retrofit2-play25/build.sbt +++ b/samples/client/petstore/java/retrofit2-play25/build.sbt @@ -19,6 +19,7 @@ lazy val root = (project in file(".")). "io.swagger" % "swagger-annotations" % "1.5.15" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "org.threeten" % "threetenbp" % "1.3.5" % "compile", + "io.gsonfire" % "gson-fire" % "1.8.0" % "compile", "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.11" % "test" ) diff --git a/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md index 1467a2943d6..3e052dea273 100644 --- a/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play25/docs/FakeApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters +[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** fake/jsonFormData | test json serialization of form data @@ -267,7 +268,7 @@ FakeApi apiInstance = new FakeApi(); BigDecimal number = new BigDecimal(); // BigDecimal | None Double _double = 3.4D; // Double | None String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = _byte_example; // byte[] | None +byte[] _byte = B; // byte[] | None Integer integer = 56; // Integer | None Integer int32 = 56; // Integer | None Long int64 = 789L; // Long | None @@ -378,6 +379,51 @@ No authorization required - **Content-Type**: */* - **Accept**: */* + +# **testInlineAdditionalProperties** +> Void testInlineAdditionalProperties(param) + +test inline additionalProperties + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +Object param = null; // Object | request body +try { + Void result = apiInstance.testInlineAdditionalProperties(param); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **Object**| request body | + +### Return type + +[**Void**](.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + # **testJsonFormData** > Void testJsonFormData(param, param2) diff --git a/samples/client/petstore/java/retrofit2-play25/git_push.sh b/samples/client/petstore/java/retrofit2-play25/git_push.sh index ed374619b13..ae01b182ae9 100644 --- a/samples/client/petstore/java/retrofit2-play25/git_push.sh +++ b/samples/client/petstore/java/retrofit2-play25/git_push.sh @@ -36,7 +36,7 @@ git_remote=`git remote` if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git else git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git diff --git a/samples/client/petstore/java/retrofit2-play25/pom.xml b/samples/client/petstore/java/retrofit2-play25/pom.xml index f8c24b3fb91..dd13a120e80 100644 --- a/samples/client/petstore/java/retrofit2-play25/pom.xml +++ b/samples/client/petstore/java/retrofit2-play25/pom.xml @@ -1,257 +1,282 @@ - 4.0.0 - io.swagger - swagger-java-client - jar - swagger-java-client - 1.0.0 - https://github.com/swagger-api/swagger-codegen - Swagger Java - - scm:git:git@github.com:swagger-api/swagger-codegen.git - scm:git:git@github.com:swagger-api/swagger-codegen.git + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + io.swagger + swagger-java-client + jar + swagger-java-client + 1.0.0 https://github.com/swagger-api/swagger-codegen - - - 2.2.0 - + Swagger Java + + scm:git:git@github.com:swagger-api/swagger-codegen.git + scm:git:git@github.com:swagger-api/swagger-codegen.git + https://github.com/swagger-api/swagger-codegen + - - - Unlicense - http://www.apache.org/licenses/LICENSE-2.0.html - repo - - + + + Unlicense + http://www.apache.org/licenses/LICENSE-2.0.html + repo + + - - - Swagger - apiteam@swagger.io - Swagger - http://swagger.io - - + + + Swagger + apiteam@swagger.io + Swagger + http://swagger.io + + - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - pertest - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - jar - test-jar - - - - - - + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + - - org.codehaus.mojo - build-helper-maven-plugin - 1.10 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.4 - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + - - - + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + io.swagger + swagger-annotations + ${swagger-core-version} + + + com.squareup.retrofit2 + converter-gson + ${retrofit-version} + + + com.squareup.retrofit2 + retrofit + ${retrofit-version} + + + com.squareup.retrofit2 + converter-scalars + ${retrofit-version} + + + org.apache.oltu.oauth2 + org.apache.oltu.oauth2.client + ${oltu-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + + org.threeten + threetenbp + ${threetenbp-version} + - - - io.swagger - swagger-annotations - ${swagger-core-version} - - - com.squareup.retrofit2 - converter-gson - ${retrofit-version} - - - com.squareup.retrofit2 - retrofit - ${retrofit-version} - - - com.squareup.retrofit2 - converter-scalars - ${retrofit-version} - - - org.apache.oltu.oauth2 - org.apache.oltu.oauth2.client - ${oltu-version} - - - org.threeten - threetenbp - ${threetenbp-version} - + + + com.squareup.retrofit2 + converter-jackson + ${retrofit-version} + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + com.typesafe.play + play-java-ws_2.11 + ${play-version} + - - - com.squareup.retrofit2 - converter-jackson - ${retrofit-version} - - - com.fasterxml.jackson.core - jackson-core - ${jackson-version} - - - com.fasterxml.jackson.core - jackson-annotations - ${jackson-version} - - - com.fasterxml.jackson.core - jackson-databind - ${jackson-version} - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - ${jackson-version} - - - com.typesafe.play - play-java-ws_2.11 - ${play-version} - - - - - junit - junit - ${junit-version} - test - - - - UTF-8 - 1.8 - ${java.version} - ${java.version} - 1.5.15 - 2.7.8 - 2.5.15 - 2.3.0 - 1.3.5 - 1.0.1 - 4.12 - + + + junit + junit + ${junit-version} + test + + + + UTF-8 + 1.8 + ${java.version} + ${java.version} + 1.8.0 + 1.5.15 + 2.7.8 + 2.5.15 + 2.3.0 + 1.3.5 + 1.0.1 + 4.12 + diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/FakeApi.java index 879c6ebe201..3d1b685c6d0 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/api/FakeApi.java @@ -126,6 +126,20 @@ CompletionStage> testEnumParameters( @retrofit2.http.Field("enum_form_string_array") List enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString, @retrofit2.http.Header("enum_header_string_array") List enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit2.http.Field("enum_query_double") Double enumQueryDouble ); + /** + * test inline additionalProperties + * + * @param param request body (required) + * @return Call<Void> + */ + @Headers({ + "Content-Type:application/json" + }) + @POST("fake/inline-additionalProperties") + CompletionStage> testInlineAdditionalProperties( + @retrofit2.http.Body Object param + ); + /** * test json serialization of form data * diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index e2bb686e935..9de5c01f7b4 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -43,7 +43,7 @@ public AdditionalPropertiesClass mapProperty(Map mapProperty) { public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { if (this.mapProperty == null) { - this.mapProperty = new HashMap(); + this.mapProperty = new HashMap<>(); } this.mapProperty.put(key, mapPropertyItem); return this; @@ -69,7 +69,7 @@ public AdditionalPropertiesClass mapOfMapProperty(Map mapOfMapPropertyItem) { if (this.mapOfMapProperty == null) { - this.mapOfMapProperty = new HashMap>(); + this.mapOfMapProperty = new HashMap<>(); } this.mapOfMapProperty.put(key, mapOfMapPropertyItem); return this; @@ -125,9 +125,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Animal.java index 023cb11b7eb..7a11640d9fe 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Animal.java @@ -113,9 +113,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AnimalFarm.java index fc38d86a0aa..13aae599ec2 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -57,9 +57,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index 87d66e0750d..2c104938973 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -40,7 +40,7 @@ public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArr public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { if (this.arrayArrayNumber == null) { - this.arrayArrayNumber = new ArrayList>(); + this.arrayArrayNumber = new ArrayList<>(); } this.arrayArrayNumber.add(arrayArrayNumberItem); return this; @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index 50e09468219..97be51cbd7f 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -40,7 +40,7 @@ public ArrayOfNumberOnly arrayNumber(List arrayNumber) { public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { if (this.arrayNumber == null) { - this.arrayNumber = new ArrayList(); + this.arrayNumber = new ArrayList<>(); } this.arrayNumber.add(arrayNumberItem); return this; @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayTest.java index b944839bc47..7ac89a7aa3c 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ArrayTest.java @@ -46,7 +46,7 @@ public ArrayTest arrayOfString(List arrayOfString) { public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { if (this.arrayOfString == null) { - this.arrayOfString = new ArrayList(); + this.arrayOfString = new ArrayList<>(); } this.arrayOfString.add(arrayOfStringItem); return this; @@ -72,7 +72,7 @@ public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { if (this.arrayArrayOfInteger == null) { - this.arrayArrayOfInteger = new ArrayList>(); + this.arrayArrayOfInteger = new ArrayList<>(); } this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); return this; @@ -99,7 +99,7 @@ public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { - this.arrayArrayOfModel = new ArrayList>(); + this.arrayArrayOfModel = new ArrayList<>(); } this.arrayArrayOfModel.add(arrayArrayOfModelItem); return this; @@ -157,9 +157,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Capitalization.java index e7a0b0ac935..4bd82562ffb 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Capitalization.java @@ -197,9 +197,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Cat.java index 7c513d6d6dd..28e41790556 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Cat.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Category.java index bf8840d5fcf..c4b255c8029 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Category.java @@ -105,9 +105,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ClassModel.java index f3d9160e3db..b2c43181441 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ClassModel.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Client.java index a09f13e7a2c..d80fc01d6cb 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Client.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Dog.java index 3835e2aca37..c0844a8f7ae 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Dog.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumArrays.java index 2019cbae634..2e97479e1cc 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumArrays.java @@ -130,7 +130,7 @@ public EnumArrays arrayEnum(List arrayEnum) { public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { if (this.arrayEnum == null) { - this.arrayEnum = new ArrayList(); + this.arrayEnum = new ArrayList<>(); } this.arrayEnum.add(arrayEnumItem); return this; @@ -185,9 +185,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumTest.java index 779c3abcc1b..5ed24c5672b 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/EnumTest.java @@ -260,9 +260,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/FormatTest.java index adf0a66ceeb..e6b6230cb09 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/FormatTest.java @@ -380,9 +380,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 5f86fb84a96..9be4526ac01 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -87,9 +87,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MapTest.java index 7c013ad8e69..2afb394d73f 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MapTest.java @@ -78,7 +78,7 @@ public MapTest mapMapOfString(Map> mapMapOfString) { public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { if (this.mapMapOfString == null) { - this.mapMapOfString = new HashMap>(); + this.mapMapOfString = new HashMap<>(); } this.mapMapOfString.put(key, mapMapOfStringItem); return this; @@ -105,7 +105,7 @@ public MapTest mapOfEnumString(Map mapOfEnumString) { public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { if (this.mapOfEnumString == null) { - this.mapOfEnumString = new HashMap(); + this.mapOfEnumString = new HashMap<>(); } this.mapOfEnumString.put(key, mapOfEnumStringItem); return this; @@ -160,9 +160,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index d484a14f09c..52194ba11a9 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -87,7 +87,7 @@ public MixedPropertiesAndAdditionalPropertiesClass map(Map map) public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { if (this.map == null) { - this.map = new HashMap(); + this.map = new HashMap<>(); } this.map.put(key, mapItem); return this; @@ -145,9 +145,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Model200Response.java index 89ed29eca5d..36c50909d9e 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Model200Response.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelApiResponse.java index acfb194d9d7..4cbf8480fcd 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -128,9 +128,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelReturn.java index d372354eb7e..9da70cdf5de 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ModelReturn.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Name.java index c09048cce39..03d78b2a79c 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Name.java @@ -135,9 +135,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/NumberOnly.java index 91ab4497dc2..7548395f741 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/NumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Order.java index 35d1f3e67e1..73ee89f2201 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Order.java @@ -236,9 +236,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/OuterComposite.java index 5b0e216eaa2..d607e29d2bd 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/OuterComposite.java @@ -130,9 +130,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Pet.java index 145360c48a9..906feaf5055 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Pet.java @@ -41,7 +41,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList(); + private List photoUrls = new ArrayList<>(); @JsonProperty("tags") private List tags = null; @@ -173,7 +173,7 @@ public Pet tags(List tags) { public Pet addTagsItem(Tag tagsItem) { if (this.tags == null) { - this.tags = new ArrayList(); + this.tags = new ArrayList<>(); } this.tags.add(tagsItem); return this; @@ -255,9 +255,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index dc2373a365d..f93a9acec23 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/SpecialModelName.java index f01a06d4c78..6236e72c023 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Tag.java index 71ff1bfcf67..8ad72da4f28 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/Tag.java @@ -105,9 +105,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/User.java index 82c6be534ec..71591f321ee 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/io/swagger/client/model/User.java @@ -231,7 +231,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -243,9 +243,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/FakeApiTest.java index fa8f9a1945c..1a36baac26a 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -3,8 +3,8 @@ import io.swagger.client.ApiClient; import java.math.BigDecimal; import io.swagger.client.model.Client; -import org.joda.time.DateTime; -import org.joda.time.LocalDate; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; import io.swagger.client.model.OuterComposite; import org.junit.Before; import org.junit.Test; @@ -26,7 +26,6 @@ public void setup() { api = new ApiClient().createService(FakeApi.class); } - /** * * @@ -39,7 +38,6 @@ public void fakeOuterBooleanSerializeTest() { // TODO: test validations } - /** * * @@ -52,7 +50,6 @@ public void fakeOuterCompositeSerializeTest() { // TODO: test validations } - /** * * @@ -65,7 +62,6 @@ public void fakeOuterNumberSerializeTest() { // TODO: test validations } - /** * * @@ -78,7 +74,6 @@ public void fakeOuterStringSerializeTest() { // TODO: test validations } - /** * To test \"client\" model * @@ -91,7 +86,6 @@ public void testClientModelTest() { // TODO: test validations } - /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @@ -110,14 +104,13 @@ public void testEndpointParametersTest() { String string = null; byte[] binary = null; LocalDate date = null; - DateTime dateTime = null; + OffsetDateTime dateTime = null; String password = null; String paramCallback = null; // Void response = api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); // TODO: test validations } - /** * To test enum parameters * @@ -137,5 +130,29 @@ public void testEnumParametersTest() { // TODO: test validations } - + /** + * test inline additionalProperties + * + * + */ + @Test + public void testInlineAdditionalPropertiesTest() { + Object param = null; + // Void response = api.testInlineAdditionalProperties(param); + + // TODO: test validations + } + /** + * test json serialization of form data + * + * + */ + @Test + public void testJsonFormDataTest() { + String param = null; + String param2 = null; + // Void response = api.testJsonFormData(param, param2); + + // TODO: test validations + } } diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java index 2fd2c16ed50..ac6b922d846 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java @@ -22,7 +22,6 @@ public void setup() { api = new ApiClient().createService(FakeClassnameTags123Api.class); } - /** * To test class name in snake case * @@ -35,5 +34,4 @@ public void testClassnameTest() { // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/PetApiTest.java index a3688eb35c5..3301ee8f78a 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/PetApiTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/PetApiTest.java @@ -24,7 +24,6 @@ public void setup() { api = new ApiClient().createService(PetApi.class); } - /** * Add a new pet to the store * @@ -37,7 +36,6 @@ public void addPetTest() { // TODO: test validations } - /** * Deletes a pet * @@ -51,7 +49,6 @@ public void deletePetTest() { // TODO: test validations } - /** * Finds Pets by status * @@ -64,7 +61,6 @@ public void findPetsByStatusTest() { // TODO: test validations } - /** * Finds Pets by tags * @@ -77,7 +73,6 @@ public void findPetsByTagsTest() { // TODO: test validations } - /** * Find pet by ID * @@ -90,7 +85,6 @@ public void getPetByIdTest() { // TODO: test validations } - /** * Update an existing pet * @@ -103,7 +97,6 @@ public void updatePetTest() { // TODO: test validations } - /** * Updates a pet in the store with form data * @@ -118,7 +111,6 @@ public void updatePetWithFormTest() { // TODO: test validations } - /** * uploads an image * @@ -133,5 +125,4 @@ public void uploadFileTest() { // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/StoreApiTest.java index 1da787edf19..2cf3744e388 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/StoreApiTest.java @@ -22,7 +22,6 @@ public void setup() { api = new ApiClient().createService(StoreApi.class); } - /** * Delete purchase order by ID * @@ -35,7 +34,6 @@ public void deleteOrderTest() { // TODO: test validations } - /** * Returns pet inventories by status * @@ -47,7 +45,6 @@ public void getInventoryTest() { // TODO: test validations } - /** * Find purchase order by ID * @@ -60,7 +57,6 @@ public void getOrderByIdTest() { // TODO: test validations } - /** * Place an order for a pet * @@ -73,5 +69,4 @@ public void placeOrderTest() { // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/UserApiTest.java index cd8553d8419..3fcb0215709 100644 --- a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/api/UserApiTest.java @@ -22,7 +22,6 @@ public void setup() { api = new ApiClient().createService(UserApi.class); } - /** * Create user * @@ -35,7 +34,6 @@ public void createUserTest() { // TODO: test validations } - /** * Creates list of users with given input array * @@ -48,7 +46,6 @@ public void createUsersWithArrayInputTest() { // TODO: test validations } - /** * Creates list of users with given input array * @@ -61,7 +58,6 @@ public void createUsersWithListInputTest() { // TODO: test validations } - /** * Delete user * @@ -74,7 +70,6 @@ public void deleteUserTest() { // TODO: test validations } - /** * Get user by user name * @@ -87,7 +82,6 @@ public void getUserByNameTest() { // TODO: test validations } - /** * Logs user into the system * @@ -101,7 +95,6 @@ public void loginUserTest() { // TODO: test validations } - /** * Logs out current logged in user session * @@ -113,7 +106,6 @@ public void logoutUserTest() { // TODO: test validations } - /** * Updated user * @@ -127,5 +119,4 @@ public void updateUserTest() { // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..b4f92a36c34 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..64c259e27a8 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..f49a83b96c0 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..0835812b967 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..e1a135877f8 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..85df56981e1 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..37f246cef46 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..4c600ad6bfe --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..7c1c36eb1d8 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..0af24ee94c2 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..c5776ad73c1 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..391a26433df --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..c0afa7dcebd --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..173c6e24c09 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..98234657055 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..5d83bc6e110 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..39d72d21e2c --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..658e220c498 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..e387d196f41 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..1c5c0137b50 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8d7dbfe913b --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..aaf592b2eee --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..3eae383b79b --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..35b9473b6c5 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..0a9716c9783 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..f74d363aec1 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..4ec6e0ff791 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..e0f6a407ed5 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..2cd54e5cfc0 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..8cfe2bcdb76 --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..2568fd1fdaf --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,65 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/retrofit2-play25/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2/README.md b/samples/client/petstore/java/retrofit2/README.md index d5f7ec9f1ce..269894e5d38 100644 --- a/samples/client/petstore/java/retrofit2/README.md +++ b/samples/client/petstore/java/retrofit2/README.md @@ -32,10 +32,6 @@ After the client library is installed/deployed, you can use it in your Maven pro ``` -## Recommendation - -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issue. - ## Author apiteam@swagger.io diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index b302fdf6012..0365a240a9a 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -125,9 +125,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Animal.java index f65c5bffcb3..0f2496a7174 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Animal.java @@ -107,9 +107,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/AnimalFarm.java index 0b1d6a74cc6..77debcbb4bf 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -55,9 +55,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index f9956fe46d8..7bab354ff9b 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index c79610d1c66..b1104901093 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ArrayTest.java index 747182e792e..f85b2be7ee8 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ArrayTest.java @@ -156,9 +156,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Capitalization.java index 00c564ab727..76de2eb0ac4 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Capitalization.java @@ -198,9 +198,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Cat.java index 64d3fbdc7fe..a950640dbb6 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Cat.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Category.java index 4e9f8f56e5e..6990e2cb869 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Category.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ClassModel.java index 4cf0a053250..93abc0b3447 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ClassModel.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Client.java index 43b20dce8da..1bbedfa3488 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Client.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Dog.java index 8fad06d9835..b87d1262d2b 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Dog.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/EnumArrays.java index 5f063c2ec38..06e00b39a57 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/EnumArrays.java @@ -210,9 +210,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/EnumTest.java index fb20599a85c..59888d5eb0e 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/EnumTest.java @@ -296,9 +296,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/FormatTest.java index ddb80771fda..d6c61f996f3 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/FormatTest.java @@ -373,9 +373,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 1b7ff181941..e3e0255689e 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -88,9 +88,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/MapTest.java index a791e68d8fb..003438690e6 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/MapTest.java @@ -172,9 +172,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 7c99abe53eb..823f2893c93 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -143,9 +143,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Model200Response.java index 0d39eb7eff5..5628f9e5487 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Model200Response.java @@ -107,9 +107,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ModelApiResponse.java index 3d9352c50aa..193e69fd08a 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -129,9 +129,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ModelReturn.java index ab6333ff86d..290780c8b5e 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ModelReturn.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Name.java index 1492add2952..35241e53af1 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Name.java @@ -135,9 +135,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/NumberOnly.java index b13c0536a13..d34198289ee 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/NumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Order.java index 4dcf75a7cd0..f12fb6e9413 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Order.java @@ -248,9 +248,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/OuterComposite.java index 56159fe5d93..795c17c57b5 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/OuterComposite.java @@ -130,9 +130,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Pet.java index dac1250ac07..5982c3bc344 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Pet.java @@ -264,9 +264,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index f6e025412de..630bf812cd7 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -97,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/SpecialModelName.java index e743292100b..2458c05b328 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Tag.java index bb6de58c8a1..cf94c065e5b 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Tag.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/User.java index 4ccb8a1c147..5fbfde3bba6 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/User.java @@ -232,7 +232,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -244,9 +244,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/FakeApiTest.java index 49bc4b90504..1a36baac26a 100644 --- a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -2,7 +2,10 @@ import io.swagger.client.ApiClient; 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.Before; import org.junit.Test; @@ -23,7 +26,66 @@ public void setup() { api = new ApiClient().createService(FakeApi.class); } - + /** + * + * + * Test serialization of outer boolean types + */ + @Test + public void fakeOuterBooleanSerializeTest() { + Boolean body = null; + // Boolean response = api.fakeOuterBooleanSerialize(body); + + // TODO: test validations + } + /** + * + * + * Test serialization of object with outer number type + */ + @Test + public void fakeOuterCompositeSerializeTest() { + OuterComposite body = null; + // OuterComposite response = api.fakeOuterCompositeSerialize(body); + + // TODO: test validations + } + /** + * + * + * Test serialization of outer number types + */ + @Test + public void fakeOuterNumberSerializeTest() { + BigDecimal body = null; + // BigDecimal response = api.fakeOuterNumberSerialize(body); + + // TODO: test validations + } + /** + * + * + * Test serialization of outer string types + */ + @Test + public void fakeOuterStringSerializeTest() { + String body = null; + // String response = api.fakeOuterStringSerialize(body); + + // TODO: test validations + } + /** + * To test \"client\" model + * + * To test \"client\" model + */ + @Test + public void testClientModelTest() { + Client body = null; + // Client response = api.testClientModel(body); + + // TODO: test validations + } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @@ -33,19 +95,64 @@ public void setup() { public void testEndpointParametersTest() { 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; - // Void response = api.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password); + String paramCallback = null; + // Void response = 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 + */ + @Test + public void testEnumParametersTest() { + List enumFormStringArray = null; + String enumFormString = null; + List enumHeaderStringArray = null; + String enumHeaderString = null; + List enumQueryStringArray = null; + String enumQueryString = null; + Integer enumQueryInteger = null; + Double enumQueryDouble = null; + // Void response = api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); + + // TODO: test validations + } + /** + * test inline additionalProperties + * + * + */ + @Test + public void testInlineAdditionalPropertiesTest() { + Object param = null; + // Void response = api.testInlineAdditionalProperties(param); + + // TODO: test validations + } + /** + * test json serialization of form data + * + * + */ + @Test + public void testJsonFormDataTest() { + String param = null; + String param2 = null; + // Void response = api.testJsonFormData(param, param2); // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java index 2fd2c16ed50..ac6b922d846 100644 --- a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java @@ -22,7 +22,6 @@ public void setup() { api = new ApiClient().createService(FakeClassnameTags123Api.class); } - /** * To test class name in snake case * @@ -35,5 +34,4 @@ public void testClassnameTest() { // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/PetApiTest.java index bbaa0000f44..3301ee8f78a 100644 --- a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/PetApiTest.java +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/PetApiTest.java @@ -1,189 +1,128 @@ package io.swagger.client.api; -import io.swagger.TestUtils; - import io.swagger.client.ApiClient; -import io.swagger.client.CollectionFormats.*; -import io.swagger.client.model.*; - -import java.io.BufferedWriter; import java.io.File; -import java.io.FileWriter; +import io.swagger.client.model.ModelApiResponse; +import io.swagger.client.model.Pet; +import org.junit.Before; +import org.junit.Test; + import java.util.ArrayList; -import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; -import org.junit.*; - -import retrofit2.Response; - -import okhttp3.MediaType; -import okhttp3.RequestBody; - -import static org.junit.Assert.*; - +/** + * API tests for PetApi + */ public class PetApiTest { - PetApi api = null; + + private PetApi api; @Before public void setup() { api = new ApiClient().createService(PetApi.class); } + /** + * Add a new pet to the store + * + * + */ @Test - public void testCreateAndGetPet() throws Exception { - Pet pet = createRandomPet(); - Response rp2 = api.addPet(pet).execute(); + public void addPetTest() { + Pet body = null; + // Void response = api.addPet(body); - Response rp = api.getPetById(pet.getId()).execute(); - Pet fetched = rp.body(); - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); + // TODO: test validations } - + /** + * Deletes a pet + * + * + */ @Test - public void testUpdatePet() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); - - api.updatePet(pet).execute(); + public void deletePetTest() { + Long petId = null; + String apiKey = null; + // Void response = api.deletePet(petId, apiKey); - Pet fetched = api.getPetById(pet.getId()).execute().body(); - 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 + */ @Test - public void testFindPetsByStatus() throws Exception { - Pet pet = createRandomPet(); - pet.setName("programmer"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - - api.updatePet(pet).execute(); + public void findPetsByStatusTest() { + List status = null; + // List response = api.findPetsByStatus(status); - List pets = api.findPetsByStatus(new CSVParams("available")).execute().body(); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - - assertTrue(found); + // TODO: test validations } - + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + */ @Test - public void testFindPetsByTags() throws Exception { - Pet pet = createRandomPet(); - pet.setName("monster"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - - List tags = new ArrayList(); - Tag tag1 = new Tag(); - tag1.setName("friendly"); - tags.add(tag1); - pet.setTags(tags); + public void findPetsByTagsTest() { + List tags = null; + // List response = api.findPetsByTags(tags); - api.updatePet(pet).execute(); - - List pets = api.findPetsByTags(new CSVParams("friendly")).execute().body(); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - assertTrue(found); + // TODO: test validations } - + /** + * Find pet by ID + * + * Returns a single pet + */ @Test - public void testUpdatePetWithForm() throws Exception { - Pet pet = createRandomPet(); - pet.setName("frank"); - api.addPet(pet).execute(); - - Pet fetched = api.getPetById(pet.getId()).execute().body(); + public void getPetByIdTest() { + Long petId = null; + // Pet response = api.getPetById(petId); - api.updatePetWithForm(fetched.getId(), "furt", null).execute(); - Pet updated = api.getPetById(fetched.getId()).execute().body(); - - assertEquals(updated.getName(), "furt"); + // TODO: test validations } - + /** + * Update an existing pet + * + * + */ @Test - public void testDeletePet() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet).execute(); + public void updatePetTest() { + Pet body = null; + // Void response = api.updatePet(body); - Pet fetched = api.getPetById(pet.getId()).execute().body(); - api.deletePet(fetched.getId(), null).execute(); - - assertFalse(api.getPetById(fetched.getId()).execute().isSuccessful()); + // TODO: test validations } - + /** + * Updates a pet in the store with form data + * + * + */ @Test - public void testUploadFile() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet).execute(); + public void updatePetWithFormTest() { + Long petId = null; + String name = null; + String status = null; + // Void response = api.updatePetWithForm(petId, name, status); - File file = new File("hello.txt"); - BufferedWriter writer = new BufferedWriter(new FileWriter(file)); - writer.write("Hello world!"); - writer.close(); - - api.uploadFile(pet.getId(), null, RequestBody.create(MediaType.parse("text/plain"), file)).execute(); + // TODO: test validations } - + /** + * uploads an image + * + * + */ @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); + public void uploadFileTest() { + Long petId = null; + String additionalMetadata = null; + File file = null; + // ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - return pet; + // TODO: test validations } } diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/StoreApiTest.java index 22009672396..2cf3744e388 100644 --- a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/StoreApiTest.java @@ -1,77 +1,72 @@ package io.swagger.client.api; -import io.swagger.TestUtils; - import io.swagger.client.ApiClient; -import io.swagger.client.api.*; -import io.swagger.client.model.*; +import io.swagger.client.model.Order; +import org.junit.Before; +import org.junit.Test; -import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; import java.util.Map; -import org.junit.*; -import org.threeten.bp.OffsetDateTime; - -import retrofit2.Response; -import static org.junit.Assert.*; - +/** + * API tests for StoreApi + */ public class StoreApiTest { - private StoreApi api = null; + + private StoreApi api; @Before public void setup() { api = new ApiClient().createService(StoreApi.class); } + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + */ @Test - public void testGetInventory() throws Exception { - Map inventory = api.getInventory().execute().body(); - assertTrue(inventory.keySet().size() > 0); - } + public void deleteOrderTest() { + String orderId = null; + // Void response = api.deleteOrder(orderId); + // TODO: test validations + } + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + */ @Test - public void testPlaceOrder() throws Exception { - Order order = createOrder(); - api.placeOrder(order).execute(); + public void getInventoryTest() { + // Map response = api.getInventory(); - Order fetched = api.getOrderById(order.getId()).execute().body(); - 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 } - + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + */ @Test - public void testDeleteOrder() throws Exception { - Order order = createOrder(); - Response aa = api.placeOrder(order).execute(); - - Order fetched = api.getOrderById(order.getId()).execute().body(); - assertEquals(fetched.getId(), order.getId()); - - api.deleteOrder(String.valueOf(order.getId())).execute(); + public void getOrderByIdTest() { + Long orderId = null; + // Order response = api.getOrderById(orderId); - api.getOrderById(order.getId()).execute(); - //also in retrofit 1 should return an error but don't, check server api impl. + // TODO: test validations } + /** + * Place an order for a pet + * + * + */ + @Test + public void placeOrderTest() { + Order body = null; + // Order response = api.placeOrder(body); - 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/retrofit2/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/UserApiTest.java index 70fbb8fef98..3fcb0215709 100644 --- a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/api/UserApiTest.java @@ -1,86 +1,122 @@ package io.swagger.client.api; -import io.swagger.TestUtils; - import io.swagger.client.ApiClient; -import io.swagger.client.api.*; -import io.swagger.client.model.*; - - -import java.util.Arrays; - -import org.junit.*; -import static org.junit.Assert.*; - +import io.swagger.client.model.User; +import org.junit.Before; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for UserApi + */ public class UserApiTest { - UserApi api = null; + + private UserApi api; @Before public void setup() { api = new ApiClient().createService(UserApi.class); } + /** + * Create user + * + * This can only be done by the logged in user. + */ @Test - public void testCreateUser() throws Exception { - User user = createUser(); - - api.createUser(user).execute(); + public void createUserTest() { + User body = null; + // Void response = api.createUser(body); - User fetched = api.getUserByName(user.getUsername()).execute().body(); - assertEquals(user.getId(), fetched.getId()); + // TODO: test validations } - + /** + * Creates list of users with given input array + * + * + */ @Test - public void testCreateUsersWithArray() throws Exception { - User user1 = createUser(); - user1.setUsername("user" + user1.getId()); - User user2 = createUser(); - user2.setUsername("user" + user2.getId()); - - api.createUsersWithArrayInput(Arrays.asList(new User[]{user1, user2})).execute(); + public void createUsersWithArrayInputTest() { + List body = null; + // Void response = api.createUsersWithArrayInput(body); - User fetched = api.getUserByName(user1.getUsername()).execute().body(); - assertEquals(user1.getId(), fetched.getId()); + // TODO: test validations } - + /** + * Creates list of users with given input array + * + * + */ @Test - public void testCreateUsersWithList() throws Exception { - User user1 = createUser(); - user1.setUsername("user" + user1.getId()); - User user2 = createUser(); - user2.setUsername("user" + user2.getId()); - - api.createUsersWithListInput(Arrays.asList(new User[]{user1, user2})).execute(); + public void createUsersWithListInputTest() { + List body = null; + // Void response = api.createUsersWithListInput(body); - User fetched = api.getUserByName(user1.getUsername()).execute().body(); - assertEquals(user1.getId(), fetched.getId()); + // TODO: test validations } - + /** + * Delete user + * + * This can only be done by the logged in user. + */ @Test - public void testLoginUser() throws Exception { - User user = createUser(); - api.createUser(user).execute(); + public void deleteUserTest() { + String username = null; + // Void response = api.deleteUser(username); - String token = api.loginUser(user.getUsername(), user.getPassword()).execute().body(); - assertTrue(token.startsWith("logged in user session:")); + // TODO: test validations } + /** + * Get user by user name + * + * + */ + @Test + public void getUserByNameTest() { + String username = null; + // User response = api.getUserByName(username); + // TODO: test validations + } + /** + * Logs user into the system + * + * + */ @Test - public void logoutUser() throws Exception { - api.logoutUser().execute(); + public void loginUserTest() { + String username = null; + String password = null; + // String response = api.loginUser(username, password); + + // TODO: test validations } + /** + * Logs out current logged in user session + * + * + */ + @Test + public void logoutUserTest() { + // Void response = api.logoutUser(); - private User createUser() { - User user = new User(); - user.setId(TestUtils.nextId()); - user.setUsername("fred"); - user.setFirstName("Fred"); - user.setLastName("Meyer"); - user.setEmail("fred@fredmeyer.com"); - user.setPassword("xxXXxx"); - user.setPhone("408-867-5309"); - user.setUserStatus(123); + // TODO: test validations + } + /** + * Updated user + * + * This can only be done by the logged in user. + */ + @Test + public void updateUserTest() { + String username = null; + User body = null; + // Void response = api.updateUser(username, body); - return user; + // TODO: test validations } } diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..76542a09459 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..b64cda4ae9a --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..1d5ea3ddd41 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..b7963b4bd24 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..bf2a685235d --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..a5045e3fef2 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..d9a0c2441a6 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..b501b59c7e1 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..c605c8ee727 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..d684ee437d5 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..bcd43788b31 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..95d11adf568 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..82e7fd4c7d7 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.annotations.SerializedName; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..89eac5b2562 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..242ef207201 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..64d25301aa8 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..a018bd04e36 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..35423f00eeb --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,64 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..d0ee9107a58 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..9f3655bd094 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8e5de3f5c6f --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..16bb069f0ea --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..1ce5c00a602 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..4c144e272b5 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..9d433c9721c --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..2d8b44d111c --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.annotations.SerializedName; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..3be0968db0f --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..bb1c14e2311 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..33412a6b8c2 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..0fe6b02fbad --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..e9a7b23cc87 --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,68 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/retrofit2/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx/README.md b/samples/client/petstore/java/retrofit2rx/README.md index a1f0b3468be..bd975063c16 100644 --- a/samples/client/petstore/java/retrofit2rx/README.md +++ b/samples/client/petstore/java/retrofit2rx/README.md @@ -32,10 +32,6 @@ After the client library is installed/deployed, you can use it in your Maven pro ``` -## Recommendation - -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issue. - ## Author apiteam@swagger.io diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index b302fdf6012..0365a240a9a 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -125,9 +125,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Animal.java index f65c5bffcb3..0f2496a7174 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Animal.java @@ -107,9 +107,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/AnimalFarm.java index 0b1d6a74cc6..77debcbb4bf 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -55,9 +55,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index f9956fe46d8..7bab354ff9b 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index c79610d1c66..b1104901093 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ArrayTest.java index 747182e792e..f85b2be7ee8 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ArrayTest.java @@ -156,9 +156,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Capitalization.java index 00c564ab727..76de2eb0ac4 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Capitalization.java @@ -198,9 +198,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Cat.java index 64d3fbdc7fe..a950640dbb6 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Cat.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Category.java index 4e9f8f56e5e..6990e2cb869 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Category.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ClassModel.java index 4cf0a053250..93abc0b3447 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ClassModel.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Client.java index 43b20dce8da..1bbedfa3488 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Client.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Dog.java index 8fad06d9835..b87d1262d2b 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Dog.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/EnumArrays.java index 5f063c2ec38..06e00b39a57 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/EnumArrays.java @@ -210,9 +210,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/EnumTest.java index fb20599a85c..59888d5eb0e 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/EnumTest.java @@ -296,9 +296,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/FormatTest.java index ddb80771fda..d6c61f996f3 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/FormatTest.java @@ -373,9 +373,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 1b7ff181941..e3e0255689e 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -88,9 +88,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/MapTest.java index a791e68d8fb..003438690e6 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/MapTest.java @@ -172,9 +172,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 7c99abe53eb..823f2893c93 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -143,9 +143,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Model200Response.java index 0d39eb7eff5..5628f9e5487 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Model200Response.java @@ -107,9 +107,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ModelApiResponse.java index 3d9352c50aa..193e69fd08a 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -129,9 +129,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ModelReturn.java index ab6333ff86d..290780c8b5e 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ModelReturn.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Name.java index 1492add2952..35241e53af1 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Name.java @@ -135,9 +135,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/NumberOnly.java index b13c0536a13..d34198289ee 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/NumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Order.java index 4dcf75a7cd0..f12fb6e9413 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Order.java @@ -248,9 +248,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/OuterComposite.java index 56159fe5d93..795c17c57b5 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/OuterComposite.java @@ -130,9 +130,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Pet.java index dac1250ac07..5982c3bc344 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Pet.java @@ -264,9 +264,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index f6e025412de..630bf812cd7 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -97,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/SpecialModelName.java index e743292100b..2458c05b328 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Tag.java index bb6de58c8a1..cf94c065e5b 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Tag.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/User.java index 4ccb8a1c147..5fbfde3bba6 100644 --- a/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/User.java @@ -232,7 +232,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -244,9 +244,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/FakeApiTest.java index 49bc4b90504..1a36baac26a 100644 --- a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -2,7 +2,10 @@ import io.swagger.client.ApiClient; 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.Before; import org.junit.Test; @@ -23,7 +26,66 @@ public void setup() { api = new ApiClient().createService(FakeApi.class); } - + /** + * + * + * Test serialization of outer boolean types + */ + @Test + public void fakeOuterBooleanSerializeTest() { + Boolean body = null; + // Boolean response = api.fakeOuterBooleanSerialize(body); + + // TODO: test validations + } + /** + * + * + * Test serialization of object with outer number type + */ + @Test + public void fakeOuterCompositeSerializeTest() { + OuterComposite body = null; + // OuterComposite response = api.fakeOuterCompositeSerialize(body); + + // TODO: test validations + } + /** + * + * + * Test serialization of outer number types + */ + @Test + public void fakeOuterNumberSerializeTest() { + BigDecimal body = null; + // BigDecimal response = api.fakeOuterNumberSerialize(body); + + // TODO: test validations + } + /** + * + * + * Test serialization of outer string types + */ + @Test + public void fakeOuterStringSerializeTest() { + String body = null; + // String response = api.fakeOuterStringSerialize(body); + + // TODO: test validations + } + /** + * To test \"client\" model + * + * To test \"client\" model + */ + @Test + public void testClientModelTest() { + Client body = null; + // Client response = api.testClientModel(body); + + // TODO: test validations + } /** * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @@ -33,19 +95,64 @@ public void setup() { public void testEndpointParametersTest() { 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; - // Void response = api.testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password); + String paramCallback = null; + // Void response = 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 + */ + @Test + public void testEnumParametersTest() { + List enumFormStringArray = null; + String enumFormString = null; + List enumHeaderStringArray = null; + String enumHeaderString = null; + List enumQueryStringArray = null; + String enumQueryString = null; + Integer enumQueryInteger = null; + Double enumQueryDouble = null; + // Void response = api.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble); + + // TODO: test validations + } + /** + * test inline additionalProperties + * + * + */ + @Test + public void testInlineAdditionalPropertiesTest() { + Object param = null; + // Void response = api.testInlineAdditionalProperties(param); + + // TODO: test validations + } + /** + * test json serialization of form data + * + * + */ + @Test + public void testJsonFormDataTest() { + String param = null; + String param2 = null; + // Void response = api.testJsonFormData(param, param2); // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java index 2fd2c16ed50..ac6b922d846 100644 --- a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java @@ -22,7 +22,6 @@ public void setup() { api = new ApiClient().createService(FakeClassnameTags123Api.class); } - /** * To test class name in snake case * @@ -35,5 +34,4 @@ public void testClassnameTest() { // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/PetApiTest.java index 8fa02bed636..3301ee8f78a 100644 --- a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/PetApiTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/PetApiTest.java @@ -1,254 +1,128 @@ package io.swagger.client.api; import io.swagger.client.ApiClient; -import io.swagger.client.CollectionFormats.*; -import io.swagger.client.model.*; - -import java.io.BufferedWriter; import java.io.File; -import java.io.FileWriter; +import io.swagger.client.model.ModelApiResponse; +import io.swagger.client.model.Pet; +import org.junit.Before; +import org.junit.Test; + import java.util.ArrayList; -import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; -import org.junit.*; - -import okhttp3.MediaType; -import okhttp3.RequestBody; - -import static org.junit.Assert.*; - +/** + * API tests for PetApi + */ public class PetApiTest { - PetApi api = null; + + private PetApi api; @Before public void setup() { api = new ApiClient().createService(PetApi.class); } + /** + * Add a new pet to the store + * + * + */ @Test - public void testCreateAndGetPet() throws Exception { - final Pet pet = createRandomPet(); - api.addPet(pet).subscribe(new SkeletonSubscriber() { - @Override - public void onCompleted() { - api.getPetById(pet.getId()).subscribe(new SkeletonSubscriber() { - @Override - public void onNext(Pet fetched) { - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); - } - }); - - } - }); + public void addPetTest() { + Pet body = null; + // Void response = api.addPet(body); + // TODO: test validations } - + /** + * Deletes a pet + * + * + */ @Test - public void testUpdatePet() throws Exception { - final Pet pet = createRandomPet(); - pet.setName("programmer"); - - api.updatePet(pet).subscribe(new SkeletonSubscriber() { - @Override - public void onCompleted() { - api.getPetById(pet.getId()).subscribe(new SkeletonSubscriber() { - @Override - public void onNext(Pet fetched) { - assertNotNull(fetched); - assertEquals(pet.getId(), fetched.getId()); - assertNotNull(fetched.getCategory()); - assertEquals(fetched.getCategory().getName(), pet.getCategory().getName()); - } - }); - - } - }); + public void deletePetTest() { + Long petId = null; + String apiKey = null; + // Void response = api.deletePet(petId, apiKey); + // TODO: test validations } - + /** + * Finds Pets by status + * + * Multiple status values can be provided with comma separated strings + */ @Test - public void testFindPetsByStatus() throws Exception { - final Pet pet = createRandomPet(); - pet.setName("programmer"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - - api.updatePet(pet).subscribe(new SkeletonSubscriber() { - @Override - public void onCompleted() { - api.findPetsByStatus(new CSVParams("available")).subscribe(new SkeletonSubscriber>() { - @Override - public void onNext(List pets) { - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - - assertTrue(found); - } - }); - - } - }); + public void findPetsByStatusTest() { + List status = null; + // List response = api.findPetsByStatus(status); + // TODO: test validations } - + /** + * Finds Pets by tags + * + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + */ @Test - public void testFindPetsByTags() throws Exception { - final Pet pet = createRandomPet(); - pet.setName("monster"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - - List tags = new ArrayList(); - Tag tag1 = new Tag(); - tag1.setName("friendly"); - tags.add(tag1); - pet.setTags(tags); - - api.updatePet(pet).subscribe(new SkeletonSubscriber() { - @Override - public void onCompleted() { - api.findPetsByTags(new CSVParams("friendly")).subscribe(new SkeletonSubscriber>() { - @Override - public void onNext(List pets) { - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - assertTrue(found); - } - }); - - } - }); + public void findPetsByTagsTest() { + List tags = null; + // List response = api.findPetsByTags(tags); + // TODO: test validations } - + /** + * Find pet by ID + * + * Returns a single pet + */ @Test - public void testUpdatePetWithForm() throws Exception { - final Pet pet = createRandomPet(); - pet.setName("frank"); - api.addPet(pet).subscribe(SkeletonSubscriber.failTestOnError()); - api.getPetById(pet.getId()).subscribe(new SkeletonSubscriber() { - @Override - public void onNext(final Pet fetched) { - api.updatePetWithForm(fetched.getId(), "furt", null) - .subscribe(new SkeletonSubscriber() { - @Override - public void onCompleted() { - api.getPetById(fetched.getId()).subscribe(new SkeletonSubscriber() { - @Override - public void onNext(Pet updated) { - assertEquals(updated.getName(), "furt"); - } - }); - - } - }); - } - }); - + public void getPetByIdTest() { + Long petId = null; + // Pet response = api.getPetById(petId); + // TODO: test validations } - + /** + * Update an existing pet + * + * + */ @Test - public void testDeletePet() throws Exception { - Pet pet = createRandomPet(); - api.addPet(pet).subscribe(SkeletonSubscriber.failTestOnError()); - - api.getPetById(pet.getId()).subscribe(new SkeletonSubscriber() { - @Override - public void onNext(Pet fetched) { + public void updatePetTest() { + Pet body = null; + // Void response = api.updatePet(body); - api.deletePet(fetched.getId(), null).subscribe(SkeletonSubscriber.failTestOnError()); - api.getPetById(fetched.getId()).subscribe(new SkeletonSubscriber() { - @Override - public void onNext(Pet deletedPet) { - fail("Should not have found deleted pet."); - } - - @Override - public void onError(Throwable e) { - // expected, because the pet has been deleted. - } - }); - } - }); + // TODO: test validations } - + /** + * Updates a pet in the store with form data + * + * + */ @Test - public void testUploadFile() throws Exception { - File file = File.createTempFile("test", "hello.txt"); - BufferedWriter writer = new BufferedWriter(new FileWriter(file)); + public void updatePetWithFormTest() { + Long petId = null; + String name = null; + String status = null; + // Void response = api.updatePetWithForm(petId, name, status); - writer.write("Hello world!"); - writer.close(); - - Pet pet = createRandomPet(); - api.addPet(pet).subscribe(SkeletonSubscriber.failTestOnError()); - - RequestBody body = RequestBody.create(MediaType.parse("text/plain"), file); - api.uploadFile(pet.getId(), "a test file", body).subscribe(new SkeletonSubscriber() { - @Override - public void onError(Throwable e) { - // this also yields a 400 for other tests, so I guess it's okay... - } - }); + // TODO: test validations } - + /** + * uploads an image + * + * + */ @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(System.currentTimeMillis()); - 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); + public void uploadFileTest() { + Long petId = null; + String additionalMetadata = null; + File file = null; + // ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); - return pet; + // TODO: test validations } } diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/StoreApiTest.java index d5084750a3d..2cf3744e388 100644 --- a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/StoreApiTest.java @@ -1,96 +1,72 @@ package io.swagger.client.api; import io.swagger.client.ApiClient; -import io.swagger.client.model.*; +import io.swagger.client.model.Order; +import org.junit.Before; +import org.junit.Test; -import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; import java.util.Map; -import org.junit.*; -import org.threeten.bp.OffsetDateTime; - -import static org.junit.Assert.*; - +/** + * API tests for StoreApi + */ public class StoreApiTest { - private StoreApi api = null; + + private StoreApi api; @Before public void setup() { api = new ApiClient().createService(StoreApi.class); } + /** + * Delete purchase order by ID + * + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + */ @Test - public void testGetInventory() throws Exception { - api.getInventory().subscribe(new SkeletonSubscriber>() { - @Override - public void onNext(Map inventory) { - assertTrue(inventory.keySet().size() > 0); - } - }); + public void deleteOrderTest() { + String orderId = null; + // Void response = api.deleteOrder(orderId); + // TODO: test validations } - + /** + * Returns pet inventories by status + * + * Returns a map of status codes to quantities + */ @Test - public void testPlaceOrder() throws Exception { - final Order order = createOrder(); - api.placeOrder(order).subscribe(SkeletonSubscriber.failTestOnError()); - api.getOrderById(order.getId()).subscribe(new SkeletonSubscriber() { - @Override - public void onNext(Order fetched) { - assertEquals(order.getId(), fetched.getId()); - assertEquals(order.getPetId(), fetched.getPetId()); - assertEquals(order.getQuantity(), fetched.getQuantity()); - assertEquals(order.getShipDate().toInstant(), fetched.getShipDate().toInstant()); - } - }); - } + public void getInventoryTest() { + // Map response = api.getInventory(); + // TODO: test validations + } + /** + * Find purchase order by ID + * + * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + */ @Test - public void testDeleteOrder() throws Exception { - final Order order = createOrder(); - api.placeOrder(order).subscribe(SkeletonSubscriber.failTestOnError()); + public void getOrderByIdTest() { + Long orderId = null; + // Order response = api.getOrderById(orderId); - api.getOrderById(order.getId()).subscribe(new SkeletonSubscriber() { - @Override - public void onNext(Order fetched) { - assertEquals(fetched.getId(), order.getId()); - } - }); - - - api.deleteOrder(String.valueOf(order.getId())).subscribe(SkeletonSubscriber.failTestOnError()); - api.getOrderById(order.getId()) - .subscribe(new SkeletonSubscriber() { - @Override - public void onNext(Order order) { - throw new RuntimeException("Should not have found deleted order."); - } - - @Override - public void onError(Throwable e) { - // should not find deleted order. - } - } - ); + // TODO: test validations } + /** + * Place an order for a pet + * + * + */ + @Test + public void placeOrderTest() { + Order body = null; + // Order response = api.placeOrder(body); - 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, System.currentTimeMillis()); - } catch (Exception e) { - throw new RuntimeException(e); - } - - return order; + // TODO: test validations } } diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/UserApiTest.java index 02c3942b210..3fcb0215709 100644 --- a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/api/UserApiTest.java @@ -1,107 +1,122 @@ package io.swagger.client.api; import io.swagger.client.ApiClient; -import io.swagger.client.model.*; +import io.swagger.client.model.User; +import org.junit.Before; +import org.junit.Test; - -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; /** - * NOTE: This serves as a sample and test case for the generator, which is why this is java-7 code. - * Much looks much nicer with no anonymous classes. + * API tests for UserApi */ public class UserApiTest { - UserApi api = null; + + private UserApi api; @Before public void setup() { api = new ApiClient().createService(UserApi.class); } + /** + * Create user + * + * This can only be done by the logged in user. + */ @Test - public void testCreateUser() throws Exception { - final User user = createUser(); + public void createUserTest() { + User body = null; + // Void response = api.createUser(body); - api.createUser(user).subscribe(new SkeletonSubscriber() { - @Override - public void onCompleted() { - api.getUserByName(user.getUsername()).subscribe(new SkeletonSubscriber() { - @Override - public void onNext(User fetched) { - assertEquals(user.getId(), fetched.getId()); - } - }); - } - }); + // TODO: test validations } - + /** + * Creates list of users with given input array + * + * + */ @Test - public void testCreateUsersWithArray() throws Exception { - final User user1 = createUser(); - user1.setUsername("abc123"); - User user2 = createUser(); - user2.setUsername("123abc"); - - api.createUsersWithArrayInput(Arrays.asList(new User[]{user1, user2})).subscribe(SkeletonSubscriber.failTestOnError()); + public void createUsersWithArrayInputTest() { + List body = null; + // Void response = api.createUsersWithArrayInput(body); - api.getUserByName(user1.getUsername()).subscribe(new SkeletonSubscriber() { - @Override - public void onNext(User fetched) { - assertEquals(user1.getId(), fetched.getId()); - } - }); + // TODO: test validations } - + /** + * Creates list of users with given input array + * + * + */ @Test - public void testCreateUsersWithList() throws Exception { - final User user1 = createUser(); - user1.setUsername("abc123"); - User user2 = createUser(); - user2.setUsername("123abc"); - - api.createUsersWithListInput(Arrays.asList(new User[]{user1, user2})).subscribe(SkeletonSubscriber.failTestOnError()); + public void createUsersWithListInputTest() { + List body = null; + // Void response = api.createUsersWithListInput(body); - api.getUserByName(user1.getUsername()).subscribe(new SkeletonSubscriber() { - @Override - public void onNext(User fetched) { - assertEquals(user1.getId(), fetched.getId()); - } - }); + // TODO: test validations } - + /** + * Delete user + * + * This can only be done by the logged in user. + */ @Test - public void testLoginUser() throws Exception { - User user = createUser(); - api.createUser(user); + public void deleteUserTest() { + String username = null; + // Void response = api.deleteUser(username); - api.loginUser(user.getUsername(), user.getPassword()).subscribe(new SkeletonSubscriber() { - @Override - public void onNext(String token) { - assertTrue(token.startsWith("logged in user session:")); - } - }); + // TODO: test validations } + /** + * Get user by user name + * + * + */ + @Test + public void getUserByNameTest() { + String username = null; + // User response = api.getUserByName(username); + // TODO: test validations + } + /** + * Logs user into the system + * + * + */ @Test - public void logoutUser() throws Exception { - api.logoutUser(); + public void loginUserTest() { + String username = null; + String password = null; + // String response = api.loginUser(username, password); + + // TODO: test validations } + /** + * Logs out current logged in user session + * + * + */ + @Test + public void logoutUserTest() { + // Void response = api.logoutUser(); - private User createUser() { - User user = new User(); - user.setId(System.currentTimeMillis()); - user.setUsername("fred"); - user.setFirstName("Fred"); - user.setLastName("Meyer"); - user.setEmail("fred@fredmeyer.com"); - user.setPassword("xxXXxx"); - user.setPhone("408-867-5309"); - user.setUserStatus(123); + // TODO: test validations + } + /** + * Updated user + * + * This can only be done by the logged in user. + */ + @Test + public void updateUserTest() { + String username = null; + User body = null; + // Void response = api.updateUser(username, body); - return user; + // TODO: test validations } -} \ No newline at end of file +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..76542a09459 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..b64cda4ae9a --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..1d5ea3ddd41 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..b7963b4bd24 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..bf2a685235d --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..a5045e3fef2 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..d9a0c2441a6 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..b501b59c7e1 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..c605c8ee727 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..d684ee437d5 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..bcd43788b31 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..95d11adf568 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..82e7fd4c7d7 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.annotations.SerializedName; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..89eac5b2562 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..242ef207201 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..64d25301aa8 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..a018bd04e36 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..35423f00eeb --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,64 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..d0ee9107a58 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..9f3655bd094 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8e5de3f5c6f --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..16bb069f0ea --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..1ce5c00a602 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..4c144e272b5 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..9d433c9721c --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..2d8b44d111c --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.annotations.SerializedName; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..3be0968db0f --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..bb1c14e2311 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..33412a6b8c2 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..0fe6b02fbad --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..e9a7b23cc87 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,68 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index b302fdf6012..0365a240a9a 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -125,9 +125,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Animal.java index f65c5bffcb3..0f2496a7174 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Animal.java @@ -107,9 +107,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/AnimalFarm.java index 0b1d6a74cc6..77debcbb4bf 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -55,9 +55,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index f9956fe46d8..7bab354ff9b 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index c79610d1c66..b1104901093 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ArrayTest.java index 747182e792e..f85b2be7ee8 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ArrayTest.java @@ -156,9 +156,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Capitalization.java index 00c564ab727..76de2eb0ac4 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Capitalization.java @@ -198,9 +198,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Cat.java index 64d3fbdc7fe..a950640dbb6 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Cat.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Category.java index 4e9f8f56e5e..6990e2cb869 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Category.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ClassModel.java index 4cf0a053250..93abc0b3447 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ClassModel.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Client.java index 43b20dce8da..1bbedfa3488 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Client.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Dog.java index 8fad06d9835..b87d1262d2b 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Dog.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/EnumArrays.java index 5f063c2ec38..06e00b39a57 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/EnumArrays.java @@ -210,9 +210,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/EnumTest.java index fb20599a85c..59888d5eb0e 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/EnumTest.java @@ -296,9 +296,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/FormatTest.java index ddb80771fda..d6c61f996f3 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/FormatTest.java @@ -373,9 +373,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 1b7ff181941..e3e0255689e 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -88,9 +88,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/MapTest.java index a791e68d8fb..003438690e6 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/MapTest.java @@ -172,9 +172,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 7c99abe53eb..823f2893c93 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -143,9 +143,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Model200Response.java index 0d39eb7eff5..5628f9e5487 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Model200Response.java @@ -107,9 +107,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ModelApiResponse.java index 3d9352c50aa..193e69fd08a 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -129,9 +129,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ModelReturn.java index ab6333ff86d..290780c8b5e 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ModelReturn.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Name.java index 1492add2952..35241e53af1 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Name.java @@ -135,9 +135,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/NumberOnly.java index b13c0536a13..d34198289ee 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/NumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Order.java index 4dcf75a7cd0..f12fb6e9413 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Order.java @@ -248,9 +248,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/OuterComposite.java index 56159fe5d93..795c17c57b5 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/OuterComposite.java @@ -130,9 +130,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Pet.java index dac1250ac07..5982c3bc344 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Pet.java @@ -264,9 +264,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index f6e025412de..630bf812cd7 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -97,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/SpecialModelName.java index e743292100b..2458c05b328 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Tag.java index bb6de58c8a1..cf94c065e5b 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/Tag.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/User.java index 4ccb8a1c147..5fbfde3bba6 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/io/swagger/client/model/User.java @@ -232,7 +232,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -244,9 +244,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/FakeApiTest.java index 2adb033dc5a..1a36baac26a 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -130,6 +130,18 @@ public void testEnumParametersTest() { // TODO: test validations } + /** + * test inline additionalProperties + * + * + */ + @Test + public void testInlineAdditionalPropertiesTest() { + Object param = null; + // Void response = api.testInlineAdditionalProperties(param); + + // TODO: test validations + } /** * test json serialization of form data * diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java index 2fd2c16ed50..ac6b922d846 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/FakeClassnameTags123ApiTest.java @@ -22,7 +22,6 @@ public void setup() { api = new ApiClient().createService(FakeClassnameTags123Api.class); } - /** * To test class name in snake case * @@ -35,5 +34,4 @@ public void testClassnameTest() { // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/PetApiTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/PetApiTest.java index a3688eb35c5..3301ee8f78a 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/PetApiTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/PetApiTest.java @@ -24,7 +24,6 @@ public void setup() { api = new ApiClient().createService(PetApi.class); } - /** * Add a new pet to the store * @@ -37,7 +36,6 @@ public void addPetTest() { // TODO: test validations } - /** * Deletes a pet * @@ -51,7 +49,6 @@ public void deletePetTest() { // TODO: test validations } - /** * Finds Pets by status * @@ -64,7 +61,6 @@ public void findPetsByStatusTest() { // TODO: test validations } - /** * Finds Pets by tags * @@ -77,7 +73,6 @@ public void findPetsByTagsTest() { // TODO: test validations } - /** * Find pet by ID * @@ -90,7 +85,6 @@ public void getPetByIdTest() { // TODO: test validations } - /** * Update an existing pet * @@ -103,7 +97,6 @@ public void updatePetTest() { // TODO: test validations } - /** * Updates a pet in the store with form data * @@ -118,7 +111,6 @@ public void updatePetWithFormTest() { // TODO: test validations } - /** * uploads an image * @@ -133,5 +125,4 @@ public void uploadFileTest() { // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/StoreApiTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/StoreApiTest.java index 1da787edf19..2cf3744e388 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/StoreApiTest.java @@ -22,7 +22,6 @@ public void setup() { api = new ApiClient().createService(StoreApi.class); } - /** * Delete purchase order by ID * @@ -35,7 +34,6 @@ public void deleteOrderTest() { // TODO: test validations } - /** * Returns pet inventories by status * @@ -47,7 +45,6 @@ public void getInventoryTest() { // TODO: test validations } - /** * Find purchase order by ID * @@ -60,7 +57,6 @@ public void getOrderByIdTest() { // TODO: test validations } - /** * Place an order for a pet * @@ -73,5 +69,4 @@ public void placeOrderTest() { // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/UserApiTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/UserApiTest.java index cd8553d8419..3fcb0215709 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/api/UserApiTest.java @@ -22,7 +22,6 @@ public void setup() { api = new ApiClient().createService(UserApi.class); } - /** * Create user * @@ -35,7 +34,6 @@ public void createUserTest() { // TODO: test validations } - /** * Creates list of users with given input array * @@ -48,7 +46,6 @@ public void createUsersWithArrayInputTest() { // TODO: test validations } - /** * Creates list of users with given input array * @@ -61,7 +58,6 @@ public void createUsersWithListInputTest() { // TODO: test validations } - /** * Delete user * @@ -74,7 +70,6 @@ public void deleteUserTest() { // TODO: test validations } - /** * Get user by user name * @@ -87,7 +82,6 @@ public void getUserByNameTest() { // TODO: test validations } - /** * Logs user into the system * @@ -101,7 +95,6 @@ public void loginUserTest() { // TODO: test validations } - /** * Logs out current logged in user session * @@ -113,7 +106,6 @@ public void logoutUserTest() { // TODO: test validations } - /** * Updated user * @@ -127,5 +119,4 @@ public void updateUserTest() { // TODO: test validations } - } diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..76542a09459 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..b64cda4ae9a --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..1d5ea3ddd41 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..b7963b4bd24 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..bf2a685235d --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..a5045e3fef2 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..d9a0c2441a6 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..b501b59c7e1 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..c605c8ee727 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..d684ee437d5 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..bcd43788b31 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..95d11adf568 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..82e7fd4c7d7 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.annotations.SerializedName; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..89eac5b2562 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..242ef207201 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..64d25301aa8 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..a018bd04e36 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..35423f00eeb --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,64 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..d0ee9107a58 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..9f3655bd094 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8e5de3f5c6f --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..16bb069f0ea --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..1ce5c00a602 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..4c144e272b5 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..9d433c9721c --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..2d8b44d111c --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.annotations.SerializedName; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..3be0968db0f --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..bb1c14e2311 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..33412a6b8c2 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..0fe6b02fbad --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..e9a7b23cc87 --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,68 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/client/petstore/java/vertx/README.md b/samples/client/petstore/java/vertx/README.md index 485b282f4d6..5133040a13c 100644 --- a/samples/client/petstore/java/vertx/README.md +++ b/samples/client/petstore/java/vertx/README.md @@ -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(); - Boolean body = true; // Boolean | Input boolean as post body + AnotherFakeApi apiInstance = new AnotherFakeApi(); + Client body = new Client(); // Client | client model try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); + Client result = apiInstance.testSpecialTags(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); + System.err.println("Exception when calling AnotherFakeApi#testSpecialTags"); e.printStackTrace(); } } @@ -90,6 +90,7 @@ 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 | @@ -97,6 +98,7 @@ Class | Method | HTTP request | Description *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 diff --git a/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md b/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md new file mode 100644 index 00000000000..7a04619aaba --- /dev/null +++ b/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md @@ -0,0 +1,54 @@ +# AnotherFakeApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags + + + +# **testSpecialTags** +> Client testSpecialTags(body) + +To test special tags + +To test special tags + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.AnotherFakeApi; + + +AnotherFakeApi apiInstance = new AnotherFakeApi(); +Client body = new Client(); // Client | client model +try { + Client result = apiInstance.testSpecialTags(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AnotherFakeApi#testSpecialTags"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md)| client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/samples/client/petstore/java/vertx/docs/FakeApi.md b/samples/client/petstore/java/vertx/docs/FakeApi.md index 0418b476a66..737ccc28293 100644 --- a/samples/client/petstore/java/vertx/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx/docs/FakeApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters +[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data @@ -267,7 +268,7 @@ FakeApi apiInstance = new FakeApi(); BigDecimal number = new BigDecimal(); // BigDecimal | None Double _double = 3.4D; // Double | None String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None -byte[] _byte = _byte_example; // byte[] | None +byte[] _byte = B; // byte[] | None Integer integer = 56; // Integer | None Integer int32 = 56; // Integer | None Long int64 = 789L; // Long | None @@ -376,6 +377,50 @@ No authorization required - **Content-Type**: */* - **Accept**: */* + +# **testInlineAdditionalProperties** +> testInlineAdditionalProperties(param) + +test inline additionalProperties + + + +### Example +```java +// Import classes: +//import io.swagger.client.ApiException; +//import io.swagger.client.api.FakeApi; + + +FakeApi apiInstance = new FakeApi(); +Object param = null; // Object | request body +try { + apiInstance.testInlineAdditionalProperties(param); +} catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **Object**| request body | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + # **testJsonFormData** > testJsonFormData(param, param2) diff --git a/samples/client/petstore/java/vertx/git_push.sh b/samples/client/petstore/java/vertx/git_push.sh index ed374619b13..ae01b182ae9 100644 --- a/samples/client/petstore/java/vertx/git_push.sh +++ b/samples/client/petstore/java/vertx/git_push.sh @@ -36,7 +36,7 @@ git_remote=`git remote` if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git else git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git diff --git a/samples/client/petstore/java/vertx/pom.xml b/samples/client/petstore/java/vertx/pom.xml index 08e8352272e..30e57cbffdc 100644 --- a/samples/client/petstore/java/vertx/pom.xml +++ b/samples/client/petstore/java/vertx/pom.xml @@ -1,248 +1,268 @@ - 4.0.0 - io.swagger - swagger-petstore-vertx - jar - swagger-petstore-vertx - 1.0.0 - https://github.com/swagger-api/swagger-codegen - Swagger Java - - scm:git:git@github.com:swagger-api/swagger-codegen.git - scm:git:git@github.com:swagger-api/swagger-codegen.git + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + io.swagger + swagger-petstore-vertx + jar + swagger-petstore-vertx + 1.0.0 https://github.com/swagger-api/swagger-codegen - - - 2.2.0 - + Swagger Java + + scm:git:git@github.com:swagger-api/swagger-codegen.git + scm:git:git@github.com:swagger-api/swagger-codegen.git + https://github.com/swagger-api/swagger-codegen + - - - Unlicense - http://www.apache.org/licenses/LICENSE-2.0.html - repo - - + + + Unlicense + http://www.apache.org/licenses/LICENSE-2.0.html + repo + + - - - Swagger - apiteam@swagger.io - Swagger - http://swagger.io - - + + + Swagger + apiteam@swagger.io + Swagger + http://swagger.io + + - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - pertest - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.6 - - - - jar - test-jar - - - - - - + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + - - org.codehaus.mojo - build-helper-maven-plugin - 3.0.0 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.6.1 - - 1.8 - 1.8 - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10.4 - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - + + + org.apache.maven.plugins + maven-jar-plugin + 2.6 + + + + jar + test-jar + + + + + + - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + add_sources + generate-sources + + add-source + + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + - - - + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + - - - io.swagger - swagger-annotations - ${swagger-core-version} - + + + io.swagger + swagger-annotations + ${swagger-core-version} + - - - io.vertx - vertx-rx-java - ${vertx-version} - - - io.vertx - vertx-web-client - ${vertx-version} - + + + io.vertx + vertx-rx-java + ${vertx-version} + + + io.vertx + vertx-web-client + ${vertx-version} + - - - com.fasterxml.jackson.core - jackson-core - ${jackson-version} - - - com.fasterxml.jackson.core - jackson-annotations - ${jackson-version} - - - com.fasterxml.jackson.core - jackson-databind - ${jackson-version} - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - ${jackson-version} - - - com.github.joschi.jackson - jackson-datatype-threetenbp - ${jackson-version} - + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + com.github.joschi.jackson + jackson-datatype-threetenbp + ${jackson-version} + - - - junit - junit - ${junit-version} - test - - - io.vertx - vertx-unit - ${vertx-version} - test - - + + + junit + junit + ${junit-version} + test + + + io.vertx + vertx-unit + ${vertx-version} + test + + - - UTF-8 - 3.4.2 - 1.5.16 - 2.6.4 - 4.12 - + + UTF-8 + 3.4.2 + 1.5.16 + 2.6.4 + 4.12 + diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/AnotherFakeApi.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/AnotherFakeApi.java new file mode 100644 index 00000000000..c233a973141 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/AnotherFakeApi.java @@ -0,0 +1,14 @@ +package io.swagger.client.api; + +import io.swagger.client.model.Client; +import io.vertx.core.AsyncResult; +import io.vertx.core.Handler; +import io.vertx.core.json.JsonObject; + +import java.util.*; + +public interface AnotherFakeApi { + + void testSpecialTags(Client body, Handler> handler); + +} diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/AnotherFakeApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/AnotherFakeApiImpl.java new file mode 100644 index 00000000000..c35fd5e73a9 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/AnotherFakeApiImpl.java @@ -0,0 +1,74 @@ +package io.swagger.client.api; + +import io.swagger.client.model.Client; + +import io.vertx.core.AsyncResult; +import io.vertx.core.Handler; +import io.vertx.core.MultiMap; +import io.vertx.core.json.JsonObject; + +import com.fasterxml.jackson.core.type.TypeReference; + +import java.util.*; + +import io.swagger.client.ApiClient; +import io.swagger.client.ApiException; +import io.swagger.client.Configuration; +import io.swagger.client.Pair; + + +public class AnotherFakeApiImpl implements AnotherFakeApi { + + private ApiClient apiClient; + + public AnotherFakeApiImpl() { + this(null); + } + + public AnotherFakeApiImpl(ApiClient apiClient) { + this.apiClient = apiClient != null ? apiClient : Configuration.getDefaultApiClient(); + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * To test special tags + * To test special tags + * @param body client model (required) + * @param resultHandler Asynchronous result handler + */ + public void testSpecialTags(Client body, Handler> resultHandler) { + Object localVarBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling testSpecialTags")); + return; + } + + // create path and map variables + String localVarPath = "/another-fake/dummy"; + + // query params + List localVarQueryParams = new ArrayList<>(); + + // header params + MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + + // form params + // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) + Map localVarFormParams = new HashMap<>(); + + String[] localVarAccepts = { "application/json" }; + String[] localVarContentTypes = { "application/json" }; + String[] localVarAuthNames = new String[] { }; + TypeReference localVarReturnType = new TypeReference() {}; + apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler); + } +} diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/FakeApi.java index 6f38f02eaf5..46124825fa9 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/FakeApi.java @@ -27,6 +27,8 @@ public interface FakeApi { void testEnumParameters(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, Handler> handler); + void testInlineAdditionalProperties(Object param, Handler> handler); + void testJsonFormData(String param, String param2, Handler> handler); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/FakeApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/FakeApiImpl.java index 2fa1e3adf45..57f72aa4c11 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/FakeApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/FakeApiImpl.java @@ -311,6 +311,40 @@ public void testEnumParameters(List enumFormStringArray, String enumForm apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); } + /** + * test inline additionalProperties + * + * @param param request body (required) + * @param resultHandler Asynchronous result handler + */ + public void testInlineAdditionalProperties(Object param, Handler> resultHandler) { + Object localVarBody = param; + + // verify the required parameter 'param' is set + if (param == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties")); + return; + } + + // create path and map variables + String localVarPath = "/fake/inline-additionalProperties"; + + // query params + List localVarQueryParams = new ArrayList<>(); + + // header params + MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); + + // form params + // TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client) + Map localVarFormParams = new HashMap<>(); + + String[] localVarAccepts = { }; + String[] localVarContentTypes = { "application/json" }; + String[] localVarAuthNames = new String[] { }; + + apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, null, resultHandler); + } /** * test json serialization of form data * diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/rxjava/AnotherFakeApi.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/rxjava/AnotherFakeApi.java new file mode 100644 index 00000000000..14d5dc06828 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/rxjava/AnotherFakeApi.java @@ -0,0 +1,49 @@ +package io.swagger.client.api.rxjava; + +import io.swagger.client.model.Client; + +import java.util.*; + +import rx.Single; +import io.vertx.core.AsyncResult; +import io.vertx.core.Handler; + + +public class AnotherFakeApi { + + private final io.swagger.client.api.AnotherFakeApi delegate; + + public AnotherFakeApi(io.swagger.client.api.AnotherFakeApi delegate) { + this.delegate = delegate; + } + + public io.swagger.client.api.AnotherFakeApi getDelegate() { + return delegate; + } + + /** + * To test special tags + * To test special tags + * @param body client model (required) + * @param resultHandler Asynchronous result handler + */ + public void testSpecialTags(Client body, Handler> resultHandler) { + delegate.testSpecialTags(body, resultHandler); + } + + /** + * To test special tags + * To test special tags + * @param body client model (required) + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxTestSpecialTags(Client body) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { + delegate.testSpecialTags(body, fut); + })); + } + + public static AnotherFakeApi newInstance(io.swagger.client.api.AnotherFakeApi arg) { + return arg != null ? new AnotherFakeApi(arg) : null; + } +} diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/rxjava/FakeApi.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/rxjava/FakeApi.java index ed8537ecaf1..adcee03d03a 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/rxjava/FakeApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/api/rxjava/FakeApi.java @@ -212,6 +212,27 @@ public Single rxTestEnumParameters(List enumFormStringArray, Strin delegate.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, fut); })); } + /** + * test inline additionalProperties + * + * @param param request body (required) + * @param resultHandler Asynchronous result handler + */ + public void testInlineAdditionalProperties(Object param, Handler> resultHandler) { + delegate.testInlineAdditionalProperties(param, resultHandler); + } + + /** + * test inline additionalProperties + * + * @param param request body (required) + * @return Asynchronous result handler (RxJava Single) + */ + public Single rxTestInlineAdditionalProperties(Object param) { + return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { + delegate.testInlineAdditionalProperties(param, fut); + })); + } /** * test json serialization of form data * diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java index 7fe69e168fd..8865bc5b7a6 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/AdditionalPropertiesClass.java @@ -41,7 +41,7 @@ public AdditionalPropertiesClass mapProperty(Map mapProperty) { public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { if (this.mapProperty == null) { - this.mapProperty = new HashMap(); + this.mapProperty = new HashMap<>(); } this.mapProperty.put(key, mapPropertyItem); return this; @@ -67,7 +67,7 @@ public AdditionalPropertiesClass mapOfMapProperty(Map mapOfMapPropertyItem) { if (this.mapOfMapProperty == null) { - this.mapOfMapProperty = new HashMap>(); + this.mapOfMapProperty = new HashMap<>(); } this.mapOfMapProperty.put(key, mapOfMapPropertyItem); return this; @@ -122,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Animal.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Animal.java index 590f36c0ae0..dd67c86fcc1 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Animal.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Animal.java @@ -110,9 +110,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/AnimalFarm.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/AnimalFarm.java index 0b1d6a74cc6..77debcbb4bf 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/AnimalFarm.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/AnimalFarm.java @@ -55,9 +55,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java index b7e59a030a4..7028fb1f9e5 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ArrayOfArrayOfNumberOnly.java @@ -38,7 +38,7 @@ public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArr public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { if (this.arrayArrayNumber == null) { - this.arrayArrayNumber = new ArrayList>(); + this.arrayArrayNumber = new ArrayList<>(); } this.arrayArrayNumber.add(arrayArrayNumberItem); return this; @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java index fdfeb6856f3..c6aac8d602d 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ArrayOfNumberOnly.java @@ -38,7 +38,7 @@ public ArrayOfNumberOnly arrayNumber(List arrayNumber) { public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { if (this.arrayNumber == null) { - this.arrayNumber = new ArrayList(); + this.arrayNumber = new ArrayList<>(); } this.arrayNumber.add(arrayNumberItem); return this; @@ -91,9 +91,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ArrayTest.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ArrayTest.java index 62665c2536a..787c1f81cae 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ArrayTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ArrayTest.java @@ -44,7 +44,7 @@ public ArrayTest arrayOfString(List arrayOfString) { public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { if (this.arrayOfString == null) { - this.arrayOfString = new ArrayList(); + this.arrayOfString = new ArrayList<>(); } this.arrayOfString.add(arrayOfStringItem); return this; @@ -70,7 +70,7 @@ public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { if (this.arrayArrayOfInteger == null) { - this.arrayArrayOfInteger = new ArrayList>(); + this.arrayArrayOfInteger = new ArrayList<>(); } this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); return this; @@ -96,7 +96,7 @@ public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (this.arrayArrayOfModel == null) { - this.arrayArrayOfModel = new ArrayList>(); + this.arrayArrayOfModel = new ArrayList<>(); } this.arrayArrayOfModel.add(arrayArrayOfModelItem); return this; @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Capitalization.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Capitalization.java index a72b0a72f46..9d3ad009209 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Capitalization.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Capitalization.java @@ -195,9 +195,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Cat.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Cat.java index b882da0ad90..9d37d2ddc2c 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Cat.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Cat.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Category.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Category.java index 464f4375c4b..c8aa31c3b31 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Category.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Category.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ClassModel.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ClassModel.java index 4f764fde68d..001903b555b 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ClassModel.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ClassModel.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Client.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Client.java index a7c4253499c..2744720fca8 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Client.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Client.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Dog.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Dog.java index 7de179b2ade..8543a31fff5 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Dog.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Dog.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/EnumArrays.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/EnumArrays.java index 12caa480285..9d93f41ccdf 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/EnumArrays.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/EnumArrays.java @@ -128,7 +128,7 @@ public EnumArrays arrayEnum(List arrayEnum) { public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { if (this.arrayEnum == null) { - this.arrayEnum = new ArrayList(); + this.arrayEnum = new ArrayList<>(); } this.arrayEnum.add(arrayEnumItem); return this; @@ -183,9 +183,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/EnumTest.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/EnumTest.java index 93d0da037b6..d9ac9c73d07 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/EnumTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/EnumTest.java @@ -257,9 +257,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/FormatTest.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/FormatTest.java index 4118656d29e..6b1493aa0fb 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/FormatTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/FormatTest.java @@ -370,9 +370,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java index 6dc9f12c4b8..1c583390fdc 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/HasOnlyReadOnly.java @@ -85,9 +85,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/MapTest.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/MapTest.java index e6344a1df0f..32198c109fc 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/MapTest.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/MapTest.java @@ -76,7 +76,7 @@ public MapTest mapMapOfString(Map> mapMapOfString) { public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { if (this.mapMapOfString == null) { - this.mapMapOfString = new HashMap>(); + this.mapMapOfString = new HashMap<>(); } this.mapMapOfString.put(key, mapMapOfStringItem); return this; @@ -102,7 +102,7 @@ public MapTest mapOfEnumString(Map mapOfEnumString) { public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { if (this.mapOfEnumString == null) { - this.mapOfEnumString = new HashMap(); + this.mapOfEnumString = new HashMap<>(); } this.mapOfEnumString.put(key, mapOfEnumStringItem); return this; @@ -157,9 +157,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index 29bfc7e8c08..c5a4ca052e4 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -83,7 +83,7 @@ public MixedPropertiesAndAdditionalPropertiesClass map(Map map) public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { if (this.map == null) { - this.map = new HashMap(); + this.map = new HashMap<>(); } this.map.put(key, mapItem); return this; @@ -140,9 +140,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Model200Response.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Model200Response.java index 58624475e43..b1919c97d7d 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Model200Response.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Model200Response.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ModelApiResponse.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ModelApiResponse.java index b010e53b48c..8e8c9ce43fb 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ModelApiResponse.java @@ -126,9 +126,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ModelReturn.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ModelReturn.java index 27d08557248..106b625f889 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ModelReturn.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ModelReturn.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Name.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Name.java index f2b9b1703bd..8c7b16d11d6 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Name.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Name.java @@ -132,9 +132,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/NumberOnly.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/NumberOnly.java index ec93aba0531..1657a8eabdd 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/NumberOnly.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/NumberOnly.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Order.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Order.java index 6976ceb8fba..f2956b3405d 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Order.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Order.java @@ -233,9 +233,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/OuterComposite.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/OuterComposite.java index 02c16a99b70..332bd7964b3 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/OuterComposite.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/OuterComposite.java @@ -127,9 +127,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Pet.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Pet.java index 4c351dec3e4..5494a684ebd 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Pet.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Pet.java @@ -39,7 +39,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList(); + private List photoUrls = new ArrayList<>(); @JsonProperty("tags") private List tags = null; @@ -168,7 +168,7 @@ public Pet tags(List tags) { public Pet addTagsItem(Tag tagsItem) { if (this.tags == null) { - this.tags = new ArrayList(); + this.tags = new ArrayList<>(); } this.tags.add(tagsItem); return this; @@ -249,9 +249,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ReadOnlyFirst.java index 76f8a912f36..aae35f87ff2 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/ReadOnlyFirst.java @@ -94,9 +94,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/SpecialModelName.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/SpecialModelName.java index 784eb8baca8..d9531b57cb8 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/SpecialModelName.java @@ -80,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Tag.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Tag.java index 1cf2f5bc5e6..3485e1392c8 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Tag.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/Tag.java @@ -103,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/User.java b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/User.java index de5bc439c5a..103d935054d 100644 --- a/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/User.java +++ b/samples/client/petstore/java/vertx/src/main/java/io/swagger/client/model/User.java @@ -229,7 +229,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -241,9 +241,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/api/AnotherFakeApiTest.java new file mode 100644 index 00000000000..471e1f5609f --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/api/AnotherFakeApiTest.java @@ -0,0 +1,76 @@ +/* + * 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.model.Client; + +import io.swagger.client.Configuration; + +import org.junit.Test; +import org.junit.Ignore; +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.runner.RunWith; + +import io.vertx.core.AsyncResult; +import io.vertx.core.Handler; +import io.vertx.core.json.JsonObject; +import io.vertx.core.Vertx; +import io.vertx.ext.unit.junit.VertxUnitRunner; +import io.vertx.ext.unit.junit.RunTestOnContext; +import io.vertx.ext.unit.TestContext; +import io.vertx.ext.unit.Async; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for AnotherFakeApi + */ +@RunWith(VertxUnitRunner.class) +@Ignore +public class AnotherFakeApiTest { + + private AnotherFakeApi api; + + @Rule + public RunTestOnContext rule = new RunTestOnContext(); + + @BeforeClass + public void setupApiClient() { + JsonObject config = new JsonObject(); + Vertx vertx = rule.vertx(); + Configuration.setupDefaultApiClient(vertx, config); + + api = new AnotherFakeApiImpl(); + } + + /** + * To test special tags + * To test special tags + * + * @param context Vertx test context for doing assertions + */ + @Test + public void testSpecialTagsTest(TestContext context) { + Async async = context.async(); + Client body = null; + api.testSpecialTags(body, result -> { + // TODO: test validations + async.complete(); + }); + } + +} \ No newline at end of file diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/api/FakeApiTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/api/FakeApiTest.java index ac9a1de6628..f9282575c37 100644 --- a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/api/FakeApiTest.java @@ -193,6 +193,22 @@ public void testEnumParametersTest(TestContext context) { }); } + /** + * test inline additionalProperties + * + * + * @param context Vertx test context for doing assertions + */ + @Test + public void testInlineAdditionalPropertiesTest(TestContext context) { + Async async = context.async(); + Object param = null; + api.testInlineAdditionalProperties(param, result -> { + // TODO: test validations + async.complete(); + }); + } + /** * test json serialization of form data * diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..b4f92a36c34 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/AnimalFarmTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/AnimalFarmTest.java new file mode 100644 index 00000000000..67c5a511a00 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.client.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/AnimalTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/AnimalTest.java new file mode 100644 index 00000000000..64c259e27a8 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/AnimalTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..f49a83b96c0 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..0835812b967 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ArrayTestTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ArrayTestTest.java new file mode 100644 index 00000000000..e1a135877f8 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ArrayTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/CapitalizationTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/CapitalizationTest.java new file mode 100644 index 00000000000..85df56981e1 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/CapitalizationTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/CatTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/CatTest.java new file mode 100644 index 00000000000..37f246cef46 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/CatTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/CategoryTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/CategoryTest.java new file mode 100644 index 00000000000..4c600ad6bfe --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/CategoryTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ClassModelTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ClassModelTest.java new file mode 100644 index 00000000000..7c1c36eb1d8 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ClassModelTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ClientTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ClientTest.java new file mode 100644 index 00000000000..0af24ee94c2 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ClientTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/DogTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/DogTest.java new file mode 100644 index 00000000000..c5776ad73c1 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/DogTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/EnumArraysTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/EnumArraysTest.java new file mode 100644 index 00000000000..391a26433df --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/EnumClassTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/EnumClassTest.java new file mode 100644 index 00000000000..c0afa7dcebd --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/EnumClassTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/EnumTestTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/EnumTestTest.java new file mode 100644 index 00000000000..173c6e24c09 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/FormatTestTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/FormatTestTest.java new file mode 100644 index 00000000000..98234657055 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/FormatTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..5d83bc6e110 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/MapTestTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/MapTestTest.java new file mode 100644 index 00000000000..39d72d21e2c --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..658e220c498 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/Model200ResponseTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/Model200ResponseTest.java new file mode 100644 index 00000000000..e387d196f41 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/Model200ResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..1c5c0137b50 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ModelApiResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ModelReturnTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ModelReturnTest.java new file mode 100644 index 00000000000..8d7dbfe913b --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ModelReturnTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/NameTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/NameTest.java new file mode 100644 index 00000000000..aaf592b2eee --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/NameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/NumberOnlyTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/NumberOnlyTest.java new file mode 100644 index 00000000000..3eae383b79b --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/NumberOnlyTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/OrderTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/OrderTest.java new file mode 100644 index 00000000000..35b9473b6c5 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/OuterCompositeTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/OuterCompositeTest.java new file mode 100644 index 00000000000..0a9716c9783 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/OuterCompositeTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/OuterEnumTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/OuterEnumTest.java new file mode 100644 index 00000000000..f74d363aec1 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/OuterEnumTest.java @@ -0,0 +1,45 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/PetTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/PetTest.java new file mode 100644 index 00000000000..4ec6e0ff791 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.client.model.Category; +import io.swagger.client.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..e0f6a407ed5 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/ReadOnlyFirstTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..2cd54e5cfc0 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/SpecialModelNameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/TagTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/TagTest.java new file mode 100644 index 00000000000..8cfe2bcdb76 --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/TagTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/UserTest.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/UserTest.java new file mode 100644 index 00000000000..2568fd1fdaf --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/UserTest.java @@ -0,0 +1,65 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.client.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/util/ModelTestUtils.java b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..1f115e576de --- /dev/null +++ b/samples/client/petstore/java/vertx/src/test/java/io/swagger/client/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-inflector/inflector.yaml b/samples/server/petstore/java-inflector/inflector.yaml index b9b699e65f0..67d074fdc45 100644 --- a/samples/server/petstore/java-inflector/inflector.yaml +++ b/samples/server/petstore/java-inflector/inflector.yaml @@ -11,11 +11,9 @@ ArrayOfArrayOfNumberOnly : io.swagger.model.ArrayOfArrayOfNumberOnly ArrayOfNumberOnly : io.swagger.model.ArrayOfNumberOnly ArrayTest : io.swagger.model.ArrayTest Capitalization : io.swagger.model.Capitalization -Cat : io.swagger.model.Cat Category : io.swagger.model.Category ClassModel : io.swagger.model.ClassModel Client : io.swagger.model.Client -Dog : io.swagger.model.Dog EnumArrays : io.swagger.model.EnumArrays EnumClass : io.swagger.model.EnumClass EnumTest : io.swagger.model.EnumTest @@ -29,12 +27,15 @@ ModelReturn : io.swagger.model.ModelReturn Name : io.swagger.model.Name NumberOnly : io.swagger.model.NumberOnly Order : io.swagger.model.Order +OuterComposite : io.swagger.model.OuterComposite OuterEnum : io.swagger.model.OuterEnum Pet : io.swagger.model.Pet ReadOnlyFirst : io.swagger.model.ReadOnlyFirst SpecialModelName : io.swagger.model.SpecialModelName Tag : io.swagger.model.Tag User : io.swagger.model.User +Cat : io.swagger.model.Cat +Dog : io.swagger.model.Dog entityProcessors: - json diff --git a/samples/server/petstore/java-inflector/pom.xml b/samples/server/petstore/java-inflector/pom.xml index 92265cc8ccf..810a35eb847 100644 --- a/samples/server/petstore/java-inflector/pom.xml +++ b/samples/server/petstore/java-inflector/pom.xml @@ -1,4 +1,5 @@ - + org.sonatype.oss oss-parent @@ -10,23 +11,40 @@ jar swagger-inflector-server 1.0.0 - - 2.2.0 - - - Unlicense - http://www.apache.org/licenses/LICENSE-2.0.html - repo - + + Unlicense + http://www.apache.org/licenses/LICENSE-2.0.html + repo + - + install target ${project.artifactId}-${project.version} + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + org.codehaus.mojo build-helper-maven-plugin @@ -40,7 +58,8 @@ - src/gen/java + + src/gen/java @@ -107,6 +126,12 @@ swagger-inflector ${swagger-inflector-version} + + junit + junit + ${junit-version} + test + @@ -118,6 +143,7 @@ + UTF-8 1.0.0 1.0.14 9.2.9.v20150224 diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java index c410ded2044..81f031293c1 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -90,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Animal.java index 79ea4119367..2d2fb7cda08 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Animal.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -89,9 +102,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/AnimalFarm.java index 534b8facf3a..5e4da9e38d4 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/AnimalFarm.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -43,9 +56,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 641b44c4151..327894d55e6 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -68,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java index 0aeda8a27e8..91197d17180 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -68,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ArrayTest.java index 61cd568da46..31d23ad15ab 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ArrayTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -112,9 +125,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Capitalization.java index 8aa6135053f..85190e3f40b 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Capitalization.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -176,9 +189,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Cat.java index e26e6253685..78f28a1c704 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Cat.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -66,9 +79,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Category.java index 08a80055ff5..b4a28f062c4 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Category.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ClassModel.java index d20b67fc179..28b291f4483 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ClassModel.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -68,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Client.java index 17e4f9b950f..c1b5722e8c2 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Client.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Client.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -65,9 +78,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Dog.java index 11d9c9ccf3b..6bf7e65c19a 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Dog.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -66,9 +79,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/EnumArrays.java index 9fd0e553316..ef37f6e8a27 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/EnumArrays.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -152,9 +165,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/EnumClass.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/EnumClass.java index ec7f34e4229..d70659af92e 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/EnumClass.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/EnumClass.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/EnumTest.java index b810a573a9f..16049169411 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/EnumTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -228,9 +241,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/FormatTest.java index 920dd05e5c5..f260ea9099e 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/FormatTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -342,9 +355,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index 0e3740f02dc..5a170600d9c 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/MapTest.java index 9e09649102e..45b2b2ba23b 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/MapTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -122,9 +135,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index ec37750f9de..f8cd63a8a79 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -115,9 +128,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Model200Response.java index 4fd3d092af6..12c060c654f 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Model200Response.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -90,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ModelApiResponse.java index 5ac1e316581..bae39187ee1 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -109,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ModelReturn.java index afb7202fe71..b97552c753a 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ModelReturn.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -68,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Name.java index 85ef0f0c267..bd7901a9603 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Name.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -134,9 +147,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/NumberOnly.java index 7a83d647280..e6dad8118ee 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/NumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -66,9 +79,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Order.java index 6cf0c39769f..60545aab9e2 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Order.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -211,9 +224,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/OuterComposite.java index d63d9d1054d..36ebf5c80b2 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/OuterComposite.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -110,9 +123,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/OuterEnum.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/OuterEnum.java index 8b7e863f8fb..22b1891b9ca 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/OuterEnum.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/OuterEnum.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Pet.java index c2d4c08cfcc..87456184323 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Pet.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -214,9 +227,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ReadOnlyFirst.java index 736b7b7acc5..143868a1c62 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/SpecialModelName.java index ce1dfecab01..ab4d1e150d5 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/SpecialModelName.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -65,9 +78,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Tag.java index 3e0ca356763..5d3994ce1b7 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/Tag.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/User.java index 4addb9c0238..c4563451451 100644 --- a/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/java-inflector/src/gen/java/io/swagger/model/User.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -208,7 +221,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -220,9 +233,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } 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 ef4896bab5e..adef216b316 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: @@ -1107,6 +1096,7 @@ definitions: type: "string" password: type: "string" + x-obfuscated: true phone: type: "string" userStatus: diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..75c3e3986be --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..14db584c435 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..a9a9ecbb6e1 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..b39225f8548 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..95cb03e9c48 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..2a4e301de6f --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..554c36b9b3b --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..7c3627bd1ef --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..41b57dcd59d --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..813e2c5e444 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..448daaa50a5 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..3cfcb81b084 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..e722c43d866 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..e7e1bdebe2b --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,44 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..c22b8fac88d --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..9ab44ce86b6 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.Date; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..e450821458b --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..c00010d38c5 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..93323475a73 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..27befd68de9 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..8b7f3a0fcf2 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..56e22907fc7 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..b8e28169335 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..29ac4d3d5a9 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..19e65d26ca0 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..dea469a8b83 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..0888205f352 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,44 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..2578cf7326b --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..ee4b57b4890 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..1450f6a4912 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..8895ffc2036 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..07dc0448fe3 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..8014ad95bf6 --- /dev/null +++ b/samples/server/petstore/java-inflector/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,88 @@ +/* + * 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.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-msf4j/.swagger-codegen-ignore b/samples/server/petstore/java-msf4j/.swagger-codegen-ignore index 3adb38ed6e2..c5fa491b4c5 100644 --- a/samples/server/petstore/java-msf4j/.swagger-codegen-ignore +++ b/samples/server/petstore/java-msf4j/.swagger-codegen-ignore @@ -21,4 +21,3 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md -pom.xml diff --git a/samples/server/petstore/java-msf4j/README.md b/samples/server/petstore/java-msf4j/README.md index faa1cc0c2b7..9c4267f9302 100644 --- a/samples/server/petstore/java-msf4j/README.md +++ b/samples/server/petstore/java-msf4j/README.md @@ -1,23 +1,29 @@ -# Swagger Jersey generated server +# Swagger MSF4J generated server -## Overview -This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the -[OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This -is an example of building a swagger-enabled JAX-RS server. -This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework. - -To run the server, please execute the following: +WSO2 Microservices Framework for Java (MSF4J) is a lightweight high performance framework for developing & running microservices. WSO2 MSF4J is one of the highest performing lightweight Java microservices frameworks. Now swagger code generator will generate micro service skeleton from swagger definition. So you can use this project to convert your swagger definitions to micro service quickly. With this approach you can develop complete micro service within seconds from your swagger definition. +MSF4J generator uses java-msf4j as the default library. +Before you build/run service replace .deploy(new PetApi()) with your actual service class name in Application.java file like .deploy(new ApisAPI()) then it will start that service. If you have multiple service classes add them in , separated manner. ``` -mvn clean package jetty:run + new MicroservicesRunner() + .deploy(new PetsApi()) + .start(); ``` -You can then view the swagger listing here: +To Use-it : in the generated folder try +``` +mvn package +``` +for build jar, then start your server: ``` -http://localhost:8080/v2/swagger.json +java -jar target/micro-service-server-1.0.0.jar ``` -Note that if you have configured the `host` to be something other than localhost, the calls through -swagger-ui will be directed to that host and not localhost! \ No newline at end of file +Java Microservice listening on default port 8080. +Run the following command or simply go to http://127.0.0.1:8080/pet/12 from your browser: + +``` + curl http://127.0.0.1:8080/pet/12 +``` diff --git a/samples/server/petstore/java-msf4j/pom.xml b/samples/server/petstore/java-msf4j/pom.xml index 85157e6046e..3f2827a8c47 100644 --- a/samples/server/petstore/java-msf4j/pom.xml +++ b/samples/server/petstore/java-msf4j/pom.xml @@ -43,23 +43,6 @@ - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - Play Test - integration-test - - exec - - - ./mvn_test_jdk8_only.sh - - - - @@ -78,6 +61,12 @@ jackson-datatype-joda 2.4.1 + + junit + junit + ${junit-version} + test + diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java index 789fe0cd3cf..e33d0b589b4 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -107,9 +120,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Animal.java index 60aaf82231f..18668e67d0f 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Animal.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -90,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/AnimalFarm.java index c2b0084d9cd..100acaef197 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/AnimalFarm.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -41,9 +54,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 37112db97ee..3cb931c0179 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -76,9 +89,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java index 690c5841b52..85e5e1e876d 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -76,9 +89,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ArrayTest.java index db67fc5a92c..bcc94221238 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ArrayTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -138,9 +151,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Capitalization.java index 94cb9977104..d82c0dbe980 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Capitalization.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -180,9 +193,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Cat.java index 04bdb3cbd41..c7d6200dc49 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Cat.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -67,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Category.java index ba1ecfdb2b8..3824de8823f 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Category.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -88,9 +101,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ClassModel.java index 16c743e4f32..dbe2f44c6cf 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ClassModel.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -66,9 +79,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Client.java index fcb2b0a8340..2859c8d6bac 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Client.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Client.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -65,9 +78,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Dog.java index f8072688756..d07bdff1b06 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Dog.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -67,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/EnumArrays.java index 55358c076bd..bac050f4c9b 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/EnumArrays.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -161,9 +174,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/EnumClass.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/EnumClass.java index d8ac42c4872..182c55f80cd 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/EnumClass.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/EnumClass.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/EnumTest.java index d081e726855..c62dffb0d69 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/EnumTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -231,9 +244,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/FormatTest.java index 4c4968d4aee..5b20be091f7 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/FormatTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -354,9 +367,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index 3f5492a2e62..69357eda7e0 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -70,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/MapTest.java index 1ff2f59e99c..26eb201ff4b 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/MapTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -139,9 +152,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index b784a93830d..2de2ac942e0 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -125,9 +138,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Model200Response.java index 09ad4d0d60e..166524825b0 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Model200Response.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -89,9 +102,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ModelApiResponse.java index 82f447004ee..81f07e94604 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -111,9 +124,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ModelReturn.java index 884a45c598e..9b628e9528c 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ModelReturn.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -66,9 +79,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Name.java index 09085fb52dc..6e64079d0eb 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Name.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -117,9 +130,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/NumberOnly.java index 9424f7a4b5e..169609f9d21 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/NumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -66,9 +79,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Order.java index 5146e0f12e9..236b7492ec2 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Order.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -215,9 +228,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/OuterComposite.java index 5544c27e528..03b1d2df82c 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/OuterComposite.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -112,9 +125,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/OuterEnum.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/OuterEnum.java index 0abc3d063b5..6828e34acba 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/OuterEnum.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/OuterEnum.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Pet.java index dbbf22e859d..f0072f59c55 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Pet.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -231,9 +244,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ReadOnlyFirst.java index 50a2a7e4184..df3e3e9e25d 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -79,9 +92,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/SpecialModelName.java index 2cdc99de90e..5bdea32f080 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/SpecialModelName.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -65,9 +78,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Tag.java index 846812a5031..265b4db6f45 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/Tag.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -88,9 +101,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/User.java index 52c5fff826e..95247eb558b 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/io/swagger/model/User.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Objects; @@ -214,7 +227,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -226,9 +239,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..75c3e3986be --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..14db584c435 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..a9a9ecbb6e1 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..b39225f8548 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..95cb03e9c48 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..2a4e301de6f --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..554c36b9b3b --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..7c3627bd1ef --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..41b57dcd59d --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..813e2c5e444 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..448daaa50a5 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..3cfcb81b084 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..e722c43d866 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..e7e1bdebe2b --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,44 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..c22b8fac88d --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..9ab44ce86b6 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.Date; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..e450821458b --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..c00010d38c5 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..93323475a73 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..27befd68de9 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..8b7f3a0fcf2 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..56e22907fc7 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..b8e28169335 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..29ac4d3d5a9 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..19e65d26ca0 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..dea469a8b83 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..0888205f352 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,44 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..2578cf7326b --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..ee4b57b4890 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..1450f6a4912 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..8895ffc2036 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..07dc0448fe3 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..8014ad95bf6 --- /dev/null +++ b/samples/server/petstore/java-msf4j/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,88 @@ +/* + * 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.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Category.java index 9f0206575f5..2d8c20796e8 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/ModelApiResponse.java index 07493e84825..df384d9ce70 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -109,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java index cdc21f722c9..fbfc4ef7667 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import java.time.OffsetDateTime; @@ -210,9 +223,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Pet.java index fc310313180..a14b5cfe39d 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import apimodels.Category; @@ -25,7 +38,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList(); + private List photoUrls = new ArrayList<>(); @JsonProperty("tags") private List tags = null; @@ -149,7 +162,7 @@ public Pet tags(List tags) { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList(); + tags = new ArrayList<>(); } tags.add(tagsItem); return this; @@ -229,9 +242,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Tag.java index 15a8774252a..5543f1ff3d0 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/User.java b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/User.java index 689de768893..9d51b48f0a4 100644 --- a/samples/server/petstore/java-play-framework-controller-only/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-controller-only/app/apimodels/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -207,7 +220,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -219,9 +232,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-controller-only/public/swagger.json b/samples/server/petstore/java-play-framework-controller-only/public/swagger.json index c54baaa89cf..325cc97e76a 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/swagger.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/swagger.json @@ -1,919 +1,909 @@ -{ - "swagger" : "2.0", - "info" : { - "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - "version" : "1.0.0", - "title" : "Swagger Petstore", - "termsOfService" : "http://swagger.io/terms/", - "contact" : { - "email" : "apiteam@swagger.io" - }, - "license" : { - "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "host" : "petstore.swagger.io", - "basePath" : "/v2", - "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets", - "externalDocs" : { - "description" : "Find out more", - "url" : "http://swagger.io" - } - }, { - "name" : "store", - "description" : "Access to Petstore orders" - }, { - "name" : "user", - "description" : "Operations about user", - "externalDocs" : { - "description" : "Find out more about our store", - "url" : "http://swagger.io" - } - } ], - "schemes" : [ "http" ], - "paths" : { - "/pet" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "description" : "", - "operationId" : "addPet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "description" : "", - "operationId" : "updatePet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByStatus" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "status", - "in" : "query", - "description" : "Status values that need to be considered for filter", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByTags" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "tags", - "in" : "query", - "description" : "Tags to filter by", - "required" : true, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "deprecated" : true, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", - "description" : "Returns a single pet", - "operationId" : "getPetById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to return", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Pet" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", - "description" : "", - "operationId" : "updatePetWithForm", - "consumes" : [ "application/x-www-form-urlencoded" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet that needs to be updated", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "name", - "in" : "formData", - "description" : "Updated name of the pet", - "required" : false, - "type" : "string" - }, { - "name" : "status", - "in" : "formData", - "description" : "Updated status of the pet", - "required" : false, - "type" : "string" - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/x-www-form-urlencoded", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "description" : "", - "operationId" : "deletePet", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "required" : false, - "type" : "string" - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", - "description" : "", - "operationId" : "uploadFile", - "consumes" : [ "multipart/form-data" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to update", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "additionalMetadata", - "in" : "formData", - "description" : "Additional data to pass to server", - "required" : false, - "type" : "string" - }, { - "name" : "file", - "in" : "formData", - "description" : "file to upload", - "required" : false, - "type" : "file" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/ApiResponse" - } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "multipart/form-data", - "x-accepts" : "application/json" - } - }, - "/store/inventory" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "produces" : [ "application/json" ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } - } - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order" : { - "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", - "description" : "", - "operationId" : "placeOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "order placed for purchasing the pet", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Order" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid Order" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order/{orderId}" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of pet that needs to be fetched", - "required" : true, - "type" : "integer", - "maximum" : 5, - "minimum" : 1, - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Create user", - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Created user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithArray" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithArrayInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithList" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithListInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/login" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", - "description" : "", - "operationId" : "loginUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "query", - "description" : "The user name for login", - "required" : true, - "type" : "string" - }, { - "name" : "password", - "in" : "query", - "description" : "The password for login in clear text", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "string" - }, - "headers" : { - "X-Rate-Limit" : { - "type" : "integer", - "format" : "int32", - "description" : "calls per hour allowed by the user" - }, - "X-Expires-After" : { - "type" : "string", - "format" : "date-time", - "description" : "date in UTC when toekn expires" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/logout" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", - "description" : "", - "operationId" : "logoutUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/{username}" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", - "description" : "", - "operationId" : "getUserByName", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be fetched. Use user1 for testing. ", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/User" - } - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "name that need to be deleted", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Updated user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - } - }, - "securityDefinitions" : { - "petstore_auth" : { - "type" : "oauth2", - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "flow" : "implicit", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - }, - "api_key" : { - "type" : "apiKey", - "name" : "api_key", - "in" : "header" - } - }, - "definitions" : { - "Order" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "petId" : { - "type" : "integer", - "format" : "int64" - }, - "quantity" : { - "type" : "integer", - "format" : "int32" - }, - "shipDate" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] - }, - "complete" : { - "type" : "boolean", - "default" : false - } - }, - "title" : "Pet Order", - "description" : "An order for a pets from the pet store", - "example" : { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" - }, - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet catehgry", - "description" : "A category for a pet", - "example" : { - "name" : "name", - "id" : 6 - }, - "xml" : { - "name" : "Category" - } - }, - "User" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "type" : "integer", - "format" : "int32", - "description" : "User Status" - } - }, - "title" : "a User", - "description" : "A User who is purchasing from the pet store", - "example" : { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" - }, - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "description" : "A tag for a pet", - "example" : { - "name" : "name", - "id" : 1 - }, - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "type" : "object", - "required" : [ "name", "photoUrls" ], - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "category" : { - "$ref" : "#/definitions/Category" - }, - "name" : { - "type" : "string", - "example" : "doggie" - }, - "photoUrls" : { - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - }, - "items" : { - "type" : "string" - } - }, - "tags" : { - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - }, - "items" : { - "$ref" : "#/definitions/Tag" - } - }, - "status" : { - "type" : "string", - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] - } - }, - "title" : "a Pet", - "description" : "A pet for sale in the pet store", - "example" : { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" - }, - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "integer", - "format" : "int32" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - } - } - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - } +{ + "swagger" : "2.0", + "info" : { + "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "version" : "1.0.0", + "title" : "Swagger Petstore", + "termsOfService" : "http://swagger.io/terms/", + "contact" : { + "email" : "apiteam@swagger.io" + }, + "license" : { + "name" : "Apache-2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "host" : "petstore.swagger.io", + "basePath" : "/v2", + "tags" : [ { + "name" : "pet", + "description" : "Everything about your Pets", + "externalDocs" : { + "description" : "Find out more", + "url" : "http://swagger.io" + } + }, { + "name" : "store", + "description" : "Access to Petstore orders" + }, { + "name" : "user", + "description" : "Operations about user", + "externalDocs" : { + "description" : "Find out more about our store", + "url" : "http://swagger.io" + } + } ], + "schemes" : [ "http" ], + "paths" : { + "/pet" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "Add a new pet to the store", + "description" : "", + "operationId" : "addPet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "pet" ], + "summary" : "Update an existing pet", + "description" : "", + "operationId" : "updatePet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + }, + "405" : { + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/pet/findByStatus" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by status", + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "status", + "in" : "query", + "description" : "Status values that need to be considered for filter", + "required" : true, + "type" : "array", + "items" : { + "type" : "string", + "default" : "available", + "enum" : [ "available", "pending", "sold" ] + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid status value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/findByTags" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by tags", + "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId" : "findPetsByTags", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "tags", + "in" : "query", + "description" : "Tags to filter by", + "required" : true, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid tag value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "deprecated" : true, + "x-accepts" : "application/json" + } + }, + "/pet/{petId}" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Find pet by ID", + "description" : "Returns a single pet", + "operationId" : "getPetById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to return", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Pet" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + }, + "post" : { + "tags" : [ "pet" ], + "summary" : "Updates a pet in the store with form data", + "description" : "", + "operationId" : "updatePetWithForm", + "consumes" : [ "application/x-www-form-urlencoded" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet that needs to be updated", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "name", + "in" : "formData", + "description" : "Updated name of the pet", + "required" : false, + "type" : "string" + }, { + "name" : "status", + "in" : "formData", + "description" : "Updated status of the pet", + "required" : false, + "type" : "string" + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/x-www-form-urlencoded", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "pet" ], + "summary" : "Deletes a pet", + "description" : "", + "operationId" : "deletePet", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "api_key", + "in" : "header", + "required" : false, + "type" : "string" + }, { + "name" : "petId", + "in" : "path", + "description" : "Pet id to delete", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "400" : { + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/{petId}/uploadImage" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "description" : "", + "operationId" : "uploadFile", + "consumes" : [ "multipart/form-data" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "additionalMetadata", + "in" : "formData", + "description" : "Additional data to pass to server", + "required" : false, + "type" : "string" + }, { + "name" : "file", + "in" : "formData", + "description" : "file to upload", + "required" : false, + "type" : "file" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/ApiResponse" + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "multipart/form-data", + "x-accepts" : "application/json" + } + }, + "/store/inventory" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Returns pet inventories by status", + "description" : "Returns a map of status codes to quantities", + "operationId" : "getInventory", + "produces" : [ "application/json" ], + "parameters" : [ ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int32" + } + } + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + } + }, + "/store/order" : { + "post" : { + "tags" : [ "store" ], + "summary" : "Place an order for a pet", + "description" : "", + "operationId" : "placeOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "order placed for purchasing the pet", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Order" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid Order" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/store/order/{orderId}" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Find purchase order by ID", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId" : "getOrderById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of pet that needs to be fetched", + "required" : true, + "type" : "integer", + "maximum" : 5, + "minimum" : 1, + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "store" ], + "summary" : "Delete purchase order by ID", + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of the order that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + } + }, + "/user" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Create user", + "description" : "This can only be done by the logged in user.", + "operationId" : "createUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Created user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithArray" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithArrayInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithList" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithListInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/login" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs user into the system", + "description" : "", + "operationId" : "loginUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "query", + "description" : "The user name for login", + "required" : true, + "type" : "string" + }, { + "name" : "password", + "in" : "query", + "description" : "The password for login in clear text", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "string" + }, + "headers" : { + "X-Rate-Limit" : { + "type" : "integer", + "format" : "int32", + "description" : "calls per hour allowed by the user" + }, + "X-Expires-After" : { + "type" : "string", + "format" : "date-time", + "description" : "date in UTC when toekn expires" + } + } + }, + "400" : { + "description" : "Invalid username/password supplied" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/logout" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs out current logged in user session", + "description" : "", + "operationId" : "logoutUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/{username}" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Get user by user name", + "description" : "", + "operationId" : "getUserByName", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be fetched. Use user1 for testing. ", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/User" + } + }, + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "user" ], + "summary" : "Updated user", + "description" : "This can only be done by the logged in user.", + "operationId" : "updateUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "name that need to be deleted", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Updated user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid user supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "user" ], + "summary" : "Delete user", + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + } + } + }, + "securityDefinitions" : { + "petstore_auth" : { + "type" : "oauth2", + "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", + "flow" : "implicit", + "scopes" : { + "write:pets" : "modify pets in your account", + "read:pets" : "read your pets" + } + }, + "api_key" : { + "type" : "apiKey", + "name" : "api_key", + "in" : "header" + } + }, + "definitions" : { + "Order" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "petId" : { + "type" : "integer", + "format" : "int64" + }, + "quantity" : { + "type" : "integer", + "format" : "int32" + }, + "shipDate" : { + "type" : "string", + "format" : "date-time" + }, + "status" : { + "type" : "string", + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ] + }, + "complete" : { + "type" : "boolean", + "default" : false + } + }, + "title" : "Pet Order", + "description" : "An order for a pets from the pet store", + "example" : { + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" + }, + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet catehgry", + "description" : "A category for a pet", + "example" : { + "name" : "name", + "id" : 6 + }, + "xml" : { + "name" : "Category" + } + }, + "User" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string", + "x-obfuscated" : true + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "type" : "integer", + "format" : "int32", + "description" : "User Status" + } + }, + "title" : "a User", + "description" : "A User who is purchasing from the pet store", + "example" : { + "firstName" : "firstName", + "lastName" : "lastName", + "password" : "password", + "userStatus" : 6, + "phone" : "phone", + "id" : 0, + "email" : "email", + "username" : "username" + }, + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet Tag", + "description" : "A tag for a pet", + "example" : { + "name" : "name", + "id" : 1 + }, + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "type" : "object", + "required" : [ "name", "photoUrls" ], + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "category" : { + "$ref" : "#/definitions/Category" + }, + "name" : { + "type" : "string", + "example" : "doggie" + }, + "photoUrls" : { + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + }, + "items" : { + "type" : "string" + } + }, + "tags" : { + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + }, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "status" : { + "type" : "string", + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ] + } + }, + "title" : "a Pet", + "description" : "A pet for sale in the pet store", + "example" : { + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" + }, + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + }, + "title" : "An uploaded response", + "description" : "Describes the result of uploading an image resource", + "example" : { + "code" : 0, + "type" : "type", + "message" : "message" + } + } + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-controller-only/test/apimodels/CategoryTest.java b/samples/server/petstore/java-play-framework-controller-only/test/apimodels/CategoryTest.java new file mode 100644 index 00000000000..bb84c1139bc --- /dev/null +++ b/samples/server/petstore/java-play-framework-controller-only/test/apimodels/CategoryTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/java-play-framework-controller-only/test/apimodels/ModelApiResponseTest.java b/samples/server/petstore/java-play-framework-controller-only/test/apimodels/ModelApiResponseTest.java new file mode 100644 index 00000000000..98b960c13f8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-controller-only/test/apimodels/ModelApiResponseTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/java-play-framework-controller-only/test/apimodels/OrderTest.java b/samples/server/petstore/java-play-framework-controller-only/test/apimodels/OrderTest.java new file mode 100644 index 00000000000..45bc15e250c --- /dev/null +++ b/samples/server/petstore/java-play-framework-controller-only/test/apimodels/OrderTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.time.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/java-play-framework-controller-only/test/apimodels/PetTest.java b/samples/server/petstore/java-play-framework-controller-only/test/apimodels/PetTest.java new file mode 100644 index 00000000000..35eeb23ea17 --- /dev/null +++ b/samples/server/petstore/java-play-framework-controller-only/test/apimodels/PetTest.java @@ -0,0 +1,54 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import apimodels.Category; +import apimodels.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/java-play-framework-controller-only/test/apimodels/TagTest.java b/samples/server/petstore/java-play-framework-controller-only/test/apimodels/TagTest.java new file mode 100644 index 00000000000..b1a9e90252f --- /dev/null +++ b/samples/server/petstore/java-play-framework-controller-only/test/apimodels/TagTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/java-play-framework-controller-only/test/apimodels/UserTest.java b/samples/server/petstore/java-play-framework-controller-only/test/apimodels/UserTest.java new file mode 100644 index 00000000000..2083dab390b --- /dev/null +++ b/samples/server/petstore/java-play-framework-controller-only/test/apimodels/UserTest.java @@ -0,0 +1,60 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/java-play-framework-controller-only/test/apimodels/util/ModelTestUtils.java b/samples/server/petstore/java-play-framework-controller-only/test/apimodels/util/ModelTestUtils.java new file mode 100644 index 00000000000..c60e2e23e08 --- /dev/null +++ b/samples/server/petstore/java-play-framework-controller-only/test/apimodels/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package apimodels.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java index 106b4d4f02c..9c2784a0686 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AdditionalPropertiesClass.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import java.util.HashMap; @@ -27,7 +40,7 @@ public AdditionalPropertiesClass mapProperty(Map mapProperty) { public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { if (this.mapProperty == null) { - this.mapProperty = new HashMap(); + this.mapProperty = new HashMap<>(); } this.mapProperty.put(key, mapPropertyItem); return this; @@ -52,7 +65,7 @@ public AdditionalPropertiesClass mapOfMapProperty(Map mapOfMapPropertyItem) { if (this.mapOfMapProperty == null) { - this.mapOfMapProperty = new HashMap>(); + this.mapOfMapProperty = new HashMap<>(); } this.mapOfMapProperty.put(key, mapOfMapPropertyItem); return this; @@ -107,9 +120,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Animal.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Animal.java index 2202fe1078e..9182cf99f6e 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Animal.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Animal.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -90,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AnimalFarm.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AnimalFarm.java index 13a90b97be2..d5537e99fe3 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AnimalFarm.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/AnimalFarm.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import apimodels.Animal; @@ -46,9 +59,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfArrayOfNumberOnly.java index e1e1bb6038c..d475146248f 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfArrayOfNumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import java.math.BigDecimal; @@ -24,7 +37,7 @@ public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArr public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { if (arrayArrayNumber == null) { - arrayArrayNumber = new ArrayList>(); + arrayArrayNumber = new ArrayList<>(); } arrayArrayNumber.add(arrayArrayNumberItem); return this; @@ -77,9 +90,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfNumberOnly.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfNumberOnly.java index 52a1a985cdc..ae29768fce7 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfNumberOnly.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayOfNumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import java.math.BigDecimal; @@ -24,7 +37,7 @@ public ArrayOfNumberOnly arrayNumber(List arrayNumber) { public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { if (arrayNumber == null) { - arrayNumber = new ArrayList(); + arrayNumber = new ArrayList<>(); } arrayNumber.add(arrayNumberItem); return this; @@ -77,9 +90,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayTest.java index 0825d79da84..c8e425391f2 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayTest.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ArrayTest.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import apimodels.ReadOnlyFirst; @@ -30,7 +43,7 @@ public ArrayTest arrayOfString(List arrayOfString) { public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { if (arrayOfString == null) { - arrayOfString = new ArrayList(); + arrayOfString = new ArrayList<>(); } arrayOfString.add(arrayOfStringItem); return this; @@ -55,7 +68,7 @@ public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { if (arrayArrayOfInteger == null) { - arrayArrayOfInteger = new ArrayList>(); + arrayArrayOfInteger = new ArrayList<>(); } arrayArrayOfInteger.add(arrayArrayOfIntegerItem); return this; @@ -81,7 +94,7 @@ public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { if (arrayArrayOfModel == null) { - arrayArrayOfModel = new ArrayList>(); + arrayArrayOfModel = new ArrayList<>(); } arrayArrayOfModel.add(arrayArrayOfModelItem); return this; @@ -138,9 +151,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Capitalization.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Capitalization.java index f78ceeb9d0b..2702595c3f8 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Capitalization.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Capitalization.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; @@ -175,9 +188,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Cat.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Cat.java index a87f399d687..6c9ed667dcf 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Cat.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Cat.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import apimodels.Animal; @@ -67,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Category.java index c2a4222a8aa..7e16b8e6687 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Category.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ClassModel.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ClassModel.java index ee8cd40ca40..dd9021c7d1c 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ClassModel.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ClassModel.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; @@ -65,9 +78,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Client.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Client.java index f14be52cf46..08513bcd0b6 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Client.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Client.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; @@ -65,9 +78,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Dog.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Dog.java index 27e3f5fdb25..f99e4c2921b 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Dog.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Dog.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import apimodels.Animal; @@ -67,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java index 5aec904bbaa..5dcd57ff885 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumArrays.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import java.util.ArrayList; @@ -105,7 +118,7 @@ public EnumArrays arrayEnum(List arrayEnum) { public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { if (arrayEnum == null) { - arrayEnum = new ArrayList(); + arrayEnum = new ArrayList<>(); } arrayEnum.add(arrayEnumItem); return this; @@ -159,9 +172,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumClass.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumClass.java index c0f2b0ad97e..1b2f6d0c810 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumClass.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumClass.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumTest.java index 8b202da4f10..83e03dbb153 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumTest.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/EnumTest.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import apimodels.OuterEnum; @@ -228,9 +241,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/FormatTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/FormatTest.java index 5e70176abc7..b1e95ebb59c 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/FormatTest.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/FormatTest.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import java.math.BigDecimal; @@ -364,9 +377,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/HasOnlyReadOnly.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/HasOnlyReadOnly.java index 17d09b40692..c8914ddc992 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/HasOnlyReadOnly.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/HasOnlyReadOnly.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java index 80b7e64410f..d08b29ec07b 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MapTest.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import java.util.HashMap; @@ -58,7 +71,7 @@ public MapTest mapMapOfString(Map> mapMapOfString) { public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { if (this.mapMapOfString == null) { - this.mapMapOfString = new HashMap>(); + this.mapMapOfString = new HashMap<>(); } this.mapMapOfString.put(key, mapMapOfStringItem); return this; @@ -84,7 +97,7 @@ public MapTest mapOfEnumString(Map mapOfEnumString) { public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { if (this.mapOfEnumString == null) { - this.mapOfEnumString = new HashMap(); + this.mapOfEnumString = new HashMap<>(); } this.mapOfEnumString.put(key, mapOfEnumStringItem); return this; @@ -138,9 +151,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MixedPropertiesAndAdditionalPropertiesClass.java index 0706c0eb6f6..725c559f087 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import apimodels.Animal; @@ -69,7 +82,7 @@ public MixedPropertiesAndAdditionalPropertiesClass map(Map map) public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { if (this.map == null) { - this.map = new HashMap(); + this.map = new HashMap<>(); } this.map.put(key, mapItem); return this; @@ -126,9 +139,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Model200Response.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Model200Response.java index 1e0db95e010..f0d88429972 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Model200Response.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Model200Response.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelApiResponse.java index a5505482e08..05e49aa7c33 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; @@ -109,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelReturn.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelReturn.java index 89d3a0e25ff..e933db2b154 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelReturn.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ModelReturn.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; @@ -65,9 +78,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Name.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Name.java index b17faa3cc5c..e5d513652a9 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Name.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Name.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; @@ -132,9 +145,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/NumberOnly.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/NumberOnly.java index a54fece6268..4656b12732c 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/NumberOnly.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/NumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import java.math.BigDecimal; @@ -67,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Order.java index 50990892750..67ce6f4075e 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Order.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import java.time.OffsetDateTime; @@ -210,9 +223,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/OuterComposite.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/OuterComposite.java index 92a8ca4c95a..77d0d2aa7dc 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/OuterComposite.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/OuterComposite.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import java.math.BigDecimal; @@ -111,9 +124,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/OuterEnum.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/OuterEnum.java index f5026996917..2769afb664b 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/OuterEnum.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/OuterEnum.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Pet.java index faa93cbc881..24cc57fd9f2 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Pet.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import apimodels.Category; @@ -25,7 +38,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList(); + private List photoUrls = new ArrayList<>(); @JsonProperty("tags") private List tags = null; @@ -149,7 +162,7 @@ public Pet tags(List tags) { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList(); + tags = new ArrayList<>(); } tags.add(tagsItem); return this; @@ -229,9 +242,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ReadOnlyFirst.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ReadOnlyFirst.java index 693aa7eba34..9211de458d5 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ReadOnlyFirst.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/ReadOnlyFirst.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/SpecialModelName.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/SpecialModelName.java index ff398610850..b9d508faa73 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/SpecialModelName.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/SpecialModelName.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; @@ -65,9 +78,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Tag.java index 5426c883569..64b376dc35d 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/Tag.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/User.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/User.java index 0308cc92681..ac09f5a63ad 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/apimodels/User.java @@ -1,3 +1,16 @@ +/* + * 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 apimodels; import com.fasterxml.jackson.annotation.*; @@ -207,7 +220,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -219,9 +232,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes b/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes index 6a342645b5d..098144c43e0 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes +++ b/samples/server/petstore/java-play-framework-fake-endpoints/conf/routes @@ -2,51 +2,51 @@ # This file defines all application routes (Higher priority routes first) # ~~~~ -GET /api controllers.ApiDocController.api - - -#Functions for AnotherFake API -PATCH /v2/another-fake/dummy controllers.AnotherFakeApiController.testSpecialTags() - -#Functions for Fake API -POST /v2/fake/outer/boolean controllers.FakeApiController.fakeOuterBooleanSerialize() -POST /v2/fake/outer/composite controllers.FakeApiController.fakeOuterCompositeSerialize() -POST /v2/fake/outer/number controllers.FakeApiController.fakeOuterNumberSerialize() -POST /v2/fake/outer/string controllers.FakeApiController.fakeOuterStringSerialize() -PATCH /v2/fake controllers.FakeApiController.testClientModel() -POST /v2/fake controllers.FakeApiController.testEndpointParameters() -GET /v2/fake controllers.FakeApiController.testEnumParameters() -POST /v2/fake/inline-additionalProperties controllers.FakeApiController.testInlineAdditionalProperties() -GET /v2/fake/jsonFormData controllers.FakeApiController.testJsonFormData() - -#Functions for FakeClassnameTags123 API -PATCH /v2/fake_classname_test controllers.FakeClassnameTags123ApiController.testClassname() - -#Functions for Pet API -POST /v2/pet controllers.PetApiController.addPet() -DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long) -GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus() -GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags() -GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long) -PUT /v2/pet controllers.PetApiController.updatePet() -POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long) -POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long) - -#Functions for Store API -DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String) -GET /v2/store/inventory controllers.StoreApiController.getInventory() -GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long) -POST /v2/store/order controllers.StoreApiController.placeOrder() - -#Functions for User API -POST /v2/user controllers.UserApiController.createUser() -POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput() -POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput() -DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String) -GET /v2/user/:username controllers.UserApiController.getUserByName(username: String) -GET /v2/user/login controllers.UserApiController.loginUser() -GET /v2/user/logout controllers.UserApiController.logoutUser() -PUT /v2/user/:username controllers.UserApiController.updateUser(username: String) + GET /api controllers.ApiDocController.api + + + #Functions for AnotherFake API + PATCH /v2/another-fake/dummy controllers.AnotherFakeApiController.testSpecialTags() + + #Functions for Fake API + POST /v2/fake/outer/boolean controllers.FakeApiController.fakeOuterBooleanSerialize() + POST /v2/fake/outer/composite controllers.FakeApiController.fakeOuterCompositeSerialize() + POST /v2/fake/outer/number controllers.FakeApiController.fakeOuterNumberSerialize() + POST /v2/fake/outer/string controllers.FakeApiController.fakeOuterStringSerialize() + PATCH /v2/fake controllers.FakeApiController.testClientModel() + POST /v2/fake controllers.FakeApiController.testEndpointParameters() + GET /v2/fake controllers.FakeApiController.testEnumParameters() + POST /v2/fake/inline-additionalProperties controllers.FakeApiController.testInlineAdditionalProperties() + GET /v2/fake/jsonFormData controllers.FakeApiController.testJsonFormData() + + #Functions for FakeClassnameTags123 API + PATCH /v2/fake_classname_test controllers.FakeClassnameTags123ApiController.testClassname() + + #Functions for Pet API + POST /v2/pet controllers.PetApiController.addPet() + DELETE /v2/pet/:petId controllers.PetApiController.deletePet(petId: Long) + GET /v2/pet/findByStatus controllers.PetApiController.findPetsByStatus() + GET /v2/pet/findByTags controllers.PetApiController.findPetsByTags() + GET /v2/pet/:petId controllers.PetApiController.getPetById(petId: Long) + PUT /v2/pet controllers.PetApiController.updatePet() + POST /v2/pet/:petId controllers.PetApiController.updatePetWithForm(petId: Long) + POST /v2/pet/:petId/uploadImage controllers.PetApiController.uploadFile(petId: Long) + + #Functions for Store API + DELETE /v2/store/order/:orderId controllers.StoreApiController.deleteOrder(orderId: String) + GET /v2/store/inventory controllers.StoreApiController.getInventory() + GET /v2/store/order/:orderId controllers.StoreApiController.getOrderById(orderId: Long) + POST /v2/store/order controllers.StoreApiController.placeOrder() + + #Functions for User API + POST /v2/user controllers.UserApiController.createUser() + POST /v2/user/createWithArray controllers.UserApiController.createUsersWithArrayInput() + POST /v2/user/createWithList controllers.UserApiController.createUsersWithListInput() + DELETE /v2/user/:username controllers.UserApiController.deleteUser(username: String) + GET /v2/user/:username controllers.UserApiController.getUserByName(username: String) + GET /v2/user/login controllers.UserApiController.loginUser() + GET /v2/user/logout controllers.UserApiController.logoutUser() + PUT /v2/user/:username controllers.UserApiController.updateUser(username: String) # Map static resources from the /public folder to the /assets URL path GET /assets/*file controllers.Assets.at(file) diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/swagger.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/swagger.json index c751b91726d..16be74feb74 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/swagger.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/swagger.json @@ -1,1839 +1,1829 @@ -{ - "swagger" : "2.0", - "info" : { - "description" : "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\", - "version" : "1.0.0", - "title" : "Swagger Petstore", - "termsOfService" : "http://swagger.io/terms/", - "contact" : { - "email" : "apiteam@swagger.io" - }, - "license" : { - "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "host" : "petstore.swagger.io:80", - "basePath" : "/v2", - "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets", - "externalDocs" : { - "description" : "Find out more", - "url" : "http://swagger.io" - } - }, { - "name" : "store", - "description" : "Access to Petstore orders" - }, { - "name" : "user", - "description" : "Operations about user", - "externalDocs" : { - "description" : "Find out more about our store", - "url" : "http://swagger.io" - } - } ], - "schemes" : [ "http" ], - "paths" : { - "/pet" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "description" : "", - "operationId" : "addPet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "description" : "", - "operationId" : "updatePet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByStatus" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "status", - "in" : "query", - "description" : "Status values that need to be considered for filter", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByTags" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "tags", - "in" : "query", - "description" : "Tags to filter by", - "required" : true, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "deprecated" : true, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", - "description" : "Returns a single pet", - "operationId" : "getPetById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to return", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Pet" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", - "description" : "", - "operationId" : "updatePetWithForm", - "consumes" : [ "application/x-www-form-urlencoded" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet that needs to be updated", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "name", - "in" : "formData", - "description" : "Updated name of the pet", - "required" : false, - "type" : "string" - }, { - "name" : "status", - "in" : "formData", - "description" : "Updated status of the pet", - "required" : false, - "type" : "string" - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/x-www-form-urlencoded", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "description" : "", - "operationId" : "deletePet", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "required" : false, - "type" : "string" - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", - "description" : "", - "operationId" : "uploadFile", - "consumes" : [ "multipart/form-data" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to update", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "additionalMetadata", - "in" : "formData", - "description" : "Additional data to pass to server", - "required" : false, - "type" : "string" - }, { - "name" : "file", - "in" : "formData", - "description" : "file to upload", - "required" : false, - "type" : "file" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/ApiResponse" - } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "multipart/form-data", - "x-accepts" : "application/json" - } - }, - "/store/inventory" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "produces" : [ "application/json" ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } - } - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order" : { - "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", - "description" : "", - "operationId" : "placeOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "order placed for purchasing the pet", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Order" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid Order" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order/{order_id}" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "order_id", - "in" : "path", - "description" : "ID of pet that needs to be fetched", - "required" : true, - "type" : "integer", - "maximum" : 5, - "minimum" : 1, - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "order_id", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Create user", - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Created user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithArray" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithArrayInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithList" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithListInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/login" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", - "description" : "", - "operationId" : "loginUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "query", - "description" : "The user name for login", - "required" : true, - "type" : "string" - }, { - "name" : "password", - "in" : "query", - "description" : "The password for login in clear text", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "string" - }, - "headers" : { - "X-Rate-Limit" : { - "type" : "integer", - "format" : "int32", - "description" : "calls per hour allowed by the user" - }, - "X-Expires-After" : { - "type" : "string", - "format" : "date-time", - "description" : "date in UTC when toekn expires" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/logout" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", - "description" : "", - "operationId" : "logoutUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/{username}" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", - "description" : "", - "operationId" : "getUserByName", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be fetched. Use user1 for testing. ", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/User" - } - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "name that need to be deleted", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Updated user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/fake_classname_test" : { - "patch" : { - "tags" : [ "fake_classname_tags 123#$%^" ], - "summary" : "To test class name in snake case", - "operationId" : "testClassname", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "client model", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Client" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Client" - } - } - }, - "security" : [ { - "api_key_query" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/fake" : { - "get" : { - "tags" : [ "fake" ], - "summary" : "To test enum parameters", - "description" : "To test enum parameters", - "operationId" : "testEnumParameters", - "consumes" : [ "*/*" ], - "produces" : [ "*/*" ], - "parameters" : [ { - "name" : "enum_form_string_array", - "in" : "formData", - "description" : "Form parameter enum test (string array)", - "required" : false, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" - } - }, { - "name" : "enum_form_string", - "in" : "formData", - "description" : "Form parameter enum test (string)", - "required" : false, - "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] - }, { - "name" : "enum_header_string_array", - "in" : "header", - "description" : "Header parameter enum test (string array)", - "required" : false, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" - } - }, { - "name" : "enum_header_string", - "in" : "header", - "description" : "Header parameter enum test (string)", - "required" : false, - "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] - }, { - "name" : "enum_query_string_array", - "in" : "query", - "description" : "Query parameter enum test (string array)", - "required" : false, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" - } - }, { - "name" : "enum_query_string", - "in" : "query", - "description" : "Query parameter enum test (string)", - "required" : false, - "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] - }, { - "name" : "enum_query_integer", - "in" : "query", - "description" : "Query parameter enum test (double)", - "required" : false, - "type" : "integer", - "format" : "int32", - "enum" : [ 1, -2 ] - }, { - "name" : "enum_query_double", - "in" : "formData", - "description" : "Query parameter enum test (double)", - "required" : false, - "type" : "number", - "format" : "double", - "enum" : [ 1.1, -1.2 ] - } ], - "responses" : { - "400" : { - "description" : "Invalid request" - }, - "404" : { - "description" : "Not found" - } - }, - "x-contentType" : "*/*", - "x-accepts" : "*/*" - }, - "post" : { - "tags" : [ "fake" ], - "summary" : "Fake endpoint for testing various parameters\n假端點\n偽のエンドポイント\n가짜 엔드 포인트\n", - "description" : "Fake endpoint for testing various parameters\n假端點\n偽のエンドポイント\n가짜 엔드 포인트\n", - "operationId" : "testEndpointParameters", - "consumes" : [ "application/xml; charset=utf-8", "application/json; charset=utf-8" ], - "produces" : [ "application/xml; charset=utf-8", "application/json; charset=utf-8" ], - "parameters" : [ { - "name" : "integer", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "integer", - "maximum" : 100, - "minimum" : 10 - }, { - "name" : "int32", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "integer", - "maximum" : 200, - "minimum" : 20, - "format" : "int32" - }, { - "name" : "int64", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "integer", - "format" : "int64" - }, { - "name" : "number", - "in" : "formData", - "description" : "None", - "required" : true, - "type" : "number", - "maximum" : 543.2, - "minimum" : 32.1 - }, { - "name" : "float", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "number", - "maximum" : 987.6, - "format" : "float" - }, { - "name" : "double", - "in" : "formData", - "description" : "None", - "required" : true, - "type" : "number", - "maximum" : 123.4, - "minimum" : 67.8, - "format" : "double" - }, { - "name" : "string", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "pattern" : "/[a-z]/i" - }, { - "name" : "pattern_without_delimiter", - "in" : "formData", - "description" : "None", - "required" : true, - "type" : "string", - "pattern" : "^[A-Z].*" - }, { - "name" : "byte", - "in" : "formData", - "description" : "None", - "required" : true, - "type" : "string", - "format" : "byte" - }, { - "name" : "binary", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "format" : "binary" - }, { - "name" : "date", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "format" : "date" - }, { - "name" : "dateTime", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "format" : "date-time" - }, { - "name" : "password", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "maxLength" : 64, - "minLength" : 10, - "format" : "password" - }, { - "name" : "callback", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "security" : [ { - "http_basic_test" : [ ] - } ], - "x-contentType" : "application/xml; charset=utf-8", - "x-accepts" : "application/xml; charset=utf-8,application/json; charset=utf-8" - }, - "patch" : { - "tags" : [ "fake" ], - "summary" : "To test \"client\" model", - "description" : "To test \"client\" model", - "operationId" : "testClientModel", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "client model", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Client" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Client" - } - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/fake/outer/number" : { - "post" : { - "tags" : [ "fake" ], - "description" : "Test serialization of outer number types", - "operationId" : "fakeOuterNumberSerialize", - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Input number as post body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/OuterNumber" - } - } ], - "responses" : { - "200" : { - "description" : "Output number", - "schema" : { - "$ref" : "#/definitions/OuterNumber" - } - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json", - "missingReturnInfoIfNeeded" : "1.0" - } - }, - "/fake/outer/string" : { - "post" : { - "tags" : [ "fake" ], - "description" : "Test serialization of outer string types", - "operationId" : "fakeOuterStringSerialize", - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Input string as post body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/OuterString" - } - } ], - "responses" : { - "200" : { - "description" : "Output string", - "schema" : { - "$ref" : "#/definitions/OuterString" - } - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/fake/outer/boolean" : { - "post" : { - "tags" : [ "fake" ], - "description" : "Test serialization of outer boolean types", - "operationId" : "fakeOuterBooleanSerialize", - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Input boolean as post body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/OuterBoolean" - } - } ], - "responses" : { - "200" : { - "description" : "Output boolean", - "schema" : { - "$ref" : "#/definitions/OuterBoolean" - } - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json", - "missingReturnInfoIfNeeded" : "true" - } - }, - "/fake/outer/composite" : { - "post" : { - "tags" : [ "fake" ], - "description" : "Test serialization of object with outer number type", - "operationId" : "fakeOuterCompositeSerialize", - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Input composite as post body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/OuterComposite" - } - } ], - "responses" : { - "200" : { - "description" : "Output composite", - "schema" : { - "$ref" : "#/definitions/OuterComposite" - } - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/fake/jsonFormData" : { - "get" : { - "tags" : [ "fake" ], - "summary" : "test json serialization of form data", - "description" : "", - "operationId" : "testJsonFormData", - "consumes" : [ "application/json" ], - "parameters" : [ { - "name" : "param", - "in" : "formData", - "description" : "field1", - "required" : true, - "type" : "string" - }, { - "name" : "param2", - "in" : "formData", - "description" : "field2", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/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" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/another-fake/dummy" : { - "patch" : { - "tags" : [ "$another-fake?" ], - "summary" : "To test special tags", - "description" : "To test special tags", - "operationId" : "test_special_tags", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "client model", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Client" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Client" - } - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - } - }, - "securityDefinitions" : { - "petstore_auth" : { - "type" : "oauth2", - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "flow" : "implicit", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - }, - "api_key" : { - "type" : "apiKey", - "name" : "api_key", - "in" : "header" - }, - "api_key_query" : { - "type" : "apiKey", - "name" : "api_key_query", - "in" : "query" - }, - "http_basic_test" : { - "type" : "basic" - } - }, - "definitions" : { - "Order" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "petId" : { - "type" : "integer", - "format" : "int64" - }, - "quantity" : { - "type" : "integer", - "format" : "int32" - }, - "shipDate" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] - }, - "complete" : { - "type" : "boolean", - "default" : false - } - }, - "example" : { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" - }, - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "example" : { - "name" : "name", - "id" : 6 - }, - "xml" : { - "name" : "Category" - } - }, - "User" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64", - "x-is-unique" : true - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "type" : "integer", - "format" : "int32", - "description" : "User Status" - } - }, - "example" : { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" - }, - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "example" : { - "name" : "name", - "id" : 1 - }, - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "type" : "object", - "required" : [ "name", "photoUrls" ], - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64", - "x-is-unique" : true - }, - "category" : { - "$ref" : "#/definitions/Category" - }, - "name" : { - "type" : "string", - "example" : "doggie" - }, - "photoUrls" : { - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - }, - "items" : { - "type" : "string" - } - }, - "tags" : { - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - }, - "items" : { - "$ref" : "#/definitions/Tag" - } - }, - "status" : { - "type" : "string", - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] - } - }, - "example" : { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" - }, - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "integer", - "format" : "int32" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - } - }, - "$special[model.name]" : { - "properties" : { - "$special[property.name]" : { - "type" : "integer", - "format" : "int64" - } - }, - "xml" : { - "name" : "$special[model.name]" - } - }, - "Return" : { - "properties" : { - "return" : { - "type" : "integer", - "format" : "int32" - } - }, - "description" : "Model for testing reserved words", - "xml" : { - "name" : "Return" - } - }, - "Name" : { - "required" : [ "name" ], - "properties" : { - "name" : { - "type" : "integer", - "format" : "int32" - }, - "snake_case" : { - "type" : "integer", - "format" : "int32", - "readOnly" : true - }, - "property" : { - "type" : "string" - }, - "123Number" : { - "type" : "integer", - "readOnly" : true - } - }, - "description" : "Model for testing model name same as property name", - "xml" : { - "name" : "Name" - } - }, - "200_response" : { - "properties" : { - "name" : { - "type" : "integer", - "format" : "int32" - }, - "class" : { - "type" : "string" - } - }, - "description" : "Model for testing model name starting with number", - "xml" : { - "name" : "Name" - } - }, - "ClassModel" : { - "properties" : { - "_class" : { - "type" : "string" - } - }, - "description" : "Model for testing model with \"_class\" property" - }, - "Dog" : { - "allOf" : [ { - "$ref" : "#/definitions/Animal" - }, { - "type" : "object", - "properties" : { - "breed" : { - "type" : "string" - } - } - } ] - }, - "Cat" : { - "allOf" : [ { - "$ref" : "#/definitions/Animal" - }, { - "type" : "object", - "properties" : { - "declawed" : { - "type" : "boolean" - } - } - } ] - }, - "Animal" : { - "type" : "object", - "required" : [ "className" ], - "discriminator" : "className", - "properties" : { - "className" : { - "type" : "string" - }, - "color" : { - "type" : "string", - "default" : "red" - } - } - }, - "AnimalFarm" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Animal" - } - }, - "format_test" : { - "type" : "object", - "required" : [ "byte", "date", "number", "password" ], - "properties" : { - "integer" : { - "type" : "integer", - "minimum" : 10, - "maximum" : 100 - }, - "int32" : { - "type" : "integer", - "format" : "int32", - "minimum" : 20, - "maximum" : 200 - }, - "int64" : { - "type" : "integer", - "format" : "int64" - }, - "number" : { - "type" : "number", - "minimum" : 32.1, - "maximum" : 543.2 - }, - "float" : { - "type" : "number", - "format" : "float", - "minimum" : 54.3, - "maximum" : 987.6 - }, - "double" : { - "type" : "number", - "format" : "double", - "minimum" : 67.8, - "maximum" : 123.4 - }, - "string" : { - "type" : "string", - "pattern" : "/[a-z]/i" - }, - "byte" : { - "type" : "string", - "format" : "byte", - "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - }, - "binary" : { - "type" : "string", - "format" : "binary" - }, - "date" : { - "type" : "string", - "format" : "date" - }, - "dateTime" : { - "type" : "string", - "format" : "date-time" - }, - "uuid" : { - "type" : "string", - "format" : "uuid" - }, - "password" : { - "type" : "string", - "format" : "password", - "minLength" : 10, - "maxLength" : 64 - } - } - }, - "EnumClass" : { - "type" : "string", - "enum" : [ "_abc", "-efg", "(xyz)" ], - "default" : "-efg" - }, - "Enum_Test" : { - "type" : "object", - "properties" : { - "enum_string" : { - "type" : "string", - "enum" : [ "UPPER", "lower", "" ] - }, - "enum_integer" : { - "type" : "integer", - "format" : "int32", - "enum" : [ 1, -1 ] - }, - "enum_number" : { - "type" : "number", - "format" : "double", - "enum" : [ 1.1, -1.2 ] - }, - "outerEnum" : { - "$ref" : "#/definitions/OuterEnum" - } - } - }, - "AdditionalPropertiesClass" : { - "type" : "object", - "properties" : { - "map_property" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - }, - "map_of_map_property" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - } - } - } - }, - "MixedPropertiesAndAdditionalPropertiesClass" : { - "type" : "object", - "properties" : { - "uuid" : { - "type" : "string", - "format" : "uuid" - }, - "dateTime" : { - "type" : "string", - "format" : "date-time" - }, - "map" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/Animal" - } - } - } - }, - "List" : { - "type" : "object", - "properties" : { - "123-list" : { - "type" : "string" - } - } - }, - "Client" : { - "type" : "object", - "properties" : { - "client" : { - "type" : "string" - } - }, - "example" : { - "client" : "client" - } - }, - "ReadOnlyFirst" : { - "type" : "object", - "properties" : { - "bar" : { - "type" : "string", - "readOnly" : true - }, - "baz" : { - "type" : "string" - } - } - }, - "hasOnlyReadOnly" : { - "type" : "object", - "properties" : { - "bar" : { - "type" : "string", - "readOnly" : true - }, - "foo" : { - "type" : "string", - "readOnly" : true - } - } - }, - "Capitalization" : { - "type" : "object", - "properties" : { - "smallCamel" : { - "type" : "string" - }, - "CapitalCamel" : { - "type" : "string" - }, - "small_Snake" : { - "type" : "string" - }, - "Capital_Snake" : { - "type" : "string" - }, - "SCA_ETH_Flow_Points" : { - "type" : "string" - }, - "ATT_NAME" : { - "type" : "string", - "description" : "Name of the pet\n" - } - } - }, - "MapTest" : { - "type" : "object", - "properties" : { - "map_map_of_string" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - } - }, - "map_of_enum_string" : { - "type" : "object", - "additionalProperties" : { - "type" : "string", - "enum" : [ "UPPER", "lower" ] - } - } - } - }, - "ArrayTest" : { - "type" : "object", - "properties" : { - "array_of_string" : { - "type" : "array", - "items" : { - "type" : "string" - } - }, - "array_array_of_integer" : { - "type" : "array", - "items" : { - "type" : "array", - "items" : { - "type" : "integer", - "format" : "int64" - } - } - }, - "array_array_of_model" : { - "type" : "array", - "items" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReadOnlyFirst" - } - } - } - } - }, - "NumberOnly" : { - "type" : "object", - "properties" : { - "JustNumber" : { - "type" : "number" - } - } - }, - "ArrayOfNumberOnly" : { - "type" : "object", - "properties" : { - "ArrayNumber" : { - "type" : "array", - "items" : { - "type" : "number" - } - } - } - }, - "ArrayOfArrayOfNumberOnly" : { - "type" : "object", - "properties" : { - "ArrayArrayNumber" : { - "type" : "array", - "items" : { - "type" : "array", - "items" : { - "type" : "number" - } - } - } - } - }, - "EnumArrays" : { - "type" : "object", - "properties" : { - "just_symbol" : { - "type" : "string", - "enum" : [ ">=", "$" ] - }, - "array_enum" : { - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "fish", "crab" ] - } - } - } - }, - "OuterEnum" : { - "type" : "string", - "enum" : [ "placed", "approved", "delivered" ] - }, - "OuterComposite" : { - "type" : "object", - "properties" : { - "my_number" : { - "$ref" : "#/definitions/OuterNumber" - }, - "my_string" : { - "$ref" : "#/definitions/OuterString" - }, - "my_boolean" : { - "$ref" : "#/definitions/OuterBoolean" - } - }, - "example" : { - "my_string" : { }, - "my_number" : { }, - "my_boolean" : { } - } - }, - "OuterNumber" : { - "type" : "number" - }, - "OuterString" : { - "type" : "string" - }, - "OuterBoolean" : { - "type" : "boolean" - } - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - } +{ + "swagger" : "2.0", + "info" : { + "description" : "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\", + "version" : "1.0.0", + "title" : "Swagger Petstore", + "termsOfService" : "http://swagger.io/terms/", + "contact" : { + "email" : "apiteam@swagger.io" + }, + "license" : { + "name" : "Apache-2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "host" : "petstore.swagger.io:80", + "basePath" : "/v2", + "tags" : [ { + "name" : "pet", + "description" : "Everything about your Pets", + "externalDocs" : { + "description" : "Find out more", + "url" : "http://swagger.io" + } + }, { + "name" : "store", + "description" : "Access to Petstore orders" + }, { + "name" : "user", + "description" : "Operations about user", + "externalDocs" : { + "description" : "Find out more about our store", + "url" : "http://swagger.io" + } + } ], + "schemes" : [ "http" ], + "paths" : { + "/pet" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "Add a new pet to the store", + "description" : "", + "operationId" : "addPet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "pet" ], + "summary" : "Update an existing pet", + "description" : "", + "operationId" : "updatePet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + }, + "405" : { + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/pet/findByStatus" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by status", + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "status", + "in" : "query", + "description" : "Status values that need to be considered for filter", + "required" : true, + "type" : "array", + "items" : { + "type" : "string", + "default" : "available", + "enum" : [ "available", "pending", "sold" ] + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid status value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/findByTags" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by tags", + "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId" : "findPetsByTags", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "tags", + "in" : "query", + "description" : "Tags to filter by", + "required" : true, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid tag value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "deprecated" : true, + "x-accepts" : "application/json" + } + }, + "/pet/{petId}" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Find pet by ID", + "description" : "Returns a single pet", + "operationId" : "getPetById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to return", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Pet" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + }, + "post" : { + "tags" : [ "pet" ], + "summary" : "Updates a pet in the store with form data", + "description" : "", + "operationId" : "updatePetWithForm", + "consumes" : [ "application/x-www-form-urlencoded" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet that needs to be updated", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "name", + "in" : "formData", + "description" : "Updated name of the pet", + "required" : false, + "type" : "string" + }, { + "name" : "status", + "in" : "formData", + "description" : "Updated status of the pet", + "required" : false, + "type" : "string" + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/x-www-form-urlencoded", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "pet" ], + "summary" : "Deletes a pet", + "description" : "", + "operationId" : "deletePet", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "api_key", + "in" : "header", + "required" : false, + "type" : "string" + }, { + "name" : "petId", + "in" : "path", + "description" : "Pet id to delete", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "400" : { + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/{petId}/uploadImage" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "description" : "", + "operationId" : "uploadFile", + "consumes" : [ "multipart/form-data" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "additionalMetadata", + "in" : "formData", + "description" : "Additional data to pass to server", + "required" : false, + "type" : "string" + }, { + "name" : "file", + "in" : "formData", + "description" : "file to upload", + "required" : false, + "type" : "file" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/ApiResponse" + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "multipart/form-data", + "x-accepts" : "application/json" + } + }, + "/store/inventory" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Returns pet inventories by status", + "description" : "Returns a map of status codes to quantities", + "operationId" : "getInventory", + "produces" : [ "application/json" ], + "parameters" : [ ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int32" + } + } + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + } + }, + "/store/order" : { + "post" : { + "tags" : [ "store" ], + "summary" : "Place an order for a pet", + "description" : "", + "operationId" : "placeOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "order placed for purchasing the pet", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Order" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid Order" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/store/order/{order_id}" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Find purchase order by ID", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId" : "getOrderById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "order_id", + "in" : "path", + "description" : "ID of pet that needs to be fetched", + "required" : true, + "type" : "integer", + "maximum" : 5, + "minimum" : 1, + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "store" ], + "summary" : "Delete purchase order by ID", + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "order_id", + "in" : "path", + "description" : "ID of the order that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + } + }, + "/user" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Create user", + "description" : "This can only be done by the logged in user.", + "operationId" : "createUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Created user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithArray" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithArrayInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithList" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithListInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/login" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs user into the system", + "description" : "", + "operationId" : "loginUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "query", + "description" : "The user name for login", + "required" : true, + "type" : "string" + }, { + "name" : "password", + "in" : "query", + "description" : "The password for login in clear text", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "string" + }, + "headers" : { + "X-Rate-Limit" : { + "type" : "integer", + "format" : "int32", + "description" : "calls per hour allowed by the user" + }, + "X-Expires-After" : { + "type" : "string", + "format" : "date-time", + "description" : "date in UTC when toekn expires" + } + } + }, + "400" : { + "description" : "Invalid username/password supplied" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/logout" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs out current logged in user session", + "description" : "", + "operationId" : "logoutUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/{username}" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Get user by user name", + "description" : "", + "operationId" : "getUserByName", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be fetched. Use user1 for testing. ", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/User" + } + }, + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "user" ], + "summary" : "Updated user", + "description" : "This can only be done by the logged in user.", + "operationId" : "updateUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "name that need to be deleted", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Updated user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid user supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "user" ], + "summary" : "Delete user", + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + } + }, + "/fake_classname_test" : { + "patch" : { + "tags" : [ "fake_classname_tags 123#$%^" ], + "summary" : "To test class name in snake case", + "operationId" : "testClassname", + "consumes" : [ "application/json" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "client model", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Client" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Client" + } + } + }, + "security" : [ { + "api_key_query" : [ ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/fake" : { + "get" : { + "tags" : [ "fake" ], + "summary" : "To test enum parameters", + "description" : "To test enum parameters", + "operationId" : "testEnumParameters", + "consumes" : [ "*/*" ], + "produces" : [ "*/*" ], + "parameters" : [ { + "name" : "enum_form_string_array", + "in" : "formData", + "description" : "Form parameter enum test (string array)", + "required" : false, + "type" : "array", + "items" : { + "type" : "string", + "default" : "$", + "enum" : [ ">", "$" ] + } + }, { + "name" : "enum_form_string", + "in" : "formData", + "description" : "Form parameter enum test (string)", + "required" : false, + "type" : "string", + "default" : "-efg", + "enum" : [ "_abc", "-efg", "(xyz)" ] + }, { + "name" : "enum_header_string_array", + "in" : "header", + "description" : "Header parameter enum test (string array)", + "required" : false, + "type" : "array", + "items" : { + "type" : "string", + "default" : "$", + "enum" : [ ">", "$" ] + } + }, { + "name" : "enum_header_string", + "in" : "header", + "description" : "Header parameter enum test (string)", + "required" : false, + "type" : "string", + "default" : "-efg", + "enum" : [ "_abc", "-efg", "(xyz)" ] + }, { + "name" : "enum_query_string_array", + "in" : "query", + "description" : "Query parameter enum test (string array)", + "required" : false, + "type" : "array", + "items" : { + "type" : "string", + "default" : "$", + "enum" : [ ">", "$" ] + } + }, { + "name" : "enum_query_string", + "in" : "query", + "description" : "Query parameter enum test (string)", + "required" : false, + "type" : "string", + "default" : "-efg", + "enum" : [ "_abc", "-efg", "(xyz)" ] + }, { + "name" : "enum_query_integer", + "in" : "query", + "description" : "Query parameter enum test (double)", + "required" : false, + "type" : "integer", + "format" : "int32", + "enum" : [ 1, -2 ] + }, { + "name" : "enum_query_double", + "in" : "formData", + "description" : "Query parameter enum test (double)", + "required" : false, + "type" : "number", + "format" : "double", + "enum" : [ 1.1, -1.2 ] + } ], + "responses" : { + "400" : { + "description" : "Invalid request" + }, + "404" : { + "description" : "Not found" + } + }, + "x-contentType" : "*/*", + "x-accepts" : "*/*" + }, + "post" : { + "tags" : [ "fake" ], + "summary" : "Fake endpoint for testing various parameters\n假端點\n偽のエンドポイント\n가짜 엔드 포인트\n", + "description" : "Fake endpoint for testing various parameters\n假端點\n偽のエンドポイント\n가짜 엔드 포인트\n", + "operationId" : "testEndpointParameters", + "consumes" : [ "application/xml; charset=utf-8", "application/json; charset=utf-8" ], + "produces" : [ "application/xml; charset=utf-8", "application/json; charset=utf-8" ], + "parameters" : [ { + "name" : "integer", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "integer", + "maximum" : 100, + "minimum" : 10 + }, { + "name" : "int32", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "integer", + "maximum" : 200, + "minimum" : 20, + "format" : "int32" + }, { + "name" : "int64", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "integer", + "format" : "int64" + }, { + "name" : "number", + "in" : "formData", + "description" : "None", + "required" : true, + "type" : "number", + "maximum" : 543.2, + "minimum" : 32.1 + }, { + "name" : "float", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "number", + "maximum" : 987.6, + "format" : "float" + }, { + "name" : "double", + "in" : "formData", + "description" : "None", + "required" : true, + "type" : "number", + "maximum" : 123.4, + "minimum" : 67.8, + "format" : "double" + }, { + "name" : "string", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "pattern" : "/[a-z]/i" + }, { + "name" : "pattern_without_delimiter", + "in" : "formData", + "description" : "None", + "required" : true, + "type" : "string", + "pattern" : "^[A-Z].*" + }, { + "name" : "byte", + "in" : "formData", + "description" : "None", + "required" : true, + "type" : "string", + "format" : "byte" + }, { + "name" : "binary", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "format" : "binary" + }, { + "name" : "date", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "format" : "date" + }, { + "name" : "dateTime", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "format" : "date-time" + }, { + "name" : "password", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "maxLength" : 64, + "minLength" : 10, + "format" : "password" + }, { + "name" : "callback", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "security" : [ { + "http_basic_test" : [ ] + } ], + "x-contentType" : "application/xml; charset=utf-8", + "x-accepts" : "application/xml; charset=utf-8,application/json; charset=utf-8" + }, + "patch" : { + "tags" : [ "fake" ], + "summary" : "To test \"client\" model", + "description" : "To test \"client\" model", + "operationId" : "testClientModel", + "consumes" : [ "application/json" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "client model", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Client" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Client" + } + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/fake/outer/number" : { + "post" : { + "tags" : [ "fake" ], + "description" : "Test serialization of outer number types", + "operationId" : "fakeOuterNumberSerialize", + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Input number as post body", + "required" : false, + "schema" : { + "$ref" : "#/definitions/OuterNumber" + } + } ], + "responses" : { + "200" : { + "description" : "Output number", + "schema" : { + "$ref" : "#/definitions/OuterNumber" + } + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json", + "missingReturnInfoIfNeeded" : "1.0" + } + }, + "/fake/outer/string" : { + "post" : { + "tags" : [ "fake" ], + "description" : "Test serialization of outer string types", + "operationId" : "fakeOuterStringSerialize", + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Input string as post body", + "required" : false, + "schema" : { + "$ref" : "#/definitions/OuterString" + } + } ], + "responses" : { + "200" : { + "description" : "Output string", + "schema" : { + "$ref" : "#/definitions/OuterString" + } + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/fake/outer/boolean" : { + "post" : { + "tags" : [ "fake" ], + "description" : "Test serialization of outer boolean types", + "operationId" : "fakeOuterBooleanSerialize", + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Input boolean as post body", + "required" : false, + "schema" : { + "$ref" : "#/definitions/OuterBoolean" + } + } ], + "responses" : { + "200" : { + "description" : "Output boolean", + "schema" : { + "$ref" : "#/definitions/OuterBoolean" + } + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json", + "missingReturnInfoIfNeeded" : "true" + } + }, + "/fake/outer/composite" : { + "post" : { + "tags" : [ "fake" ], + "description" : "Test serialization of object with outer number type", + "operationId" : "fakeOuterCompositeSerialize", + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Input composite as post body", + "required" : false, + "schema" : { + "$ref" : "#/definitions/OuterComposite" + } + } ], + "responses" : { + "200" : { + "description" : "Output composite", + "schema" : { + "$ref" : "#/definitions/OuterComposite" + } + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/fake/jsonFormData" : { + "get" : { + "tags" : [ "fake" ], + "summary" : "test json serialization of form data", + "description" : "", + "operationId" : "testJsonFormData", + "consumes" : [ "application/json" ], + "parameters" : [ { + "name" : "param", + "in" : "formData", + "description" : "field1", + "required" : true, + "type" : "string" + }, { + "name" : "param2", + "in" : "formData", + "description" : "field2", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/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" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/another-fake/dummy" : { + "patch" : { + "tags" : [ "$another-fake?" ], + "summary" : "To test special tags", + "description" : "To test special tags", + "operationId" : "test_special_tags", + "consumes" : [ "application/json" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "client model", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Client" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Client" + } + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + } + }, + "securityDefinitions" : { + "petstore_auth" : { + "type" : "oauth2", + "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", + "flow" : "implicit", + "scopes" : { + "write:pets" : "modify pets in your account", + "read:pets" : "read your pets" + } + }, + "api_key" : { + "type" : "apiKey", + "name" : "api_key", + "in" : "header" + }, + "api_key_query" : { + "type" : "apiKey", + "name" : "api_key_query", + "in" : "query" + }, + "http_basic_test" : { + "type" : "basic" + } + }, + "definitions" : { + "Order" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "petId" : { + "type" : "integer", + "format" : "int64" + }, + "quantity" : { + "type" : "integer", + "format" : "int32" + }, + "shipDate" : { + "type" : "string", + "format" : "date-time" + }, + "status" : { + "type" : "string", + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ] + }, + "complete" : { + "type" : "boolean", + "default" : false + } + }, + "example" : { + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" + }, + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "example" : { + "name" : "name", + "id" : 6 + }, + "xml" : { + "name" : "Category" + } + }, + "User" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64", + "x-is-unique" : true + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string", + "x-obfuscated" : true + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "type" : "integer", + "format" : "int32", + "description" : "User Status" + } + }, + "example" : { + "firstName" : "firstName", + "lastName" : "lastName", + "password" : "password", + "userStatus" : 6, + "phone" : "phone", + "id" : 0, + "email" : "email", + "username" : "username" + }, + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "example" : { + "name" : "name", + "id" : 1 + }, + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "type" : "object", + "required" : [ "name", "photoUrls" ], + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64", + "x-is-unique" : true + }, + "category" : { + "$ref" : "#/definitions/Category" + }, + "name" : { + "type" : "string", + "example" : "doggie" + }, + "photoUrls" : { + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + }, + "items" : { + "type" : "string" + } + }, + "tags" : { + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + }, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "status" : { + "type" : "string", + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ] + } + }, + "example" : { + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" + }, + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + }, + "example" : { + "code" : 0, + "type" : "type", + "message" : "message" + } + }, + "$special[model.name]" : { + "properties" : { + "$special[property.name]" : { + "type" : "integer", + "format" : "int64" + } + }, + "xml" : { + "name" : "$special[model.name]" + } + }, + "Return" : { + "properties" : { + "return" : { + "type" : "integer", + "format" : "int32" + } + }, + "description" : "Model for testing reserved words", + "xml" : { + "name" : "Return" + } + }, + "Name" : { + "required" : [ "name" ], + "properties" : { + "name" : { + "type" : "integer", + "format" : "int32" + }, + "snake_case" : { + "type" : "integer", + "format" : "int32", + "readOnly" : true + }, + "property" : { + "type" : "string" + }, + "123Number" : { + "type" : "integer", + "readOnly" : true + } + }, + "description" : "Model for testing model name same as property name", + "xml" : { + "name" : "Name" + } + }, + "200_response" : { + "properties" : { + "name" : { + "type" : "integer", + "format" : "int32" + }, + "class" : { + "type" : "string" + } + }, + "description" : "Model for testing model name starting with number", + "xml" : { + "name" : "Name" + } + }, + "ClassModel" : { + "properties" : { + "_class" : { + "type" : "string" + } + }, + "description" : "Model for testing model with \"_class\" property" + }, + "Dog" : { + "allOf" : [ { + "$ref" : "#/definitions/Animal" + }, { + "type" : "object", + "properties" : { + "breed" : { + "type" : "string" + } + } + } ] + }, + "Cat" : { + "allOf" : [ { + "$ref" : "#/definitions/Animal" + }, { + "type" : "object", + "properties" : { + "declawed" : { + "type" : "boolean" + } + } + } ] + }, + "Animal" : { + "type" : "object", + "required" : [ "className" ], + "discriminator" : "className", + "properties" : { + "className" : { + "type" : "string" + }, + "color" : { + "type" : "string", + "default" : "red" + } + } + }, + "AnimalFarm" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Animal" + } + }, + "format_test" : { + "type" : "object", + "required" : [ "byte", "date", "number", "password" ], + "properties" : { + "integer" : { + "type" : "integer", + "minimum" : 10, + "maximum" : 100 + }, + "int32" : { + "type" : "integer", + "format" : "int32", + "minimum" : 20, + "maximum" : 200 + }, + "int64" : { + "type" : "integer", + "format" : "int64" + }, + "number" : { + "type" : "number", + "minimum" : 32.1, + "maximum" : 543.2 + }, + "float" : { + "type" : "number", + "format" : "float", + "minimum" : 54.3, + "maximum" : 987.6 + }, + "double" : { + "type" : "number", + "format" : "double", + "minimum" : 67.8, + "maximum" : 123.4 + }, + "string" : { + "type" : "string", + "pattern" : "/[a-z]/i" + }, + "byte" : { + "type" : "string", + "format" : "byte", + "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + }, + "binary" : { + "type" : "string", + "format" : "binary" + }, + "date" : { + "type" : "string", + "format" : "date" + }, + "dateTime" : { + "type" : "string", + "format" : "date-time" + }, + "uuid" : { + "type" : "string", + "format" : "uuid" + }, + "password" : { + "type" : "string", + "format" : "password", + "minLength" : 10, + "maxLength" : 64 + } + } + }, + "EnumClass" : { + "type" : "string", + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" + }, + "Enum_Test" : { + "type" : "object", + "properties" : { + "enum_string" : { + "type" : "string", + "enum" : [ "UPPER", "lower", "" ] + }, + "enum_integer" : { + "type" : "integer", + "format" : "int32", + "enum" : [ 1, -1 ] + }, + "enum_number" : { + "type" : "number", + "format" : "double", + "enum" : [ 1.1, -1.2 ] + }, + "outerEnum" : { + "$ref" : "#/definitions/OuterEnum" + } + } + }, + "AdditionalPropertiesClass" : { + "type" : "object", + "properties" : { + "map_property" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, + "map_of_map_property" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + } + } + }, + "MixedPropertiesAndAdditionalPropertiesClass" : { + "type" : "object", + "properties" : { + "uuid" : { + "type" : "string", + "format" : "uuid" + }, + "dateTime" : { + "type" : "string", + "format" : "date-time" + }, + "map" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/Animal" + } + } + } + }, + "List" : { + "type" : "object", + "properties" : { + "123-list" : { + "type" : "string" + } + } + }, + "Client" : { + "type" : "object", + "properties" : { + "client" : { + "type" : "string" + } + }, + "example" : { + "client" : "client" + } + }, + "ReadOnlyFirst" : { + "type" : "object", + "properties" : { + "bar" : { + "type" : "string", + "readOnly" : true + }, + "baz" : { + "type" : "string" + } + } + }, + "hasOnlyReadOnly" : { + "type" : "object", + "properties" : { + "bar" : { + "type" : "string", + "readOnly" : true + }, + "foo" : { + "type" : "string", + "readOnly" : true + } + } + }, + "Capitalization" : { + "type" : "object", + "properties" : { + "smallCamel" : { + "type" : "string" + }, + "CapitalCamel" : { + "type" : "string" + }, + "small_Snake" : { + "type" : "string" + }, + "Capital_Snake" : { + "type" : "string" + }, + "SCA_ETH_Flow_Points" : { + "type" : "string" + }, + "ATT_NAME" : { + "type" : "string", + "description" : "Name of the pet\n" + } + } + }, + "MapTest" : { + "type" : "object", + "properties" : { + "map_map_of_string" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + }, + "map_of_enum_string" : { + "type" : "object", + "additionalProperties" : { + "type" : "string", + "enum" : [ "UPPER", "lower" ] + } + } + } + }, + "ArrayTest" : { + "type" : "object", + "properties" : { + "array_of_string" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "array_array_of_integer" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } + } + }, + "array_array_of_model" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/ReadOnlyFirst" + } + } + } + } + }, + "NumberOnly" : { + "type" : "object", + "properties" : { + "JustNumber" : { + "type" : "number" + } + } + }, + "ArrayOfNumberOnly" : { + "type" : "object", + "properties" : { + "ArrayNumber" : { + "type" : "array", + "items" : { + "type" : "number" + } + } + } + }, + "ArrayOfArrayOfNumberOnly" : { + "type" : "object", + "properties" : { + "ArrayArrayNumber" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "type" : "number" + } + } + } + } + }, + "EnumArrays" : { + "type" : "object", + "properties" : { + "just_symbol" : { + "type" : "string", + "enum" : [ ">=", "$" ] + }, + "array_enum" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "fish", "crab" ] + } + } + } + }, + "OuterEnum" : { + "type" : "string", + "enum" : [ "placed", "approved", "delivered" ] + }, + "OuterComposite" : { + "type" : "object", + "properties" : { + "my_number" : { + "$ref" : "#/definitions/OuterNumber" + }, + "my_string" : { + "$ref" : "#/definitions/OuterString" + }, + "my_boolean" : { + "$ref" : "#/definitions/OuterBoolean" + } + }, + "example" : { + "my_string" : { }, + "my_number" : { }, + "my_boolean" : { } + } + }, + "OuterNumber" : { + "type" : "number" + }, + "OuterString" : { + "type" : "string" + }, + "OuterBoolean" : { + "type" : "boolean" + } + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/AdditionalPropertiesClassTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..2f4ab30dc9a --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/AdditionalPropertiesClassTest.java @@ -0,0 +1,53 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/AnimalFarmTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/AnimalFarmTest.java new file mode 100644 index 00000000000..712bee81c21 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import apimodels.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/AnimalTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/AnimalTest.java new file mode 100644 index 00000000000..ba39440ade8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/AnimalTest.java @@ -0,0 +1,52 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..f122669e81e --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,53 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ArrayOfNumberOnlyTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..34d77758045 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ArrayOfNumberOnlyTest.java @@ -0,0 +1,53 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ArrayTestTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ArrayTestTest.java new file mode 100644 index 00000000000..e308ede1ba8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ArrayTestTest.java @@ -0,0 +1,53 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import apimodels.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/CapitalizationTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/CapitalizationTest.java new file mode 100644 index 00000000000..3221b8d3b8e --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/CapitalizationTest.java @@ -0,0 +1,50 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/CatTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/CatTest.java new file mode 100644 index 00000000000..768834bb8b8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/CatTest.java @@ -0,0 +1,51 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import apimodels.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/CategoryTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/CategoryTest.java new file mode 100644 index 00000000000..71f7f59e427 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/CategoryTest.java @@ -0,0 +1,50 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ClassModelTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ClassModelTest.java new file mode 100644 index 00000000000..f2c2ac2ab91 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ClassModelTest.java @@ -0,0 +1,50 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ClientTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ClientTest.java new file mode 100644 index 00000000000..8f57e7661d4 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ClientTest.java @@ -0,0 +1,50 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/DogTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/DogTest.java new file mode 100644 index 00000000000..274d55fc4c1 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/DogTest.java @@ -0,0 +1,51 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import apimodels.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/EnumArraysTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/EnumArraysTest.java new file mode 100644 index 00000000000..398f50de911 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/EnumArraysTest.java @@ -0,0 +1,52 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/EnumClassTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/EnumClassTest.java new file mode 100644 index 00000000000..f9722750a38 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/EnumClassTest.java @@ -0,0 +1,45 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/EnumTestTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/EnumTestTest.java new file mode 100644 index 00000000000..b522b56551e --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/EnumTestTest.java @@ -0,0 +1,51 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import apimodels.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/FormatTestTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/FormatTestTest.java new file mode 100644 index 00000000000..3b0b5b0c930 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/FormatTestTest.java @@ -0,0 +1,54 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/HasOnlyReadOnlyTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..5fa6df2306d --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/HasOnlyReadOnlyTest.java @@ -0,0 +1,50 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/MapTestTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/MapTestTest.java new file mode 100644 index 00000000000..b0013f4d42c --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/MapTestTest.java @@ -0,0 +1,53 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..164966dbc79 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,56 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import apimodels.Animal; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/Model200ResponseTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/Model200ResponseTest.java new file mode 100644 index 00000000000..d2466cf46bd --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/Model200ResponseTest.java @@ -0,0 +1,50 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ModelApiResponseTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ModelApiResponseTest.java new file mode 100644 index 00000000000..79d956db221 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ModelApiResponseTest.java @@ -0,0 +1,50 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ModelReturnTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ModelReturnTest.java new file mode 100644 index 00000000000..cb4392fc774 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ModelReturnTest.java @@ -0,0 +1,50 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/NameTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/NameTest.java new file mode 100644 index 00000000000..98516d6f34b --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/NameTest.java @@ -0,0 +1,50 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/NumberOnlyTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/NumberOnlyTest.java new file mode 100644 index 00000000000..42eba3449f3 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/NumberOnlyTest.java @@ -0,0 +1,51 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/OrderTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/OrderTest.java new file mode 100644 index 00000000000..1b07b44624c --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/OrderTest.java @@ -0,0 +1,51 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.time.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/OuterCompositeTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/OuterCompositeTest.java new file mode 100644 index 00000000000..a25fb2783dc --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/OuterCompositeTest.java @@ -0,0 +1,51 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/OuterEnumTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/OuterEnumTest.java new file mode 100644 index 00000000000..45c2bb84386 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/OuterEnumTest.java @@ -0,0 +1,45 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/PetTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/PetTest.java new file mode 100644 index 00000000000..328f30a8d9e --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/PetTest.java @@ -0,0 +1,54 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import apimodels.Category; +import apimodels.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ReadOnlyFirstTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..0c5b4156c65 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/ReadOnlyFirstTest.java @@ -0,0 +1,50 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/SpecialModelNameTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/SpecialModelNameTest.java new file mode 100644 index 00000000000..55935149a98 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/SpecialModelNameTest.java @@ -0,0 +1,50 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/TagTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/TagTest.java new file mode 100644 index 00000000000..9fdbe534e64 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/TagTest.java @@ -0,0 +1,50 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/UserTest.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/UserTest.java new file mode 100644 index 00000000000..2e4f1d78157 --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/UserTest.java @@ -0,0 +1,60 @@ +/* + * 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 apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/util/ModelTestUtils.java b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/util/ModelTestUtils.java new file mode 100644 index 00000000000..25f43e570ee --- /dev/null +++ b/samples/server/petstore/java-play-framework-fake-endpoints/test/apimodels/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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 apimodels.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Category.java index 44eb3a6bf7a..6346a7151dc 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -86,9 +99,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/ModelApiResponse.java index 81a2333008b..3402b6ba3f0 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -108,9 +121,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Order.java index 2290a967e4b..249963f1391 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import java.time.OffsetDateTime; @@ -208,9 +221,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Pet.java index de2facfd58f..9c6bab8136a 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import apimodels.Category; @@ -24,7 +37,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList(); + private List photoUrls = new ArrayList<>(); @JsonProperty("tags") private List tags = null; @@ -145,7 +158,7 @@ public Pet tags(List tags) { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList(); + tags = new ArrayList<>(); } tags.add(tagsItem); return this; @@ -224,9 +237,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Tag.java index 80b1d783b33..6148fa4ef11 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -86,9 +99,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/User.java b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/User.java index 221a9f30591..76851e76b80 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-no-bean-validation/app/apimodels/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -206,7 +219,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -218,9 +231,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/swagger.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/swagger.json index c54baaa89cf..325cc97e76a 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/swagger.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/swagger.json @@ -1,919 +1,909 @@ -{ - "swagger" : "2.0", - "info" : { - "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - "version" : "1.0.0", - "title" : "Swagger Petstore", - "termsOfService" : "http://swagger.io/terms/", - "contact" : { - "email" : "apiteam@swagger.io" - }, - "license" : { - "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "host" : "petstore.swagger.io", - "basePath" : "/v2", - "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets", - "externalDocs" : { - "description" : "Find out more", - "url" : "http://swagger.io" - } - }, { - "name" : "store", - "description" : "Access to Petstore orders" - }, { - "name" : "user", - "description" : "Operations about user", - "externalDocs" : { - "description" : "Find out more about our store", - "url" : "http://swagger.io" - } - } ], - "schemes" : [ "http" ], - "paths" : { - "/pet" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "description" : "", - "operationId" : "addPet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "description" : "", - "operationId" : "updatePet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByStatus" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "status", - "in" : "query", - "description" : "Status values that need to be considered for filter", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByTags" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "tags", - "in" : "query", - "description" : "Tags to filter by", - "required" : true, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "deprecated" : true, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", - "description" : "Returns a single pet", - "operationId" : "getPetById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to return", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Pet" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", - "description" : "", - "operationId" : "updatePetWithForm", - "consumes" : [ "application/x-www-form-urlencoded" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet that needs to be updated", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "name", - "in" : "formData", - "description" : "Updated name of the pet", - "required" : false, - "type" : "string" - }, { - "name" : "status", - "in" : "formData", - "description" : "Updated status of the pet", - "required" : false, - "type" : "string" - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/x-www-form-urlencoded", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "description" : "", - "operationId" : "deletePet", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "required" : false, - "type" : "string" - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", - "description" : "", - "operationId" : "uploadFile", - "consumes" : [ "multipart/form-data" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to update", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "additionalMetadata", - "in" : "formData", - "description" : "Additional data to pass to server", - "required" : false, - "type" : "string" - }, { - "name" : "file", - "in" : "formData", - "description" : "file to upload", - "required" : false, - "type" : "file" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/ApiResponse" - } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "multipart/form-data", - "x-accepts" : "application/json" - } - }, - "/store/inventory" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "produces" : [ "application/json" ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } - } - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order" : { - "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", - "description" : "", - "operationId" : "placeOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "order placed for purchasing the pet", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Order" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid Order" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order/{orderId}" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of pet that needs to be fetched", - "required" : true, - "type" : "integer", - "maximum" : 5, - "minimum" : 1, - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Create user", - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Created user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithArray" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithArrayInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithList" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithListInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/login" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", - "description" : "", - "operationId" : "loginUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "query", - "description" : "The user name for login", - "required" : true, - "type" : "string" - }, { - "name" : "password", - "in" : "query", - "description" : "The password for login in clear text", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "string" - }, - "headers" : { - "X-Rate-Limit" : { - "type" : "integer", - "format" : "int32", - "description" : "calls per hour allowed by the user" - }, - "X-Expires-After" : { - "type" : "string", - "format" : "date-time", - "description" : "date in UTC when toekn expires" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/logout" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", - "description" : "", - "operationId" : "logoutUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/{username}" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", - "description" : "", - "operationId" : "getUserByName", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be fetched. Use user1 for testing. ", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/User" - } - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "name that need to be deleted", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Updated user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - } - }, - "securityDefinitions" : { - "petstore_auth" : { - "type" : "oauth2", - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "flow" : "implicit", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - }, - "api_key" : { - "type" : "apiKey", - "name" : "api_key", - "in" : "header" - } - }, - "definitions" : { - "Order" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "petId" : { - "type" : "integer", - "format" : "int64" - }, - "quantity" : { - "type" : "integer", - "format" : "int32" - }, - "shipDate" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] - }, - "complete" : { - "type" : "boolean", - "default" : false - } - }, - "title" : "Pet Order", - "description" : "An order for a pets from the pet store", - "example" : { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" - }, - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet catehgry", - "description" : "A category for a pet", - "example" : { - "name" : "name", - "id" : 6 - }, - "xml" : { - "name" : "Category" - } - }, - "User" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "type" : "integer", - "format" : "int32", - "description" : "User Status" - } - }, - "title" : "a User", - "description" : "A User who is purchasing from the pet store", - "example" : { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" - }, - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "description" : "A tag for a pet", - "example" : { - "name" : "name", - "id" : 1 - }, - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "type" : "object", - "required" : [ "name", "photoUrls" ], - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "category" : { - "$ref" : "#/definitions/Category" - }, - "name" : { - "type" : "string", - "example" : "doggie" - }, - "photoUrls" : { - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - }, - "items" : { - "type" : "string" - } - }, - "tags" : { - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - }, - "items" : { - "$ref" : "#/definitions/Tag" - } - }, - "status" : { - "type" : "string", - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] - } - }, - "title" : "a Pet", - "description" : "A pet for sale in the pet store", - "example" : { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" - }, - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "integer", - "format" : "int32" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - } - } - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - } +{ + "swagger" : "2.0", + "info" : { + "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "version" : "1.0.0", + "title" : "Swagger Petstore", + "termsOfService" : "http://swagger.io/terms/", + "contact" : { + "email" : "apiteam@swagger.io" + }, + "license" : { + "name" : "Apache-2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "host" : "petstore.swagger.io", + "basePath" : "/v2", + "tags" : [ { + "name" : "pet", + "description" : "Everything about your Pets", + "externalDocs" : { + "description" : "Find out more", + "url" : "http://swagger.io" + } + }, { + "name" : "store", + "description" : "Access to Petstore orders" + }, { + "name" : "user", + "description" : "Operations about user", + "externalDocs" : { + "description" : "Find out more about our store", + "url" : "http://swagger.io" + } + } ], + "schemes" : [ "http" ], + "paths" : { + "/pet" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "Add a new pet to the store", + "description" : "", + "operationId" : "addPet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "pet" ], + "summary" : "Update an existing pet", + "description" : "", + "operationId" : "updatePet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + }, + "405" : { + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/pet/findByStatus" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by status", + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "status", + "in" : "query", + "description" : "Status values that need to be considered for filter", + "required" : true, + "type" : "array", + "items" : { + "type" : "string", + "default" : "available", + "enum" : [ "available", "pending", "sold" ] + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid status value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/findByTags" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by tags", + "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId" : "findPetsByTags", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "tags", + "in" : "query", + "description" : "Tags to filter by", + "required" : true, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid tag value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "deprecated" : true, + "x-accepts" : "application/json" + } + }, + "/pet/{petId}" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Find pet by ID", + "description" : "Returns a single pet", + "operationId" : "getPetById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to return", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Pet" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + }, + "post" : { + "tags" : [ "pet" ], + "summary" : "Updates a pet in the store with form data", + "description" : "", + "operationId" : "updatePetWithForm", + "consumes" : [ "application/x-www-form-urlencoded" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet that needs to be updated", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "name", + "in" : "formData", + "description" : "Updated name of the pet", + "required" : false, + "type" : "string" + }, { + "name" : "status", + "in" : "formData", + "description" : "Updated status of the pet", + "required" : false, + "type" : "string" + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/x-www-form-urlencoded", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "pet" ], + "summary" : "Deletes a pet", + "description" : "", + "operationId" : "deletePet", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "api_key", + "in" : "header", + "required" : false, + "type" : "string" + }, { + "name" : "petId", + "in" : "path", + "description" : "Pet id to delete", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "400" : { + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/{petId}/uploadImage" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "description" : "", + "operationId" : "uploadFile", + "consumes" : [ "multipart/form-data" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "additionalMetadata", + "in" : "formData", + "description" : "Additional data to pass to server", + "required" : false, + "type" : "string" + }, { + "name" : "file", + "in" : "formData", + "description" : "file to upload", + "required" : false, + "type" : "file" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/ApiResponse" + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "multipart/form-data", + "x-accepts" : "application/json" + } + }, + "/store/inventory" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Returns pet inventories by status", + "description" : "Returns a map of status codes to quantities", + "operationId" : "getInventory", + "produces" : [ "application/json" ], + "parameters" : [ ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int32" + } + } + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + } + }, + "/store/order" : { + "post" : { + "tags" : [ "store" ], + "summary" : "Place an order for a pet", + "description" : "", + "operationId" : "placeOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "order placed for purchasing the pet", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Order" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid Order" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/store/order/{orderId}" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Find purchase order by ID", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId" : "getOrderById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of pet that needs to be fetched", + "required" : true, + "type" : "integer", + "maximum" : 5, + "minimum" : 1, + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "store" ], + "summary" : "Delete purchase order by ID", + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of the order that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + } + }, + "/user" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Create user", + "description" : "This can only be done by the logged in user.", + "operationId" : "createUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Created user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithArray" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithArrayInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithList" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithListInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/login" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs user into the system", + "description" : "", + "operationId" : "loginUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "query", + "description" : "The user name for login", + "required" : true, + "type" : "string" + }, { + "name" : "password", + "in" : "query", + "description" : "The password for login in clear text", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "string" + }, + "headers" : { + "X-Rate-Limit" : { + "type" : "integer", + "format" : "int32", + "description" : "calls per hour allowed by the user" + }, + "X-Expires-After" : { + "type" : "string", + "format" : "date-time", + "description" : "date in UTC when toekn expires" + } + } + }, + "400" : { + "description" : "Invalid username/password supplied" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/logout" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs out current logged in user session", + "description" : "", + "operationId" : "logoutUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/{username}" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Get user by user name", + "description" : "", + "operationId" : "getUserByName", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be fetched. Use user1 for testing. ", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/User" + } + }, + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "user" ], + "summary" : "Updated user", + "description" : "This can only be done by the logged in user.", + "operationId" : "updateUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "name that need to be deleted", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Updated user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid user supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "user" ], + "summary" : "Delete user", + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + } + } + }, + "securityDefinitions" : { + "petstore_auth" : { + "type" : "oauth2", + "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", + "flow" : "implicit", + "scopes" : { + "write:pets" : "modify pets in your account", + "read:pets" : "read your pets" + } + }, + "api_key" : { + "type" : "apiKey", + "name" : "api_key", + "in" : "header" + } + }, + "definitions" : { + "Order" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "petId" : { + "type" : "integer", + "format" : "int64" + }, + "quantity" : { + "type" : "integer", + "format" : "int32" + }, + "shipDate" : { + "type" : "string", + "format" : "date-time" + }, + "status" : { + "type" : "string", + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ] + }, + "complete" : { + "type" : "boolean", + "default" : false + } + }, + "title" : "Pet Order", + "description" : "An order for a pets from the pet store", + "example" : { + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" + }, + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet catehgry", + "description" : "A category for a pet", + "example" : { + "name" : "name", + "id" : 6 + }, + "xml" : { + "name" : "Category" + } + }, + "User" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string", + "x-obfuscated" : true + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "type" : "integer", + "format" : "int32", + "description" : "User Status" + } + }, + "title" : "a User", + "description" : "A User who is purchasing from the pet store", + "example" : { + "firstName" : "firstName", + "lastName" : "lastName", + "password" : "password", + "userStatus" : 6, + "phone" : "phone", + "id" : 0, + "email" : "email", + "username" : "username" + }, + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet Tag", + "description" : "A tag for a pet", + "example" : { + "name" : "name", + "id" : 1 + }, + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "type" : "object", + "required" : [ "name", "photoUrls" ], + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "category" : { + "$ref" : "#/definitions/Category" + }, + "name" : { + "type" : "string", + "example" : "doggie" + }, + "photoUrls" : { + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + }, + "items" : { + "type" : "string" + } + }, + "tags" : { + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + }, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "status" : { + "type" : "string", + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ] + } + }, + "title" : "a Pet", + "description" : "A pet for sale in the pet store", + "example" : { + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" + }, + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + }, + "title" : "An uploaded response", + "description" : "Describes the result of uploading an image resource", + "example" : { + "code" : 0, + "type" : "type", + "message" : "message" + } + } + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/CategoryTest.java b/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/CategoryTest.java new file mode 100644 index 00000000000..bb84c1139bc --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/CategoryTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/ModelApiResponseTest.java b/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/ModelApiResponseTest.java new file mode 100644 index 00000000000..98b960c13f8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/ModelApiResponseTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/OrderTest.java b/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/OrderTest.java new file mode 100644 index 00000000000..45bc15e250c --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/OrderTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.time.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/PetTest.java b/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/PetTest.java new file mode 100644 index 00000000000..35eeb23ea17 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/PetTest.java @@ -0,0 +1,54 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import apimodels.Category; +import apimodels.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/TagTest.java b/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/TagTest.java new file mode 100644 index 00000000000..b1a9e90252f --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/TagTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/UserTest.java b/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/UserTest.java new file mode 100644 index 00000000000..2083dab390b --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/UserTest.java @@ -0,0 +1,60 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/util/ModelTestUtils.java b/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/util/ModelTestUtils.java new file mode 100644 index 00000000000..c60e2e23e08 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-bean-validation/test/apimodels/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package apimodels.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Category.java index 9f0206575f5..2d8c20796e8 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/ModelApiResponse.java index 07493e84825..df384d9ce70 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -109,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Order.java index cdc21f722c9..fbfc4ef7667 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import java.time.OffsetDateTime; @@ -210,9 +223,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Pet.java index fc310313180..a14b5cfe39d 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import apimodels.Category; @@ -25,7 +38,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList(); + private List photoUrls = new ArrayList<>(); @JsonProperty("tags") private List tags = null; @@ -149,7 +162,7 @@ public Pet tags(List tags) { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList(); + tags = new ArrayList<>(); } tags.add(tagsItem); return this; @@ -229,9 +242,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Tag.java index 15a8774252a..5543f1ff3d0 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/User.java b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/User.java index 689de768893..9d51b48f0a4 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-no-exception-handling/app/apimodels/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -207,7 +220,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -219,9 +232,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/public/swagger.json b/samples/server/petstore/java-play-framework-no-exception-handling/public/swagger.json index c54baaa89cf..325cc97e76a 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/public/swagger.json +++ b/samples/server/petstore/java-play-framework-no-exception-handling/public/swagger.json @@ -1,919 +1,909 @@ -{ - "swagger" : "2.0", - "info" : { - "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - "version" : "1.0.0", - "title" : "Swagger Petstore", - "termsOfService" : "http://swagger.io/terms/", - "contact" : { - "email" : "apiteam@swagger.io" - }, - "license" : { - "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "host" : "petstore.swagger.io", - "basePath" : "/v2", - "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets", - "externalDocs" : { - "description" : "Find out more", - "url" : "http://swagger.io" - } - }, { - "name" : "store", - "description" : "Access to Petstore orders" - }, { - "name" : "user", - "description" : "Operations about user", - "externalDocs" : { - "description" : "Find out more about our store", - "url" : "http://swagger.io" - } - } ], - "schemes" : [ "http" ], - "paths" : { - "/pet" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "description" : "", - "operationId" : "addPet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "description" : "", - "operationId" : "updatePet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByStatus" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "status", - "in" : "query", - "description" : "Status values that need to be considered for filter", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByTags" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "tags", - "in" : "query", - "description" : "Tags to filter by", - "required" : true, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "deprecated" : true, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", - "description" : "Returns a single pet", - "operationId" : "getPetById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to return", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Pet" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", - "description" : "", - "operationId" : "updatePetWithForm", - "consumes" : [ "application/x-www-form-urlencoded" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet that needs to be updated", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "name", - "in" : "formData", - "description" : "Updated name of the pet", - "required" : false, - "type" : "string" - }, { - "name" : "status", - "in" : "formData", - "description" : "Updated status of the pet", - "required" : false, - "type" : "string" - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/x-www-form-urlencoded", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "description" : "", - "operationId" : "deletePet", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "required" : false, - "type" : "string" - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", - "description" : "", - "operationId" : "uploadFile", - "consumes" : [ "multipart/form-data" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to update", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "additionalMetadata", - "in" : "formData", - "description" : "Additional data to pass to server", - "required" : false, - "type" : "string" - }, { - "name" : "file", - "in" : "formData", - "description" : "file to upload", - "required" : false, - "type" : "file" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/ApiResponse" - } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "multipart/form-data", - "x-accepts" : "application/json" - } - }, - "/store/inventory" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "produces" : [ "application/json" ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } - } - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order" : { - "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", - "description" : "", - "operationId" : "placeOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "order placed for purchasing the pet", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Order" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid Order" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order/{orderId}" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of pet that needs to be fetched", - "required" : true, - "type" : "integer", - "maximum" : 5, - "minimum" : 1, - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Create user", - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Created user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithArray" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithArrayInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithList" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithListInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/login" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", - "description" : "", - "operationId" : "loginUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "query", - "description" : "The user name for login", - "required" : true, - "type" : "string" - }, { - "name" : "password", - "in" : "query", - "description" : "The password for login in clear text", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "string" - }, - "headers" : { - "X-Rate-Limit" : { - "type" : "integer", - "format" : "int32", - "description" : "calls per hour allowed by the user" - }, - "X-Expires-After" : { - "type" : "string", - "format" : "date-time", - "description" : "date in UTC when toekn expires" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/logout" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", - "description" : "", - "operationId" : "logoutUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/{username}" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", - "description" : "", - "operationId" : "getUserByName", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be fetched. Use user1 for testing. ", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/User" - } - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "name that need to be deleted", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Updated user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - } - }, - "securityDefinitions" : { - "petstore_auth" : { - "type" : "oauth2", - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "flow" : "implicit", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - }, - "api_key" : { - "type" : "apiKey", - "name" : "api_key", - "in" : "header" - } - }, - "definitions" : { - "Order" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "petId" : { - "type" : "integer", - "format" : "int64" - }, - "quantity" : { - "type" : "integer", - "format" : "int32" - }, - "shipDate" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] - }, - "complete" : { - "type" : "boolean", - "default" : false - } - }, - "title" : "Pet Order", - "description" : "An order for a pets from the pet store", - "example" : { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" - }, - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet catehgry", - "description" : "A category for a pet", - "example" : { - "name" : "name", - "id" : 6 - }, - "xml" : { - "name" : "Category" - } - }, - "User" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "type" : "integer", - "format" : "int32", - "description" : "User Status" - } - }, - "title" : "a User", - "description" : "A User who is purchasing from the pet store", - "example" : { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" - }, - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "description" : "A tag for a pet", - "example" : { - "name" : "name", - "id" : 1 - }, - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "type" : "object", - "required" : [ "name", "photoUrls" ], - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "category" : { - "$ref" : "#/definitions/Category" - }, - "name" : { - "type" : "string", - "example" : "doggie" - }, - "photoUrls" : { - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - }, - "items" : { - "type" : "string" - } - }, - "tags" : { - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - }, - "items" : { - "$ref" : "#/definitions/Tag" - } - }, - "status" : { - "type" : "string", - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] - } - }, - "title" : "a Pet", - "description" : "A pet for sale in the pet store", - "example" : { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" - }, - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "integer", - "format" : "int32" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - } - } - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - } +{ + "swagger" : "2.0", + "info" : { + "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "version" : "1.0.0", + "title" : "Swagger Petstore", + "termsOfService" : "http://swagger.io/terms/", + "contact" : { + "email" : "apiteam@swagger.io" + }, + "license" : { + "name" : "Apache-2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "host" : "petstore.swagger.io", + "basePath" : "/v2", + "tags" : [ { + "name" : "pet", + "description" : "Everything about your Pets", + "externalDocs" : { + "description" : "Find out more", + "url" : "http://swagger.io" + } + }, { + "name" : "store", + "description" : "Access to Petstore orders" + }, { + "name" : "user", + "description" : "Operations about user", + "externalDocs" : { + "description" : "Find out more about our store", + "url" : "http://swagger.io" + } + } ], + "schemes" : [ "http" ], + "paths" : { + "/pet" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "Add a new pet to the store", + "description" : "", + "operationId" : "addPet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "pet" ], + "summary" : "Update an existing pet", + "description" : "", + "operationId" : "updatePet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + }, + "405" : { + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/pet/findByStatus" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by status", + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "status", + "in" : "query", + "description" : "Status values that need to be considered for filter", + "required" : true, + "type" : "array", + "items" : { + "type" : "string", + "default" : "available", + "enum" : [ "available", "pending", "sold" ] + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid status value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/findByTags" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by tags", + "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId" : "findPetsByTags", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "tags", + "in" : "query", + "description" : "Tags to filter by", + "required" : true, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid tag value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "deprecated" : true, + "x-accepts" : "application/json" + } + }, + "/pet/{petId}" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Find pet by ID", + "description" : "Returns a single pet", + "operationId" : "getPetById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to return", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Pet" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + }, + "post" : { + "tags" : [ "pet" ], + "summary" : "Updates a pet in the store with form data", + "description" : "", + "operationId" : "updatePetWithForm", + "consumes" : [ "application/x-www-form-urlencoded" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet that needs to be updated", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "name", + "in" : "formData", + "description" : "Updated name of the pet", + "required" : false, + "type" : "string" + }, { + "name" : "status", + "in" : "formData", + "description" : "Updated status of the pet", + "required" : false, + "type" : "string" + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/x-www-form-urlencoded", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "pet" ], + "summary" : "Deletes a pet", + "description" : "", + "operationId" : "deletePet", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "api_key", + "in" : "header", + "required" : false, + "type" : "string" + }, { + "name" : "petId", + "in" : "path", + "description" : "Pet id to delete", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "400" : { + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/{petId}/uploadImage" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "description" : "", + "operationId" : "uploadFile", + "consumes" : [ "multipart/form-data" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "additionalMetadata", + "in" : "formData", + "description" : "Additional data to pass to server", + "required" : false, + "type" : "string" + }, { + "name" : "file", + "in" : "formData", + "description" : "file to upload", + "required" : false, + "type" : "file" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/ApiResponse" + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "multipart/form-data", + "x-accepts" : "application/json" + } + }, + "/store/inventory" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Returns pet inventories by status", + "description" : "Returns a map of status codes to quantities", + "operationId" : "getInventory", + "produces" : [ "application/json" ], + "parameters" : [ ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int32" + } + } + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + } + }, + "/store/order" : { + "post" : { + "tags" : [ "store" ], + "summary" : "Place an order for a pet", + "description" : "", + "operationId" : "placeOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "order placed for purchasing the pet", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Order" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid Order" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/store/order/{orderId}" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Find purchase order by ID", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId" : "getOrderById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of pet that needs to be fetched", + "required" : true, + "type" : "integer", + "maximum" : 5, + "minimum" : 1, + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "store" ], + "summary" : "Delete purchase order by ID", + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of the order that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + } + }, + "/user" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Create user", + "description" : "This can only be done by the logged in user.", + "operationId" : "createUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Created user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithArray" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithArrayInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithList" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithListInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/login" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs user into the system", + "description" : "", + "operationId" : "loginUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "query", + "description" : "The user name for login", + "required" : true, + "type" : "string" + }, { + "name" : "password", + "in" : "query", + "description" : "The password for login in clear text", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "string" + }, + "headers" : { + "X-Rate-Limit" : { + "type" : "integer", + "format" : "int32", + "description" : "calls per hour allowed by the user" + }, + "X-Expires-After" : { + "type" : "string", + "format" : "date-time", + "description" : "date in UTC when toekn expires" + } + } + }, + "400" : { + "description" : "Invalid username/password supplied" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/logout" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs out current logged in user session", + "description" : "", + "operationId" : "logoutUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/{username}" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Get user by user name", + "description" : "", + "operationId" : "getUserByName", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be fetched. Use user1 for testing. ", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/User" + } + }, + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "user" ], + "summary" : "Updated user", + "description" : "This can only be done by the logged in user.", + "operationId" : "updateUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "name that need to be deleted", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Updated user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid user supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "user" ], + "summary" : "Delete user", + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + } + } + }, + "securityDefinitions" : { + "petstore_auth" : { + "type" : "oauth2", + "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", + "flow" : "implicit", + "scopes" : { + "write:pets" : "modify pets in your account", + "read:pets" : "read your pets" + } + }, + "api_key" : { + "type" : "apiKey", + "name" : "api_key", + "in" : "header" + } + }, + "definitions" : { + "Order" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "petId" : { + "type" : "integer", + "format" : "int64" + }, + "quantity" : { + "type" : "integer", + "format" : "int32" + }, + "shipDate" : { + "type" : "string", + "format" : "date-time" + }, + "status" : { + "type" : "string", + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ] + }, + "complete" : { + "type" : "boolean", + "default" : false + } + }, + "title" : "Pet Order", + "description" : "An order for a pets from the pet store", + "example" : { + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" + }, + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet catehgry", + "description" : "A category for a pet", + "example" : { + "name" : "name", + "id" : 6 + }, + "xml" : { + "name" : "Category" + } + }, + "User" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string", + "x-obfuscated" : true + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "type" : "integer", + "format" : "int32", + "description" : "User Status" + } + }, + "title" : "a User", + "description" : "A User who is purchasing from the pet store", + "example" : { + "firstName" : "firstName", + "lastName" : "lastName", + "password" : "password", + "userStatus" : 6, + "phone" : "phone", + "id" : 0, + "email" : "email", + "username" : "username" + }, + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet Tag", + "description" : "A tag for a pet", + "example" : { + "name" : "name", + "id" : 1 + }, + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "type" : "object", + "required" : [ "name", "photoUrls" ], + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "category" : { + "$ref" : "#/definitions/Category" + }, + "name" : { + "type" : "string", + "example" : "doggie" + }, + "photoUrls" : { + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + }, + "items" : { + "type" : "string" + } + }, + "tags" : { + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + }, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "status" : { + "type" : "string", + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ] + } + }, + "title" : "a Pet", + "description" : "A pet for sale in the pet store", + "example" : { + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" + }, + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + }, + "title" : "An uploaded response", + "description" : "Describes the result of uploading an image resource", + "example" : { + "code" : 0, + "type" : "type", + "message" : "message" + } + } + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/CategoryTest.java b/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/CategoryTest.java new file mode 100644 index 00000000000..bb84c1139bc --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/CategoryTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/ModelApiResponseTest.java b/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/ModelApiResponseTest.java new file mode 100644 index 00000000000..98b960c13f8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/ModelApiResponseTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/OrderTest.java b/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/OrderTest.java new file mode 100644 index 00000000000..45bc15e250c --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/OrderTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.time.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/PetTest.java b/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/PetTest.java new file mode 100644 index 00000000000..35eeb23ea17 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/PetTest.java @@ -0,0 +1,54 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import apimodels.Category; +import apimodels.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/TagTest.java b/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/TagTest.java new file mode 100644 index 00000000000..b1a9e90252f --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/TagTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/UserTest.java b/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/UserTest.java new file mode 100644 index 00000000000..2083dab390b --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/UserTest.java @@ -0,0 +1,60 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/util/ModelTestUtils.java b/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/util/ModelTestUtils.java new file mode 100644 index 00000000000..c60e2e23e08 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-exception-handling/test/apimodels/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package apimodels.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Category.java index 9f0206575f5..2d8c20796e8 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/ModelApiResponse.java index 07493e84825..df384d9ce70 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -109,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java index cdc21f722c9..fbfc4ef7667 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import java.time.OffsetDateTime; @@ -210,9 +223,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Pet.java index fc310313180..a14b5cfe39d 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import apimodels.Category; @@ -25,7 +38,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList(); + private List photoUrls = new ArrayList<>(); @JsonProperty("tags") private List tags = null; @@ -149,7 +162,7 @@ public Pet tags(List tags) { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList(); + tags = new ArrayList<>(); } tags.add(tagsItem); return this; @@ -229,9 +242,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Tag.java index 15a8774252a..5543f1ff3d0 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/User.java b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/User.java index 689de768893..9d51b48f0a4 100644 --- a/samples/server/petstore/java-play-framework-no-interface/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-no-interface/app/apimodels/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -207,7 +220,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -219,9 +232,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-interface/public/swagger.json b/samples/server/petstore/java-play-framework-no-interface/public/swagger.json index c54baaa89cf..325cc97e76a 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/swagger.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/swagger.json @@ -1,919 +1,909 @@ -{ - "swagger" : "2.0", - "info" : { - "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - "version" : "1.0.0", - "title" : "Swagger Petstore", - "termsOfService" : "http://swagger.io/terms/", - "contact" : { - "email" : "apiteam@swagger.io" - }, - "license" : { - "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "host" : "petstore.swagger.io", - "basePath" : "/v2", - "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets", - "externalDocs" : { - "description" : "Find out more", - "url" : "http://swagger.io" - } - }, { - "name" : "store", - "description" : "Access to Petstore orders" - }, { - "name" : "user", - "description" : "Operations about user", - "externalDocs" : { - "description" : "Find out more about our store", - "url" : "http://swagger.io" - } - } ], - "schemes" : [ "http" ], - "paths" : { - "/pet" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "description" : "", - "operationId" : "addPet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "description" : "", - "operationId" : "updatePet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByStatus" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "status", - "in" : "query", - "description" : "Status values that need to be considered for filter", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByTags" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "tags", - "in" : "query", - "description" : "Tags to filter by", - "required" : true, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "deprecated" : true, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", - "description" : "Returns a single pet", - "operationId" : "getPetById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to return", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Pet" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", - "description" : "", - "operationId" : "updatePetWithForm", - "consumes" : [ "application/x-www-form-urlencoded" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet that needs to be updated", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "name", - "in" : "formData", - "description" : "Updated name of the pet", - "required" : false, - "type" : "string" - }, { - "name" : "status", - "in" : "formData", - "description" : "Updated status of the pet", - "required" : false, - "type" : "string" - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/x-www-form-urlencoded", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "description" : "", - "operationId" : "deletePet", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "required" : false, - "type" : "string" - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", - "description" : "", - "operationId" : "uploadFile", - "consumes" : [ "multipart/form-data" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to update", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "additionalMetadata", - "in" : "formData", - "description" : "Additional data to pass to server", - "required" : false, - "type" : "string" - }, { - "name" : "file", - "in" : "formData", - "description" : "file to upload", - "required" : false, - "type" : "file" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/ApiResponse" - } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "multipart/form-data", - "x-accepts" : "application/json" - } - }, - "/store/inventory" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "produces" : [ "application/json" ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } - } - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order" : { - "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", - "description" : "", - "operationId" : "placeOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "order placed for purchasing the pet", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Order" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid Order" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order/{orderId}" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of pet that needs to be fetched", - "required" : true, - "type" : "integer", - "maximum" : 5, - "minimum" : 1, - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Create user", - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Created user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithArray" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithArrayInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithList" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithListInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/login" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", - "description" : "", - "operationId" : "loginUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "query", - "description" : "The user name for login", - "required" : true, - "type" : "string" - }, { - "name" : "password", - "in" : "query", - "description" : "The password for login in clear text", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "string" - }, - "headers" : { - "X-Rate-Limit" : { - "type" : "integer", - "format" : "int32", - "description" : "calls per hour allowed by the user" - }, - "X-Expires-After" : { - "type" : "string", - "format" : "date-time", - "description" : "date in UTC when toekn expires" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/logout" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", - "description" : "", - "operationId" : "logoutUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/{username}" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", - "description" : "", - "operationId" : "getUserByName", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be fetched. Use user1 for testing. ", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/User" - } - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "name that need to be deleted", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Updated user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - } - }, - "securityDefinitions" : { - "petstore_auth" : { - "type" : "oauth2", - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "flow" : "implicit", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - }, - "api_key" : { - "type" : "apiKey", - "name" : "api_key", - "in" : "header" - } - }, - "definitions" : { - "Order" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "petId" : { - "type" : "integer", - "format" : "int64" - }, - "quantity" : { - "type" : "integer", - "format" : "int32" - }, - "shipDate" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] - }, - "complete" : { - "type" : "boolean", - "default" : false - } - }, - "title" : "Pet Order", - "description" : "An order for a pets from the pet store", - "example" : { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" - }, - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet catehgry", - "description" : "A category for a pet", - "example" : { - "name" : "name", - "id" : 6 - }, - "xml" : { - "name" : "Category" - } - }, - "User" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "type" : "integer", - "format" : "int32", - "description" : "User Status" - } - }, - "title" : "a User", - "description" : "A User who is purchasing from the pet store", - "example" : { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" - }, - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "description" : "A tag for a pet", - "example" : { - "name" : "name", - "id" : 1 - }, - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "type" : "object", - "required" : [ "name", "photoUrls" ], - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "category" : { - "$ref" : "#/definitions/Category" - }, - "name" : { - "type" : "string", - "example" : "doggie" - }, - "photoUrls" : { - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - }, - "items" : { - "type" : "string" - } - }, - "tags" : { - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - }, - "items" : { - "$ref" : "#/definitions/Tag" - } - }, - "status" : { - "type" : "string", - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] - } - }, - "title" : "a Pet", - "description" : "A pet for sale in the pet store", - "example" : { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" - }, - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "integer", - "format" : "int32" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - } - } - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - } +{ + "swagger" : "2.0", + "info" : { + "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "version" : "1.0.0", + "title" : "Swagger Petstore", + "termsOfService" : "http://swagger.io/terms/", + "contact" : { + "email" : "apiteam@swagger.io" + }, + "license" : { + "name" : "Apache-2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "host" : "petstore.swagger.io", + "basePath" : "/v2", + "tags" : [ { + "name" : "pet", + "description" : "Everything about your Pets", + "externalDocs" : { + "description" : "Find out more", + "url" : "http://swagger.io" + } + }, { + "name" : "store", + "description" : "Access to Petstore orders" + }, { + "name" : "user", + "description" : "Operations about user", + "externalDocs" : { + "description" : "Find out more about our store", + "url" : "http://swagger.io" + } + } ], + "schemes" : [ "http" ], + "paths" : { + "/pet" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "Add a new pet to the store", + "description" : "", + "operationId" : "addPet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "pet" ], + "summary" : "Update an existing pet", + "description" : "", + "operationId" : "updatePet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + }, + "405" : { + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/pet/findByStatus" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by status", + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "status", + "in" : "query", + "description" : "Status values that need to be considered for filter", + "required" : true, + "type" : "array", + "items" : { + "type" : "string", + "default" : "available", + "enum" : [ "available", "pending", "sold" ] + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid status value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/findByTags" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by tags", + "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId" : "findPetsByTags", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "tags", + "in" : "query", + "description" : "Tags to filter by", + "required" : true, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid tag value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "deprecated" : true, + "x-accepts" : "application/json" + } + }, + "/pet/{petId}" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Find pet by ID", + "description" : "Returns a single pet", + "operationId" : "getPetById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to return", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Pet" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + }, + "post" : { + "tags" : [ "pet" ], + "summary" : "Updates a pet in the store with form data", + "description" : "", + "operationId" : "updatePetWithForm", + "consumes" : [ "application/x-www-form-urlencoded" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet that needs to be updated", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "name", + "in" : "formData", + "description" : "Updated name of the pet", + "required" : false, + "type" : "string" + }, { + "name" : "status", + "in" : "formData", + "description" : "Updated status of the pet", + "required" : false, + "type" : "string" + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/x-www-form-urlencoded", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "pet" ], + "summary" : "Deletes a pet", + "description" : "", + "operationId" : "deletePet", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "api_key", + "in" : "header", + "required" : false, + "type" : "string" + }, { + "name" : "petId", + "in" : "path", + "description" : "Pet id to delete", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "400" : { + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/{petId}/uploadImage" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "description" : "", + "operationId" : "uploadFile", + "consumes" : [ "multipart/form-data" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "additionalMetadata", + "in" : "formData", + "description" : "Additional data to pass to server", + "required" : false, + "type" : "string" + }, { + "name" : "file", + "in" : "formData", + "description" : "file to upload", + "required" : false, + "type" : "file" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/ApiResponse" + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "multipart/form-data", + "x-accepts" : "application/json" + } + }, + "/store/inventory" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Returns pet inventories by status", + "description" : "Returns a map of status codes to quantities", + "operationId" : "getInventory", + "produces" : [ "application/json" ], + "parameters" : [ ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int32" + } + } + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + } + }, + "/store/order" : { + "post" : { + "tags" : [ "store" ], + "summary" : "Place an order for a pet", + "description" : "", + "operationId" : "placeOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "order placed for purchasing the pet", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Order" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid Order" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/store/order/{orderId}" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Find purchase order by ID", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId" : "getOrderById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of pet that needs to be fetched", + "required" : true, + "type" : "integer", + "maximum" : 5, + "minimum" : 1, + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "store" ], + "summary" : "Delete purchase order by ID", + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of the order that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + } + }, + "/user" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Create user", + "description" : "This can only be done by the logged in user.", + "operationId" : "createUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Created user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithArray" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithArrayInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithList" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithListInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/login" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs user into the system", + "description" : "", + "operationId" : "loginUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "query", + "description" : "The user name for login", + "required" : true, + "type" : "string" + }, { + "name" : "password", + "in" : "query", + "description" : "The password for login in clear text", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "string" + }, + "headers" : { + "X-Rate-Limit" : { + "type" : "integer", + "format" : "int32", + "description" : "calls per hour allowed by the user" + }, + "X-Expires-After" : { + "type" : "string", + "format" : "date-time", + "description" : "date in UTC when toekn expires" + } + } + }, + "400" : { + "description" : "Invalid username/password supplied" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/logout" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs out current logged in user session", + "description" : "", + "operationId" : "logoutUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/{username}" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Get user by user name", + "description" : "", + "operationId" : "getUserByName", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be fetched. Use user1 for testing. ", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/User" + } + }, + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "user" ], + "summary" : "Updated user", + "description" : "This can only be done by the logged in user.", + "operationId" : "updateUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "name that need to be deleted", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Updated user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid user supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "user" ], + "summary" : "Delete user", + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + } + } + }, + "securityDefinitions" : { + "petstore_auth" : { + "type" : "oauth2", + "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", + "flow" : "implicit", + "scopes" : { + "write:pets" : "modify pets in your account", + "read:pets" : "read your pets" + } + }, + "api_key" : { + "type" : "apiKey", + "name" : "api_key", + "in" : "header" + } + }, + "definitions" : { + "Order" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "petId" : { + "type" : "integer", + "format" : "int64" + }, + "quantity" : { + "type" : "integer", + "format" : "int32" + }, + "shipDate" : { + "type" : "string", + "format" : "date-time" + }, + "status" : { + "type" : "string", + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ] + }, + "complete" : { + "type" : "boolean", + "default" : false + } + }, + "title" : "Pet Order", + "description" : "An order for a pets from the pet store", + "example" : { + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" + }, + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet catehgry", + "description" : "A category for a pet", + "example" : { + "name" : "name", + "id" : 6 + }, + "xml" : { + "name" : "Category" + } + }, + "User" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string", + "x-obfuscated" : true + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "type" : "integer", + "format" : "int32", + "description" : "User Status" + } + }, + "title" : "a User", + "description" : "A User who is purchasing from the pet store", + "example" : { + "firstName" : "firstName", + "lastName" : "lastName", + "password" : "password", + "userStatus" : 6, + "phone" : "phone", + "id" : 0, + "email" : "email", + "username" : "username" + }, + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet Tag", + "description" : "A tag for a pet", + "example" : { + "name" : "name", + "id" : 1 + }, + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "type" : "object", + "required" : [ "name", "photoUrls" ], + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "category" : { + "$ref" : "#/definitions/Category" + }, + "name" : { + "type" : "string", + "example" : "doggie" + }, + "photoUrls" : { + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + }, + "items" : { + "type" : "string" + } + }, + "tags" : { + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + }, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "status" : { + "type" : "string", + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ] + } + }, + "title" : "a Pet", + "description" : "A pet for sale in the pet store", + "example" : { + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" + }, + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + }, + "title" : "An uploaded response", + "description" : "Describes the result of uploading an image resource", + "example" : { + "code" : 0, + "type" : "type", + "message" : "message" + } + } + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-interface/test/apimodels/CategoryTest.java b/samples/server/petstore/java-play-framework-no-interface/test/apimodels/CategoryTest.java new file mode 100644 index 00000000000..bb84c1139bc --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-interface/test/apimodels/CategoryTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-interface/test/apimodels/ModelApiResponseTest.java b/samples/server/petstore/java-play-framework-no-interface/test/apimodels/ModelApiResponseTest.java new file mode 100644 index 00000000000..98b960c13f8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-interface/test/apimodels/ModelApiResponseTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-interface/test/apimodels/OrderTest.java b/samples/server/petstore/java-play-framework-no-interface/test/apimodels/OrderTest.java new file mode 100644 index 00000000000..45bc15e250c --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-interface/test/apimodels/OrderTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.time.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-interface/test/apimodels/PetTest.java b/samples/server/petstore/java-play-framework-no-interface/test/apimodels/PetTest.java new file mode 100644 index 00000000000..35eeb23ea17 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-interface/test/apimodels/PetTest.java @@ -0,0 +1,54 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import apimodels.Category; +import apimodels.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-interface/test/apimodels/TagTest.java b/samples/server/petstore/java-play-framework-no-interface/test/apimodels/TagTest.java new file mode 100644 index 00000000000..b1a9e90252f --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-interface/test/apimodels/TagTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-interface/test/apimodels/UserTest.java b/samples/server/petstore/java-play-framework-no-interface/test/apimodels/UserTest.java new file mode 100644 index 00000000000..2083dab390b --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-interface/test/apimodels/UserTest.java @@ -0,0 +1,60 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-interface/test/apimodels/util/ModelTestUtils.java b/samples/server/petstore/java-play-framework-no-interface/test/apimodels/util/ModelTestUtils.java new file mode 100644 index 00000000000..c60e2e23e08 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-interface/test/apimodels/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package apimodels.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Category.java index 9f0206575f5..2d8c20796e8 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/ModelApiResponse.java index 07493e84825..df384d9ce70 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -109,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java index cdc21f722c9..fbfc4ef7667 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import java.time.OffsetDateTime; @@ -210,9 +223,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Pet.java index fc310313180..a14b5cfe39d 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import apimodels.Category; @@ -25,7 +38,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList(); + private List photoUrls = new ArrayList<>(); @JsonProperty("tags") private List tags = null; @@ -149,7 +162,7 @@ public Pet tags(List tags) { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList(); + tags = new ArrayList<>(); } tags.add(tagsItem); return this; @@ -229,9 +242,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Tag.java index 15a8774252a..5543f1ff3d0 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/User.java b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/User.java index 689de768893..9d51b48f0a4 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/app/apimodels/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -207,7 +220,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -219,9 +232,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/CategoryTest.java b/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/CategoryTest.java new file mode 100644 index 00000000000..bb84c1139bc --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/CategoryTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/ModelApiResponseTest.java b/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/ModelApiResponseTest.java new file mode 100644 index 00000000000..98b960c13f8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/ModelApiResponseTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/OrderTest.java b/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/OrderTest.java new file mode 100644 index 00000000000..45bc15e250c --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/OrderTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.time.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/PetTest.java b/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/PetTest.java new file mode 100644 index 00000000000..35eeb23ea17 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/PetTest.java @@ -0,0 +1,54 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import apimodels.Category; +import apimodels.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/TagTest.java b/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/TagTest.java new file mode 100644 index 00000000000..b1a9e90252f --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/TagTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/UserTest.java b/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/UserTest.java new file mode 100644 index 00000000000..2083dab390b --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/UserTest.java @@ -0,0 +1,60 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/util/ModelTestUtils.java b/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/util/ModelTestUtils.java new file mode 100644 index 00000000000..c60e2e23e08 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/test/apimodels/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package apimodels.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Category.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Category.java index 9f0206575f5..2d8c20796e8 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/ModelApiResponse.java index 07493e84825..df384d9ce70 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -109,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java index cdc21f722c9..fbfc4ef7667 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import java.time.OffsetDateTime; @@ -210,9 +223,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Pet.java index fc310313180..a14b5cfe39d 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import apimodels.Category; @@ -25,7 +38,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList(); + private List photoUrls = new ArrayList<>(); @JsonProperty("tags") private List tags = null; @@ -149,7 +162,7 @@ public Pet tags(List tags) { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList(); + tags = new ArrayList<>(); } tags.add(tagsItem); return this; @@ -229,9 +242,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Tag.java index 15a8774252a..5543f1ff3d0 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/User.java b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/User.java index 689de768893..9d51b48f0a4 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/app/apimodels/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -207,7 +220,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -219,9 +232,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/public/swagger.json b/samples/server/petstore/java-play-framework-no-wrap-calls/public/swagger.json index c54baaa89cf..325cc97e76a 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/public/swagger.json +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/public/swagger.json @@ -1,919 +1,909 @@ -{ - "swagger" : "2.0", - "info" : { - "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - "version" : "1.0.0", - "title" : "Swagger Petstore", - "termsOfService" : "http://swagger.io/terms/", - "contact" : { - "email" : "apiteam@swagger.io" - }, - "license" : { - "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "host" : "petstore.swagger.io", - "basePath" : "/v2", - "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets", - "externalDocs" : { - "description" : "Find out more", - "url" : "http://swagger.io" - } - }, { - "name" : "store", - "description" : "Access to Petstore orders" - }, { - "name" : "user", - "description" : "Operations about user", - "externalDocs" : { - "description" : "Find out more about our store", - "url" : "http://swagger.io" - } - } ], - "schemes" : [ "http" ], - "paths" : { - "/pet" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "description" : "", - "operationId" : "addPet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "description" : "", - "operationId" : "updatePet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByStatus" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "status", - "in" : "query", - "description" : "Status values that need to be considered for filter", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByTags" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "tags", - "in" : "query", - "description" : "Tags to filter by", - "required" : true, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "deprecated" : true, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", - "description" : "Returns a single pet", - "operationId" : "getPetById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to return", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Pet" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", - "description" : "", - "operationId" : "updatePetWithForm", - "consumes" : [ "application/x-www-form-urlencoded" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet that needs to be updated", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "name", - "in" : "formData", - "description" : "Updated name of the pet", - "required" : false, - "type" : "string" - }, { - "name" : "status", - "in" : "formData", - "description" : "Updated status of the pet", - "required" : false, - "type" : "string" - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/x-www-form-urlencoded", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "description" : "", - "operationId" : "deletePet", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "required" : false, - "type" : "string" - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", - "description" : "", - "operationId" : "uploadFile", - "consumes" : [ "multipart/form-data" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to update", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "additionalMetadata", - "in" : "formData", - "description" : "Additional data to pass to server", - "required" : false, - "type" : "string" - }, { - "name" : "file", - "in" : "formData", - "description" : "file to upload", - "required" : false, - "type" : "file" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/ApiResponse" - } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "multipart/form-data", - "x-accepts" : "application/json" - } - }, - "/store/inventory" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "produces" : [ "application/json" ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } - } - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order" : { - "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", - "description" : "", - "operationId" : "placeOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "order placed for purchasing the pet", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Order" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid Order" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order/{orderId}" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of pet that needs to be fetched", - "required" : true, - "type" : "integer", - "maximum" : 5, - "minimum" : 1, - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Create user", - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Created user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithArray" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithArrayInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithList" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithListInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/login" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", - "description" : "", - "operationId" : "loginUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "query", - "description" : "The user name for login", - "required" : true, - "type" : "string" - }, { - "name" : "password", - "in" : "query", - "description" : "The password for login in clear text", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "string" - }, - "headers" : { - "X-Rate-Limit" : { - "type" : "integer", - "format" : "int32", - "description" : "calls per hour allowed by the user" - }, - "X-Expires-After" : { - "type" : "string", - "format" : "date-time", - "description" : "date in UTC when toekn expires" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/logout" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", - "description" : "", - "operationId" : "logoutUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/{username}" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", - "description" : "", - "operationId" : "getUserByName", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be fetched. Use user1 for testing. ", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/User" - } - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "name that need to be deleted", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Updated user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - } - }, - "securityDefinitions" : { - "petstore_auth" : { - "type" : "oauth2", - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "flow" : "implicit", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - }, - "api_key" : { - "type" : "apiKey", - "name" : "api_key", - "in" : "header" - } - }, - "definitions" : { - "Order" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "petId" : { - "type" : "integer", - "format" : "int64" - }, - "quantity" : { - "type" : "integer", - "format" : "int32" - }, - "shipDate" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] - }, - "complete" : { - "type" : "boolean", - "default" : false - } - }, - "title" : "Pet Order", - "description" : "An order for a pets from the pet store", - "example" : { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" - }, - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet catehgry", - "description" : "A category for a pet", - "example" : { - "name" : "name", - "id" : 6 - }, - "xml" : { - "name" : "Category" - } - }, - "User" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "type" : "integer", - "format" : "int32", - "description" : "User Status" - } - }, - "title" : "a User", - "description" : "A User who is purchasing from the pet store", - "example" : { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" - }, - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "description" : "A tag for a pet", - "example" : { - "name" : "name", - "id" : 1 - }, - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "type" : "object", - "required" : [ "name", "photoUrls" ], - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "category" : { - "$ref" : "#/definitions/Category" - }, - "name" : { - "type" : "string", - "example" : "doggie" - }, - "photoUrls" : { - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - }, - "items" : { - "type" : "string" - } - }, - "tags" : { - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - }, - "items" : { - "$ref" : "#/definitions/Tag" - } - }, - "status" : { - "type" : "string", - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] - } - }, - "title" : "a Pet", - "description" : "A pet for sale in the pet store", - "example" : { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" - }, - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "integer", - "format" : "int32" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - } - } - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - } +{ + "swagger" : "2.0", + "info" : { + "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "version" : "1.0.0", + "title" : "Swagger Petstore", + "termsOfService" : "http://swagger.io/terms/", + "contact" : { + "email" : "apiteam@swagger.io" + }, + "license" : { + "name" : "Apache-2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "host" : "petstore.swagger.io", + "basePath" : "/v2", + "tags" : [ { + "name" : "pet", + "description" : "Everything about your Pets", + "externalDocs" : { + "description" : "Find out more", + "url" : "http://swagger.io" + } + }, { + "name" : "store", + "description" : "Access to Petstore orders" + }, { + "name" : "user", + "description" : "Operations about user", + "externalDocs" : { + "description" : "Find out more about our store", + "url" : "http://swagger.io" + } + } ], + "schemes" : [ "http" ], + "paths" : { + "/pet" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "Add a new pet to the store", + "description" : "", + "operationId" : "addPet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "pet" ], + "summary" : "Update an existing pet", + "description" : "", + "operationId" : "updatePet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + }, + "405" : { + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/pet/findByStatus" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by status", + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "status", + "in" : "query", + "description" : "Status values that need to be considered for filter", + "required" : true, + "type" : "array", + "items" : { + "type" : "string", + "default" : "available", + "enum" : [ "available", "pending", "sold" ] + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid status value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/findByTags" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by tags", + "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId" : "findPetsByTags", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "tags", + "in" : "query", + "description" : "Tags to filter by", + "required" : true, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid tag value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "deprecated" : true, + "x-accepts" : "application/json" + } + }, + "/pet/{petId}" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Find pet by ID", + "description" : "Returns a single pet", + "operationId" : "getPetById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to return", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Pet" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + }, + "post" : { + "tags" : [ "pet" ], + "summary" : "Updates a pet in the store with form data", + "description" : "", + "operationId" : "updatePetWithForm", + "consumes" : [ "application/x-www-form-urlencoded" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet that needs to be updated", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "name", + "in" : "formData", + "description" : "Updated name of the pet", + "required" : false, + "type" : "string" + }, { + "name" : "status", + "in" : "formData", + "description" : "Updated status of the pet", + "required" : false, + "type" : "string" + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/x-www-form-urlencoded", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "pet" ], + "summary" : "Deletes a pet", + "description" : "", + "operationId" : "deletePet", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "api_key", + "in" : "header", + "required" : false, + "type" : "string" + }, { + "name" : "petId", + "in" : "path", + "description" : "Pet id to delete", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "400" : { + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/{petId}/uploadImage" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "description" : "", + "operationId" : "uploadFile", + "consumes" : [ "multipart/form-data" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "additionalMetadata", + "in" : "formData", + "description" : "Additional data to pass to server", + "required" : false, + "type" : "string" + }, { + "name" : "file", + "in" : "formData", + "description" : "file to upload", + "required" : false, + "type" : "file" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/ApiResponse" + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "multipart/form-data", + "x-accepts" : "application/json" + } + }, + "/store/inventory" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Returns pet inventories by status", + "description" : "Returns a map of status codes to quantities", + "operationId" : "getInventory", + "produces" : [ "application/json" ], + "parameters" : [ ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int32" + } + } + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + } + }, + "/store/order" : { + "post" : { + "tags" : [ "store" ], + "summary" : "Place an order for a pet", + "description" : "", + "operationId" : "placeOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "order placed for purchasing the pet", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Order" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid Order" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/store/order/{orderId}" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Find purchase order by ID", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId" : "getOrderById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of pet that needs to be fetched", + "required" : true, + "type" : "integer", + "maximum" : 5, + "minimum" : 1, + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "store" ], + "summary" : "Delete purchase order by ID", + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of the order that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + } + }, + "/user" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Create user", + "description" : "This can only be done by the logged in user.", + "operationId" : "createUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Created user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithArray" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithArrayInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithList" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithListInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/login" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs user into the system", + "description" : "", + "operationId" : "loginUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "query", + "description" : "The user name for login", + "required" : true, + "type" : "string" + }, { + "name" : "password", + "in" : "query", + "description" : "The password for login in clear text", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "string" + }, + "headers" : { + "X-Rate-Limit" : { + "type" : "integer", + "format" : "int32", + "description" : "calls per hour allowed by the user" + }, + "X-Expires-After" : { + "type" : "string", + "format" : "date-time", + "description" : "date in UTC when toekn expires" + } + } + }, + "400" : { + "description" : "Invalid username/password supplied" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/logout" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs out current logged in user session", + "description" : "", + "operationId" : "logoutUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/{username}" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Get user by user name", + "description" : "", + "operationId" : "getUserByName", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be fetched. Use user1 for testing. ", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/User" + } + }, + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "user" ], + "summary" : "Updated user", + "description" : "This can only be done by the logged in user.", + "operationId" : "updateUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "name that need to be deleted", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Updated user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid user supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "user" ], + "summary" : "Delete user", + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + } + } + }, + "securityDefinitions" : { + "petstore_auth" : { + "type" : "oauth2", + "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", + "flow" : "implicit", + "scopes" : { + "write:pets" : "modify pets in your account", + "read:pets" : "read your pets" + } + }, + "api_key" : { + "type" : "apiKey", + "name" : "api_key", + "in" : "header" + } + }, + "definitions" : { + "Order" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "petId" : { + "type" : "integer", + "format" : "int64" + }, + "quantity" : { + "type" : "integer", + "format" : "int32" + }, + "shipDate" : { + "type" : "string", + "format" : "date-time" + }, + "status" : { + "type" : "string", + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ] + }, + "complete" : { + "type" : "boolean", + "default" : false + } + }, + "title" : "Pet Order", + "description" : "An order for a pets from the pet store", + "example" : { + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" + }, + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet catehgry", + "description" : "A category for a pet", + "example" : { + "name" : "name", + "id" : 6 + }, + "xml" : { + "name" : "Category" + } + }, + "User" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string", + "x-obfuscated" : true + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "type" : "integer", + "format" : "int32", + "description" : "User Status" + } + }, + "title" : "a User", + "description" : "A User who is purchasing from the pet store", + "example" : { + "firstName" : "firstName", + "lastName" : "lastName", + "password" : "password", + "userStatus" : 6, + "phone" : "phone", + "id" : 0, + "email" : "email", + "username" : "username" + }, + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet Tag", + "description" : "A tag for a pet", + "example" : { + "name" : "name", + "id" : 1 + }, + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "type" : "object", + "required" : [ "name", "photoUrls" ], + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "category" : { + "$ref" : "#/definitions/Category" + }, + "name" : { + "type" : "string", + "example" : "doggie" + }, + "photoUrls" : { + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + }, + "items" : { + "type" : "string" + } + }, + "tags" : { + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + }, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "status" : { + "type" : "string", + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ] + } + }, + "title" : "a Pet", + "description" : "A pet for sale in the pet store", + "example" : { + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" + }, + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + }, + "title" : "An uploaded response", + "description" : "Describes the result of uploading an image resource", + "example" : { + "code" : 0, + "type" : "type", + "message" : "message" + } + } + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/CategoryTest.java b/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/CategoryTest.java new file mode 100644 index 00000000000..bb84c1139bc --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/CategoryTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/ModelApiResponseTest.java b/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/ModelApiResponseTest.java new file mode 100644 index 00000000000..98b960c13f8 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/ModelApiResponseTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/OrderTest.java b/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/OrderTest.java new file mode 100644 index 00000000000..45bc15e250c --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/OrderTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.time.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/PetTest.java b/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/PetTest.java new file mode 100644 index 00000000000..35eeb23ea17 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/PetTest.java @@ -0,0 +1,54 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import apimodels.Category; +import apimodels.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/TagTest.java b/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/TagTest.java new file mode 100644 index 00000000000..b1a9e90252f --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/TagTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/UserTest.java b/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/UserTest.java new file mode 100644 index 00000000000..2083dab390b --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/UserTest.java @@ -0,0 +1,60 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/util/ModelTestUtils.java b/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/util/ModelTestUtils.java new file mode 100644 index 00000000000..c60e2e23e08 --- /dev/null +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/test/apimodels/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package apimodels.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/app/apimodels/Category.java b/samples/server/petstore/java-play-framework/app/apimodels/Category.java index 9f0206575f5..2d8c20796e8 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/Category.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework/app/apimodels/ModelApiResponse.java b/samples/server/petstore/java-play-framework/app/apimodels/ModelApiResponse.java index 07493e84825..df384d9ce70 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/ModelApiResponse.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -109,9 +122,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework/app/apimodels/Order.java b/samples/server/petstore/java-play-framework/app/apimodels/Order.java index cdc21f722c9..fbfc4ef7667 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/Order.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import java.time.OffsetDateTime; @@ -210,9 +223,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework/app/apimodels/Pet.java b/samples/server/petstore/java-play-framework/app/apimodels/Pet.java index fc310313180..a14b5cfe39d 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/Pet.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import apimodels.Category; @@ -25,7 +38,7 @@ public class Pet { private String name = null; @JsonProperty("photoUrls") - private List photoUrls = new ArrayList(); + private List photoUrls = new ArrayList<>(); @JsonProperty("tags") private List tags = null; @@ -149,7 +162,7 @@ public Pet tags(List tags) { public Pet addTagsItem(Tag tagsItem) { if (tags == null) { - tags = new ArrayList(); + tags = new ArrayList<>(); } tags.add(tagsItem); return this; @@ -229,9 +242,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework/app/apimodels/Tag.java b/samples/server/petstore/java-play-framework/app/apimodels/Tag.java index 15a8774252a..5543f1ff3d0 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/Tag.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework/app/apimodels/User.java b/samples/server/petstore/java-play-framework/app/apimodels/User.java index 689de768893..9d51b48f0a4 100644 --- a/samples/server/petstore/java-play-framework/app/apimodels/User.java +++ b/samples/server/petstore/java-play-framework/app/apimodels/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package apimodels; import com.fasterxml.jackson.annotation.*; @@ -207,7 +220,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -219,9 +232,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-play-framework/public/swagger.json b/samples/server/petstore/java-play-framework/public/swagger.json index c54baaa89cf..325cc97e76a 100644 --- a/samples/server/petstore/java-play-framework/public/swagger.json +++ b/samples/server/petstore/java-play-framework/public/swagger.json @@ -1,919 +1,909 @@ -{ - "swagger" : "2.0", - "info" : { - "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - "version" : "1.0.0", - "title" : "Swagger Petstore", - "termsOfService" : "http://swagger.io/terms/", - "contact" : { - "email" : "apiteam@swagger.io" - }, - "license" : { - "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "host" : "petstore.swagger.io", - "basePath" : "/v2", - "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets", - "externalDocs" : { - "description" : "Find out more", - "url" : "http://swagger.io" - } - }, { - "name" : "store", - "description" : "Access to Petstore orders" - }, { - "name" : "user", - "description" : "Operations about user", - "externalDocs" : { - "description" : "Find out more about our store", - "url" : "http://swagger.io" - } - } ], - "schemes" : [ "http" ], - "paths" : { - "/pet" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "description" : "", - "operationId" : "addPet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "description" : "", - "operationId" : "updatePet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByStatus" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "status", - "in" : "query", - "description" : "Status values that need to be considered for filter", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByTags" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "tags", - "in" : "query", - "description" : "Tags to filter by", - "required" : true, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "deprecated" : true, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", - "description" : "Returns a single pet", - "operationId" : "getPetById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to return", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Pet" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", - "description" : "", - "operationId" : "updatePetWithForm", - "consumes" : [ "application/x-www-form-urlencoded" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet that needs to be updated", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "name", - "in" : "formData", - "description" : "Updated name of the pet", - "required" : false, - "type" : "string" - }, { - "name" : "status", - "in" : "formData", - "description" : "Updated status of the pet", - "required" : false, - "type" : "string" - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/x-www-form-urlencoded", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "description" : "", - "operationId" : "deletePet", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "required" : false, - "type" : "string" - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", - "description" : "", - "operationId" : "uploadFile", - "consumes" : [ "multipart/form-data" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to update", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "additionalMetadata", - "in" : "formData", - "description" : "Additional data to pass to server", - "required" : false, - "type" : "string" - }, { - "name" : "file", - "in" : "formData", - "description" : "file to upload", - "required" : false, - "type" : "file" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/ApiResponse" - } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "multipart/form-data", - "x-accepts" : "application/json" - } - }, - "/store/inventory" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "produces" : [ "application/json" ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } - } - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order" : { - "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", - "description" : "", - "operationId" : "placeOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "order placed for purchasing the pet", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Order" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid Order" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order/{orderId}" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of pet that needs to be fetched", - "required" : true, - "type" : "integer", - "maximum" : 5, - "minimum" : 1, - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Create user", - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Created user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithArray" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithArrayInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithList" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithListInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/login" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", - "description" : "", - "operationId" : "loginUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "query", - "description" : "The user name for login", - "required" : true, - "type" : "string" - }, { - "name" : "password", - "in" : "query", - "description" : "The password for login in clear text", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "string" - }, - "headers" : { - "X-Rate-Limit" : { - "type" : "integer", - "format" : "int32", - "description" : "calls per hour allowed by the user" - }, - "X-Expires-After" : { - "type" : "string", - "format" : "date-time", - "description" : "date in UTC when toekn expires" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/logout" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", - "description" : "", - "operationId" : "logoutUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/{username}" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", - "description" : "", - "operationId" : "getUserByName", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be fetched. Use user1 for testing. ", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/User" - } - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "name that need to be deleted", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Updated user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - } - }, - "securityDefinitions" : { - "petstore_auth" : { - "type" : "oauth2", - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "flow" : "implicit", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - }, - "api_key" : { - "type" : "apiKey", - "name" : "api_key", - "in" : "header" - } - }, - "definitions" : { - "Order" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "petId" : { - "type" : "integer", - "format" : "int64" - }, - "quantity" : { - "type" : "integer", - "format" : "int32" - }, - "shipDate" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] - }, - "complete" : { - "type" : "boolean", - "default" : false - } - }, - "title" : "Pet Order", - "description" : "An order for a pets from the pet store", - "example" : { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" - }, - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet catehgry", - "description" : "A category for a pet", - "example" : { - "name" : "name", - "id" : 6 - }, - "xml" : { - "name" : "Category" - } - }, - "User" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "type" : "integer", - "format" : "int32", - "description" : "User Status" - } - }, - "title" : "a User", - "description" : "A User who is purchasing from the pet store", - "example" : { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" - }, - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "description" : "A tag for a pet", - "example" : { - "name" : "name", - "id" : 1 - }, - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "type" : "object", - "required" : [ "name", "photoUrls" ], - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "category" : { - "$ref" : "#/definitions/Category" - }, - "name" : { - "type" : "string", - "example" : "doggie" - }, - "photoUrls" : { - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - }, - "items" : { - "type" : "string" - } - }, - "tags" : { - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - }, - "items" : { - "$ref" : "#/definitions/Tag" - } - }, - "status" : { - "type" : "string", - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] - } - }, - "title" : "a Pet", - "description" : "A pet for sale in the pet store", - "example" : { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" - }, - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "integer", - "format" : "int32" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - } - } - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - } +{ + "swagger" : "2.0", + "info" : { + "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "version" : "1.0.0", + "title" : "Swagger Petstore", + "termsOfService" : "http://swagger.io/terms/", + "contact" : { + "email" : "apiteam@swagger.io" + }, + "license" : { + "name" : "Apache-2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "host" : "petstore.swagger.io", + "basePath" : "/v2", + "tags" : [ { + "name" : "pet", + "description" : "Everything about your Pets", + "externalDocs" : { + "description" : "Find out more", + "url" : "http://swagger.io" + } + }, { + "name" : "store", + "description" : "Access to Petstore orders" + }, { + "name" : "user", + "description" : "Operations about user", + "externalDocs" : { + "description" : "Find out more about our store", + "url" : "http://swagger.io" + } + } ], + "schemes" : [ "http" ], + "paths" : { + "/pet" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "Add a new pet to the store", + "description" : "", + "operationId" : "addPet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "pet" ], + "summary" : "Update an existing pet", + "description" : "", + "operationId" : "updatePet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + }, + "405" : { + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/pet/findByStatus" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by status", + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "status", + "in" : "query", + "description" : "Status values that need to be considered for filter", + "required" : true, + "type" : "array", + "items" : { + "type" : "string", + "default" : "available", + "enum" : [ "available", "pending", "sold" ] + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid status value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/findByTags" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by tags", + "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId" : "findPetsByTags", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "tags", + "in" : "query", + "description" : "Tags to filter by", + "required" : true, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid tag value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "deprecated" : true, + "x-accepts" : "application/json" + } + }, + "/pet/{petId}" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Find pet by ID", + "description" : "Returns a single pet", + "operationId" : "getPetById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to return", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Pet" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + }, + "post" : { + "tags" : [ "pet" ], + "summary" : "Updates a pet in the store with form data", + "description" : "", + "operationId" : "updatePetWithForm", + "consumes" : [ "application/x-www-form-urlencoded" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet that needs to be updated", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "name", + "in" : "formData", + "description" : "Updated name of the pet", + "required" : false, + "type" : "string" + }, { + "name" : "status", + "in" : "formData", + "description" : "Updated status of the pet", + "required" : false, + "type" : "string" + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/x-www-form-urlencoded", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "pet" ], + "summary" : "Deletes a pet", + "description" : "", + "operationId" : "deletePet", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "api_key", + "in" : "header", + "required" : false, + "type" : "string" + }, { + "name" : "petId", + "in" : "path", + "description" : "Pet id to delete", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "400" : { + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/{petId}/uploadImage" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "description" : "", + "operationId" : "uploadFile", + "consumes" : [ "multipart/form-data" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "additionalMetadata", + "in" : "formData", + "description" : "Additional data to pass to server", + "required" : false, + "type" : "string" + }, { + "name" : "file", + "in" : "formData", + "description" : "file to upload", + "required" : false, + "type" : "file" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/ApiResponse" + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "multipart/form-data", + "x-accepts" : "application/json" + } + }, + "/store/inventory" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Returns pet inventories by status", + "description" : "Returns a map of status codes to quantities", + "operationId" : "getInventory", + "produces" : [ "application/json" ], + "parameters" : [ ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int32" + } + } + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + } + }, + "/store/order" : { + "post" : { + "tags" : [ "store" ], + "summary" : "Place an order for a pet", + "description" : "", + "operationId" : "placeOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "order placed for purchasing the pet", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Order" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid Order" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/store/order/{orderId}" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Find purchase order by ID", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId" : "getOrderById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of pet that needs to be fetched", + "required" : true, + "type" : "integer", + "maximum" : 5, + "minimum" : 1, + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "store" ], + "summary" : "Delete purchase order by ID", + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of the order that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + } + }, + "/user" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Create user", + "description" : "This can only be done by the logged in user.", + "operationId" : "createUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Created user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithArray" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithArrayInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithList" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithListInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/login" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs user into the system", + "description" : "", + "operationId" : "loginUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "query", + "description" : "The user name for login", + "required" : true, + "type" : "string" + }, { + "name" : "password", + "in" : "query", + "description" : "The password for login in clear text", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "string" + }, + "headers" : { + "X-Rate-Limit" : { + "type" : "integer", + "format" : "int32", + "description" : "calls per hour allowed by the user" + }, + "X-Expires-After" : { + "type" : "string", + "format" : "date-time", + "description" : "date in UTC when toekn expires" + } + } + }, + "400" : { + "description" : "Invalid username/password supplied" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/logout" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs out current logged in user session", + "description" : "", + "operationId" : "logoutUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/{username}" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Get user by user name", + "description" : "", + "operationId" : "getUserByName", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be fetched. Use user1 for testing. ", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/User" + } + }, + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "user" ], + "summary" : "Updated user", + "description" : "This can only be done by the logged in user.", + "operationId" : "updateUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "name that need to be deleted", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Updated user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid user supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "user" ], + "summary" : "Delete user", + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + } + } + }, + "securityDefinitions" : { + "petstore_auth" : { + "type" : "oauth2", + "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", + "flow" : "implicit", + "scopes" : { + "write:pets" : "modify pets in your account", + "read:pets" : "read your pets" + } + }, + "api_key" : { + "type" : "apiKey", + "name" : "api_key", + "in" : "header" + } + }, + "definitions" : { + "Order" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "petId" : { + "type" : "integer", + "format" : "int64" + }, + "quantity" : { + "type" : "integer", + "format" : "int32" + }, + "shipDate" : { + "type" : "string", + "format" : "date-time" + }, + "status" : { + "type" : "string", + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ] + }, + "complete" : { + "type" : "boolean", + "default" : false + } + }, + "title" : "Pet Order", + "description" : "An order for a pets from the pet store", + "example" : { + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" + }, + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet catehgry", + "description" : "A category for a pet", + "example" : { + "name" : "name", + "id" : 6 + }, + "xml" : { + "name" : "Category" + } + }, + "User" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string", + "x-obfuscated" : true + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "type" : "integer", + "format" : "int32", + "description" : "User Status" + } + }, + "title" : "a User", + "description" : "A User who is purchasing from the pet store", + "example" : { + "firstName" : "firstName", + "lastName" : "lastName", + "password" : "password", + "userStatus" : 6, + "phone" : "phone", + "id" : 0, + "email" : "email", + "username" : "username" + }, + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet Tag", + "description" : "A tag for a pet", + "example" : { + "name" : "name", + "id" : 1 + }, + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "type" : "object", + "required" : [ "name", "photoUrls" ], + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "category" : { + "$ref" : "#/definitions/Category" + }, + "name" : { + "type" : "string", + "example" : "doggie" + }, + "photoUrls" : { + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + }, + "items" : { + "type" : "string" + } + }, + "tags" : { + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + }, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "status" : { + "type" : "string", + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ] + } + }, + "title" : "a Pet", + "description" : "A pet for sale in the pet store", + "example" : { + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" + }, + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + }, + "title" : "An uploaded response", + "description" : "Describes the result of uploading an image resource", + "example" : { + "code" : 0, + "type" : "type", + "message" : "message" + } + } + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-play-framework/test/apimodels/CategoryTest.java b/samples/server/petstore/java-play-framework/test/apimodels/CategoryTest.java new file mode 100644 index 00000000000..bb84c1139bc --- /dev/null +++ b/samples/server/petstore/java-play-framework/test/apimodels/CategoryTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/java-play-framework/test/apimodels/ModelApiResponseTest.java b/samples/server/petstore/java-play-framework/test/apimodels/ModelApiResponseTest.java new file mode 100644 index 00000000000..98b960c13f8 --- /dev/null +++ b/samples/server/petstore/java-play-framework/test/apimodels/ModelApiResponseTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/java-play-framework/test/apimodels/OrderTest.java b/samples/server/petstore/java-play-framework/test/apimodels/OrderTest.java new file mode 100644 index 00000000000..45bc15e250c --- /dev/null +++ b/samples/server/petstore/java-play-framework/test/apimodels/OrderTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.time.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/java-play-framework/test/apimodels/PetTest.java b/samples/server/petstore/java-play-framework/test/apimodels/PetTest.java new file mode 100644 index 00000000000..35eeb23ea17 --- /dev/null +++ b/samples/server/petstore/java-play-framework/test/apimodels/PetTest.java @@ -0,0 +1,54 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import apimodels.Category; +import apimodels.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/java-play-framework/test/apimodels/TagTest.java b/samples/server/petstore/java-play-framework/test/apimodels/TagTest.java new file mode 100644 index 00000000000..b1a9e90252f --- /dev/null +++ b/samples/server/petstore/java-play-framework/test/apimodels/TagTest.java @@ -0,0 +1,50 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/java-play-framework/test/apimodels/UserTest.java b/samples/server/petstore/java-play-framework/test/apimodels/UserTest.java new file mode 100644 index 00000000000..2083dab390b --- /dev/null +++ b/samples/server/petstore/java-play-framework/test/apimodels/UserTest.java @@ -0,0 +1,60 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package apimodels; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import apimodels.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/java-play-framework/test/apimodels/util/ModelTestUtils.java b/samples/server/petstore/java-play-framework/test/apimodels/util/ModelTestUtils.java new file mode 100644 index 00000000000..c60e2e23e08 --- /dev/null +++ b/samples/server/petstore/java-play-framework/test/apimodels/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package apimodels.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/async/README.md b/samples/server/petstore/java-vertx/async/README.md index 7f4534629b9..f0e47030eb2 100644 --- a/samples/server/petstore/java-vertx/async/README.md +++ b/samples/server/petstore/java-vertx/async/README.md @@ -1 +1 @@ -Project generated on : 2017-07-08T16:03:02.953+02:00 +Project generated on : 2017-12-02T18:46:09.553+02:00 diff --git a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Category.java b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Category.java index 10659635427..f6ecb922f32 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Category.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.server.api.model; import java.util.Objects; @@ -74,10 +87,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/ModelApiResponse.java b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/ModelApiResponse.java index ef5261c7edb..df92d698933 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/ModelApiResponse.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.server.api.model; import java.util.Objects; @@ -87,10 +100,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Order.java b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Order.java index 0eaaa46f352..32eb2ce7e5d 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Order.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.server.api.model; import java.util.Objects; @@ -148,10 +161,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Pet.java b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Pet.java index e975a8dc2b2..c6e1a685811 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Pet.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.server.api.model; import java.util.Objects; @@ -151,10 +164,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Tag.java b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Tag.java index f00a458e3d7..c407734cbbe 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Tag.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.server.api.model; import java.util.Objects; @@ -74,10 +87,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/User.java b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/User.java index 6e7331cd236..dfaa71d809c 100644 --- a/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/User.java +++ b/samples/server/petstore/java-vertx/async/src/main/java/io/swagger/server/api/model/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.server.api.model; import java.util.Objects; @@ -141,7 +154,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -152,10 +165,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-vertx/async/src/main/resources/swagger.json b/samples/server/petstore/java-vertx/async/src/main/resources/swagger.json index fb60866f1b8..3465cf2623e 100644 --- a/samples/server/petstore/java-vertx/async/src/main/resources/swagger.json +++ b/samples/server/petstore/java-vertx/async/src/main/resources/swagger.json @@ -1,871 +1,861 @@ -{ - "swagger" : "2.0", - "info" : { - "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - "version" : "1.0.0", - "title" : "Swagger Petstore", - "termsOfService" : "http://swagger.io/terms/", - "contact" : { - "email" : "apiteam@swagger.io" - }, - "license" : { - "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "host" : "petstore.swagger.io", - "basePath" : "/v2", - "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets", - "externalDocs" : { - "description" : "Find out more", - "url" : "http://swagger.io" - } - }, { - "name" : "store", - "description" : "Access to Petstore orders" - }, { - "name" : "user", - "description" : "Operations about user", - "externalDocs" : { - "description" : "Find out more about our store", - "url" : "http://swagger.io" - } - } ], - "schemes" : [ "http" ], - "paths" : { - "/pet" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "description" : "", - "operationId" : "addPet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "description" : "", - "operationId" : "updatePet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByStatus" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "status", - "in" : "query", - "description" : "Status values that need to be considered for filter", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByTags" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "tags", - "in" : "query", - "description" : "Tags to filter by", - "required" : true, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "deprecated" : true, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", - "description" : "Returns a single pet", - "operationId" : "getPetById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to return", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Pet" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", - "description" : "", - "operationId" : "updatePetWithForm", - "consumes" : [ "application/x-www-form-urlencoded" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet that needs to be updated", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "name", - "in" : "formData", - "description" : "Updated name of the pet", - "required" : false, - "type" : "string" - }, { - "name" : "status", - "in" : "formData", - "description" : "Updated status of the pet", - "required" : false, - "type" : "string" - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/x-www-form-urlencoded", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "description" : "", - "operationId" : "deletePet", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "required" : false, - "type" : "string" - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", - "description" : "", - "operationId" : "uploadFile", - "consumes" : [ "multipart/form-data" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to update", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "additionalMetadata", - "in" : "formData", - "description" : "Additional data to pass to server", - "required" : false, - "type" : "string" - }, { - "name" : "file", - "in" : "formData", - "description" : "file to upload", - "required" : false, - "type" : "file" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/ApiResponse" - } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "multipart/form-data", - "x-accepts" : "application/json" - } - }, - "/store/inventory" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "produces" : [ "application/json" ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } - } - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order" : { - "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", - "description" : "", - "operationId" : "placeOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "order placed for purchasing the pet", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Order" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid Order" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order/{orderId}" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of pet that needs to be fetched", - "required" : true, - "type" : "integer", - "maximum" : 5, - "minimum" : 1, - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Create user", - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Created user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithArray" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithArrayInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithList" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithListInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/login" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", - "description" : "", - "operationId" : "loginUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "query", - "description" : "The user name for login", - "required" : true, - "type" : "string" - }, { - "name" : "password", - "in" : "query", - "description" : "The password for login in clear text", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "string" - }, - "headers" : { - "X-Rate-Limit" : { - "type" : "integer", - "format" : "int32", - "description" : "calls per hour allowed by the user" - }, - "X-Expires-After" : { - "type" : "string", - "format" : "date-time", - "description" : "date in UTC when toekn expires" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/logout" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", - "description" : "", - "operationId" : "logoutUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/{username}" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", - "description" : "", - "operationId" : "getUserByName", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be fetched. Use user1 for testing. ", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/User" - } - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "name that need to be deleted", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Updated user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - } - }, - "securityDefinitions" : { - "petstore_auth" : { - "type" : "oauth2", - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "flow" : "implicit", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - }, - "api_key" : { - "type" : "apiKey", - "name" : "api_key", - "in" : "header" - } - }, - "definitions" : { - "Order" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "petId" : { - "type" : "integer", - "format" : "int64" - }, - "quantity" : { - "type" : "integer", - "format" : "int32" - }, - "shipDate" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] - }, - "complete" : { - "type" : "boolean", - "default" : false - } - }, - "title" : "Pet Order", - "description" : "An order for a pets from the pet store", - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet catehgry", - "description" : "A category for a pet", - "xml" : { - "name" : "Category" - } - }, - "User" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "type" : "integer", - "format" : "int32", - "description" : "User Status" - } - }, - "title" : "a User", - "description" : "A User who is purchasing from the pet store", - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "description" : "A tag for a pet", - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "type" : "object", - "required" : [ "name", "photoUrls" ], - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "category" : { - "$ref" : "#/definitions/Category" - }, - "name" : { - "type" : "string", - "example" : "doggie" - }, - "photoUrls" : { - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - }, - "items" : { - "type" : "string" - } - }, - "tags" : { - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - }, - "items" : { - "$ref" : "#/definitions/Tag" - } - }, - "status" : { - "type" : "string", - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] - } - }, - "title" : "a Pet", - "description" : "A pet for sale in the pet store", - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "integer", - "format" : "int32" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "description" : "Describes the result of uploading an image resource" - } - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - } +{ + "swagger" : "2.0", + "info" : { + "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "version" : "1.0.0", + "title" : "Swagger Petstore", + "termsOfService" : "http://swagger.io/terms/", + "contact" : { + "email" : "apiteam@swagger.io" + }, + "license" : { + "name" : "Apache-2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "host" : "petstore.swagger.io", + "basePath" : "/v2", + "tags" : [ { + "name" : "pet", + "description" : "Everything about your Pets", + "externalDocs" : { + "description" : "Find out more", + "url" : "http://swagger.io" + } + }, { + "name" : "store", + "description" : "Access to Petstore orders" + }, { + "name" : "user", + "description" : "Operations about user", + "externalDocs" : { + "description" : "Find out more about our store", + "url" : "http://swagger.io" + } + } ], + "schemes" : [ "http" ], + "paths" : { + "/pet" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "Add a new pet to the store", + "description" : "", + "operationId" : "addPet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "pet" ], + "summary" : "Update an existing pet", + "description" : "", + "operationId" : "updatePet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + }, + "405" : { + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/pet/findByStatus" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by status", + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "status", + "in" : "query", + "description" : "Status values that need to be considered for filter", + "required" : true, + "type" : "array", + "items" : { + "type" : "string", + "default" : "available", + "enum" : [ "available", "pending", "sold" ] + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid status value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/findByTags" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by tags", + "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId" : "findPetsByTags", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "tags", + "in" : "query", + "description" : "Tags to filter by", + "required" : true, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid tag value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "deprecated" : true, + "x-accepts" : "application/json" + } + }, + "/pet/{petId}" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Find pet by ID", + "description" : "Returns a single pet", + "operationId" : "getPetById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to return", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Pet" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + }, + "post" : { + "tags" : [ "pet" ], + "summary" : "Updates a pet in the store with form data", + "description" : "", + "operationId" : "updatePetWithForm", + "consumes" : [ "application/x-www-form-urlencoded" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet that needs to be updated", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "name", + "in" : "formData", + "description" : "Updated name of the pet", + "required" : false, + "type" : "string" + }, { + "name" : "status", + "in" : "formData", + "description" : "Updated status of the pet", + "required" : false, + "type" : "string" + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/x-www-form-urlencoded", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "pet" ], + "summary" : "Deletes a pet", + "description" : "", + "operationId" : "deletePet", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "api_key", + "in" : "header", + "required" : false, + "type" : "string" + }, { + "name" : "petId", + "in" : "path", + "description" : "Pet id to delete", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "400" : { + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/{petId}/uploadImage" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "description" : "", + "operationId" : "uploadFile", + "consumes" : [ "multipart/form-data" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "additionalMetadata", + "in" : "formData", + "description" : "Additional data to pass to server", + "required" : false, + "type" : "string" + }, { + "name" : "file", + "in" : "formData", + "description" : "file to upload", + "required" : false, + "type" : "file" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/ApiResponse" + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "multipart/form-data", + "x-accepts" : "application/json" + } + }, + "/store/inventory" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Returns pet inventories by status", + "description" : "Returns a map of status codes to quantities", + "operationId" : "getInventory", + "produces" : [ "application/json" ], + "parameters" : [ ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int32" + } + } + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + } + }, + "/store/order" : { + "post" : { + "tags" : [ "store" ], + "summary" : "Place an order for a pet", + "description" : "", + "operationId" : "placeOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "order placed for purchasing the pet", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Order" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid Order" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/store/order/{orderId}" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Find purchase order by ID", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId" : "getOrderById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of pet that needs to be fetched", + "required" : true, + "type" : "integer", + "maximum" : 5, + "minimum" : 1, + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "store" ], + "summary" : "Delete purchase order by ID", + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of the order that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + } + }, + "/user" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Create user", + "description" : "This can only be done by the logged in user.", + "operationId" : "createUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Created user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithArray" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithArrayInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithList" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithListInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/login" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs user into the system", + "description" : "", + "operationId" : "loginUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "query", + "description" : "The user name for login", + "required" : true, + "type" : "string" + }, { + "name" : "password", + "in" : "query", + "description" : "The password for login in clear text", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "string" + }, + "headers" : { + "X-Rate-Limit" : { + "type" : "integer", + "format" : "int32", + "description" : "calls per hour allowed by the user" + }, + "X-Expires-After" : { + "type" : "string", + "format" : "date-time", + "description" : "date in UTC when toekn expires" + } + } + }, + "400" : { + "description" : "Invalid username/password supplied" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/logout" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs out current logged in user session", + "description" : "", + "operationId" : "logoutUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/{username}" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Get user by user name", + "description" : "", + "operationId" : "getUserByName", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be fetched. Use user1 for testing. ", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/User" + } + }, + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "user" ], + "summary" : "Updated user", + "description" : "This can only be done by the logged in user.", + "operationId" : "updateUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "name that need to be deleted", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Updated user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid user supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "user" ], + "summary" : "Delete user", + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + } + } + }, + "securityDefinitions" : { + "petstore_auth" : { + "type" : "oauth2", + "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", + "flow" : "implicit", + "scopes" : { + "write:pets" : "modify pets in your account", + "read:pets" : "read your pets" + } + }, + "api_key" : { + "type" : "apiKey", + "name" : "api_key", + "in" : "header" + } + }, + "definitions" : { + "Order" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "petId" : { + "type" : "integer", + "format" : "int64" + }, + "quantity" : { + "type" : "integer", + "format" : "int32" + }, + "shipDate" : { + "type" : "string", + "format" : "date-time" + }, + "status" : { + "type" : "string", + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ] + }, + "complete" : { + "type" : "boolean", + "default" : false + } + }, + "title" : "Pet Order", + "description" : "An order for a pets from the pet store", + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet catehgry", + "description" : "A category for a pet", + "xml" : { + "name" : "Category" + } + }, + "User" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string", + "x-obfuscated" : true + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "type" : "integer", + "format" : "int32", + "description" : "User Status" + } + }, + "title" : "a User", + "description" : "A User who is purchasing from the pet store", + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet Tag", + "description" : "A tag for a pet", + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "type" : "object", + "required" : [ "name", "photoUrls" ], + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "category" : { + "$ref" : "#/definitions/Category" + }, + "name" : { + "type" : "string", + "example" : "doggie" + }, + "photoUrls" : { + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + }, + "items" : { + "type" : "string" + } + }, + "tags" : { + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + }, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "status" : { + "type" : "string", + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ] + } + }, + "title" : "a Pet", + "description" : "A pet for sale in the pet store", + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + }, + "title" : "An uploaded response", + "description" : "Describes the result of uploading an image resource" + } + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/CategoryTest.java b/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/CategoryTest.java new file mode 100644 index 00000000000..85daf204ebd --- /dev/null +++ b/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/CategoryTest.java @@ -0,0 +1,53 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.server.api.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.server.api.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/ModelApiResponseTest.java b/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..4d7fb0a94dc --- /dev/null +++ b/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/ModelApiResponseTest.java @@ -0,0 +1,53 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.server.api.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.server.api.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/OrderTest.java b/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/OrderTest.java new file mode 100644 index 00000000000..991b17799aa --- /dev/null +++ b/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/OrderTest.java @@ -0,0 +1,55 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.server.api.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.server.api.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/PetTest.java b/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/PetTest.java new file mode 100644 index 00000000000..ca6e7afc89d --- /dev/null +++ b/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/PetTest.java @@ -0,0 +1,58 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.server.api.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.server.api.model.Category; +import io.swagger.server.api.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.server.api.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/TagTest.java b/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/TagTest.java new file mode 100644 index 00000000000..0c629c11aa2 --- /dev/null +++ b/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/TagTest.java @@ -0,0 +1,53 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.server.api.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.server.api.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/UserTest.java b/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/UserTest.java new file mode 100644 index 00000000000..931146c94b0 --- /dev/null +++ b/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/UserTest.java @@ -0,0 +1,63 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.server.api.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.server.api.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/util/ModelTestUtils.java b/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..9e34f5dccea --- /dev/null +++ b/samples/server/petstore/java-vertx/async/src/test/java/io/swagger/server/api/model/util/ModelTestUtils.java @@ -0,0 +1,100 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.server.api.model.util; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/rx/README.md b/samples/server/petstore/java-vertx/rx/README.md index 4e3fdccda9f..85d076cd5d0 100644 --- a/samples/server/petstore/java-vertx/rx/README.md +++ b/samples/server/petstore/java-vertx/rx/README.md @@ -1 +1 @@ -Project generated on : 2017-07-08T16:03:26.358+02:00 +Project generated on : 2017-12-02T18:46:11.134+02:00 diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Category.java b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Category.java index 10659635427..f6ecb922f32 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Category.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.server.api.model; import java.util.Objects; @@ -74,10 +87,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/ModelApiResponse.java b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/ModelApiResponse.java index ef5261c7edb..df92d698933 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/ModelApiResponse.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.server.api.model; import java.util.Objects; @@ -87,10 +100,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Order.java b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Order.java index 0eaaa46f352..32eb2ce7e5d 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Order.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.server.api.model; import java.util.Objects; @@ -148,10 +161,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Pet.java b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Pet.java index e975a8dc2b2..c6e1a685811 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Pet.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.server.api.model; import java.util.Objects; @@ -151,10 +164,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Tag.java b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Tag.java index f00a458e3d7..c407734cbbe 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Tag.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.server.api.model; import java.util.Objects; @@ -74,10 +87,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/User.java b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/User.java index 6e7331cd236..dfaa71d809c 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/User.java +++ b/samples/server/petstore/java-vertx/rx/src/main/java/io/swagger/server/api/model/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.server.api.model; import java.util.Objects; @@ -141,7 +154,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -152,10 +165,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/java-vertx/rx/src/main/resources/swagger.json b/samples/server/petstore/java-vertx/rx/src/main/resources/swagger.json index fb60866f1b8..3465cf2623e 100644 --- a/samples/server/petstore/java-vertx/rx/src/main/resources/swagger.json +++ b/samples/server/petstore/java-vertx/rx/src/main/resources/swagger.json @@ -1,871 +1,861 @@ -{ - "swagger" : "2.0", - "info" : { - "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - "version" : "1.0.0", - "title" : "Swagger Petstore", - "termsOfService" : "http://swagger.io/terms/", - "contact" : { - "email" : "apiteam@swagger.io" - }, - "license" : { - "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "host" : "petstore.swagger.io", - "basePath" : "/v2", - "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets", - "externalDocs" : { - "description" : "Find out more", - "url" : "http://swagger.io" - } - }, { - "name" : "store", - "description" : "Access to Petstore orders" - }, { - "name" : "user", - "description" : "Operations about user", - "externalDocs" : { - "description" : "Find out more about our store", - "url" : "http://swagger.io" - } - } ], - "schemes" : [ "http" ], - "paths" : { - "/pet" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "description" : "", - "operationId" : "addPet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "description" : "", - "operationId" : "updatePet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByStatus" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "status", - "in" : "query", - "description" : "Status values that need to be considered for filter", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByTags" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "tags", - "in" : "query", - "description" : "Tags to filter by", - "required" : true, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "deprecated" : true, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", - "description" : "Returns a single pet", - "operationId" : "getPetById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to return", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Pet" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", - "description" : "", - "operationId" : "updatePetWithForm", - "consumes" : [ "application/x-www-form-urlencoded" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet that needs to be updated", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "name", - "in" : "formData", - "description" : "Updated name of the pet", - "required" : false, - "type" : "string" - }, { - "name" : "status", - "in" : "formData", - "description" : "Updated status of the pet", - "required" : false, - "type" : "string" - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/x-www-form-urlencoded", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "description" : "", - "operationId" : "deletePet", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "required" : false, - "type" : "string" - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", - "description" : "", - "operationId" : "uploadFile", - "consumes" : [ "multipart/form-data" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to update", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "additionalMetadata", - "in" : "formData", - "description" : "Additional data to pass to server", - "required" : false, - "type" : "string" - }, { - "name" : "file", - "in" : "formData", - "description" : "file to upload", - "required" : false, - "type" : "file" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/ApiResponse" - } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "multipart/form-data", - "x-accepts" : "application/json" - } - }, - "/store/inventory" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "produces" : [ "application/json" ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } - } - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order" : { - "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", - "description" : "", - "operationId" : "placeOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "order placed for purchasing the pet", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Order" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid Order" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order/{orderId}" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of pet that needs to be fetched", - "required" : true, - "type" : "integer", - "maximum" : 5, - "minimum" : 1, - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Create user", - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Created user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithArray" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithArrayInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithList" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithListInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/login" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", - "description" : "", - "operationId" : "loginUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "query", - "description" : "The user name for login", - "required" : true, - "type" : "string" - }, { - "name" : "password", - "in" : "query", - "description" : "The password for login in clear text", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "string" - }, - "headers" : { - "X-Rate-Limit" : { - "type" : "integer", - "format" : "int32", - "description" : "calls per hour allowed by the user" - }, - "X-Expires-After" : { - "type" : "string", - "format" : "date-time", - "description" : "date in UTC when toekn expires" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/logout" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", - "description" : "", - "operationId" : "logoutUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/{username}" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", - "description" : "", - "operationId" : "getUserByName", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be fetched. Use user1 for testing. ", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/User" - } - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "name that need to be deleted", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Updated user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - } - }, - "securityDefinitions" : { - "petstore_auth" : { - "type" : "oauth2", - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "flow" : "implicit", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - }, - "api_key" : { - "type" : "apiKey", - "name" : "api_key", - "in" : "header" - } - }, - "definitions" : { - "Order" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "petId" : { - "type" : "integer", - "format" : "int64" - }, - "quantity" : { - "type" : "integer", - "format" : "int32" - }, - "shipDate" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] - }, - "complete" : { - "type" : "boolean", - "default" : false - } - }, - "title" : "Pet Order", - "description" : "An order for a pets from the pet store", - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet catehgry", - "description" : "A category for a pet", - "xml" : { - "name" : "Category" - } - }, - "User" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "type" : "integer", - "format" : "int32", - "description" : "User Status" - } - }, - "title" : "a User", - "description" : "A User who is purchasing from the pet store", - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "description" : "A tag for a pet", - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "type" : "object", - "required" : [ "name", "photoUrls" ], - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "category" : { - "$ref" : "#/definitions/Category" - }, - "name" : { - "type" : "string", - "example" : "doggie" - }, - "photoUrls" : { - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - }, - "items" : { - "type" : "string" - } - }, - "tags" : { - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - }, - "items" : { - "$ref" : "#/definitions/Tag" - } - }, - "status" : { - "type" : "string", - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] - } - }, - "title" : "a Pet", - "description" : "A pet for sale in the pet store", - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "integer", - "format" : "int32" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "description" : "Describes the result of uploading an image resource" - } - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - } +{ + "swagger" : "2.0", + "info" : { + "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "version" : "1.0.0", + "title" : "Swagger Petstore", + "termsOfService" : "http://swagger.io/terms/", + "contact" : { + "email" : "apiteam@swagger.io" + }, + "license" : { + "name" : "Apache-2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "host" : "petstore.swagger.io", + "basePath" : "/v2", + "tags" : [ { + "name" : "pet", + "description" : "Everything about your Pets", + "externalDocs" : { + "description" : "Find out more", + "url" : "http://swagger.io" + } + }, { + "name" : "store", + "description" : "Access to Petstore orders" + }, { + "name" : "user", + "description" : "Operations about user", + "externalDocs" : { + "description" : "Find out more about our store", + "url" : "http://swagger.io" + } + } ], + "schemes" : [ "http" ], + "paths" : { + "/pet" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "Add a new pet to the store", + "description" : "", + "operationId" : "addPet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "pet" ], + "summary" : "Update an existing pet", + "description" : "", + "operationId" : "updatePet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + }, + "405" : { + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/pet/findByStatus" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by status", + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "status", + "in" : "query", + "description" : "Status values that need to be considered for filter", + "required" : true, + "type" : "array", + "items" : { + "type" : "string", + "default" : "available", + "enum" : [ "available", "pending", "sold" ] + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid status value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/findByTags" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by tags", + "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId" : "findPetsByTags", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "tags", + "in" : "query", + "description" : "Tags to filter by", + "required" : true, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid tag value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "deprecated" : true, + "x-accepts" : "application/json" + } + }, + "/pet/{petId}" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Find pet by ID", + "description" : "Returns a single pet", + "operationId" : "getPetById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to return", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Pet" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + }, + "post" : { + "tags" : [ "pet" ], + "summary" : "Updates a pet in the store with form data", + "description" : "", + "operationId" : "updatePetWithForm", + "consumes" : [ "application/x-www-form-urlencoded" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet that needs to be updated", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "name", + "in" : "formData", + "description" : "Updated name of the pet", + "required" : false, + "type" : "string" + }, { + "name" : "status", + "in" : "formData", + "description" : "Updated status of the pet", + "required" : false, + "type" : "string" + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/x-www-form-urlencoded", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "pet" ], + "summary" : "Deletes a pet", + "description" : "", + "operationId" : "deletePet", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "api_key", + "in" : "header", + "required" : false, + "type" : "string" + }, { + "name" : "petId", + "in" : "path", + "description" : "Pet id to delete", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "400" : { + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/{petId}/uploadImage" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "description" : "", + "operationId" : "uploadFile", + "consumes" : [ "multipart/form-data" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "additionalMetadata", + "in" : "formData", + "description" : "Additional data to pass to server", + "required" : false, + "type" : "string" + }, { + "name" : "file", + "in" : "formData", + "description" : "file to upload", + "required" : false, + "type" : "file" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/ApiResponse" + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "multipart/form-data", + "x-accepts" : "application/json" + } + }, + "/store/inventory" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Returns pet inventories by status", + "description" : "Returns a map of status codes to quantities", + "operationId" : "getInventory", + "produces" : [ "application/json" ], + "parameters" : [ ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int32" + } + } + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + } + }, + "/store/order" : { + "post" : { + "tags" : [ "store" ], + "summary" : "Place an order for a pet", + "description" : "", + "operationId" : "placeOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "order placed for purchasing the pet", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Order" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid Order" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/store/order/{orderId}" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Find purchase order by ID", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId" : "getOrderById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of pet that needs to be fetched", + "required" : true, + "type" : "integer", + "maximum" : 5, + "minimum" : 1, + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "store" ], + "summary" : "Delete purchase order by ID", + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of the order that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + } + }, + "/user" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Create user", + "description" : "This can only be done by the logged in user.", + "operationId" : "createUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Created user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithArray" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithArrayInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithList" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithListInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/login" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs user into the system", + "description" : "", + "operationId" : "loginUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "query", + "description" : "The user name for login", + "required" : true, + "type" : "string" + }, { + "name" : "password", + "in" : "query", + "description" : "The password for login in clear text", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "string" + }, + "headers" : { + "X-Rate-Limit" : { + "type" : "integer", + "format" : "int32", + "description" : "calls per hour allowed by the user" + }, + "X-Expires-After" : { + "type" : "string", + "format" : "date-time", + "description" : "date in UTC when toekn expires" + } + } + }, + "400" : { + "description" : "Invalid username/password supplied" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/logout" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs out current logged in user session", + "description" : "", + "operationId" : "logoutUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/{username}" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Get user by user name", + "description" : "", + "operationId" : "getUserByName", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be fetched. Use user1 for testing. ", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/User" + } + }, + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "user" ], + "summary" : "Updated user", + "description" : "This can only be done by the logged in user.", + "operationId" : "updateUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "name that need to be deleted", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Updated user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid user supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "user" ], + "summary" : "Delete user", + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + } + } + }, + "securityDefinitions" : { + "petstore_auth" : { + "type" : "oauth2", + "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", + "flow" : "implicit", + "scopes" : { + "write:pets" : "modify pets in your account", + "read:pets" : "read your pets" + } + }, + "api_key" : { + "type" : "apiKey", + "name" : "api_key", + "in" : "header" + } + }, + "definitions" : { + "Order" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "petId" : { + "type" : "integer", + "format" : "int64" + }, + "quantity" : { + "type" : "integer", + "format" : "int32" + }, + "shipDate" : { + "type" : "string", + "format" : "date-time" + }, + "status" : { + "type" : "string", + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ] + }, + "complete" : { + "type" : "boolean", + "default" : false + } + }, + "title" : "Pet Order", + "description" : "An order for a pets from the pet store", + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet catehgry", + "description" : "A category for a pet", + "xml" : { + "name" : "Category" + } + }, + "User" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string", + "x-obfuscated" : true + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "type" : "integer", + "format" : "int32", + "description" : "User Status" + } + }, + "title" : "a User", + "description" : "A User who is purchasing from the pet store", + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet Tag", + "description" : "A tag for a pet", + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "type" : "object", + "required" : [ "name", "photoUrls" ], + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "category" : { + "$ref" : "#/definitions/Category" + }, + "name" : { + "type" : "string", + "example" : "doggie" + }, + "photoUrls" : { + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + }, + "items" : { + "type" : "string" + } + }, + "tags" : { + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + }, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "status" : { + "type" : "string", + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ] + } + }, + "title" : "a Pet", + "description" : "A pet for sale in the pet store", + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + }, + "title" : "An uploaded response", + "description" : "Describes the result of uploading an image resource" + } + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + } } \ No newline at end of file diff --git a/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/CategoryTest.java b/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/CategoryTest.java new file mode 100644 index 00000000000..85daf204ebd --- /dev/null +++ b/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/CategoryTest.java @@ -0,0 +1,53 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.server.api.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.server.api.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/ModelApiResponseTest.java b/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..4d7fb0a94dc --- /dev/null +++ b/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/ModelApiResponseTest.java @@ -0,0 +1,53 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.server.api.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.server.api.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/OrderTest.java b/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/OrderTest.java new file mode 100644 index 00000000000..991b17799aa --- /dev/null +++ b/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/OrderTest.java @@ -0,0 +1,55 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.server.api.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.server.api.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/PetTest.java b/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/PetTest.java new file mode 100644 index 00000000000..ca6e7afc89d --- /dev/null +++ b/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/PetTest.java @@ -0,0 +1,58 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.server.api.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.server.api.model.Category; +import io.swagger.server.api.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.server.api.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/TagTest.java b/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/TagTest.java new file mode 100644 index 00000000000..0c629c11aa2 --- /dev/null +++ b/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/TagTest.java @@ -0,0 +1,53 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.server.api.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.server.api.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/UserTest.java b/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/UserTest.java new file mode 100644 index 00000000000..931146c94b0 --- /dev/null +++ b/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/UserTest.java @@ -0,0 +1,63 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.server.api.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.server.api.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/util/ModelTestUtils.java b/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..9e34f5dccea --- /dev/null +++ b/samples/server/petstore/java-vertx/rx/src/test/java/io/swagger/server/api/model/util/ModelTestUtils.java @@ -0,0 +1,100 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.server.api.model.util; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.swagger-codegen-ignore b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.swagger-codegen-ignore index c5fa491b4c5..70b88e71039 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.swagger-codegen-ignore +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.swagger-codegen-ignore @@ -21,3 +21,5 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md + +**/impl/* \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java index 9a1956aae8c..9df036feaa7 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Category.java @@ -1,3 +1,28 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -76,10 +101,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java index 51ffbeff6da..a08985c0651 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,3 +1,28 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -97,10 +122,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java index dac33686761..8f632d73212 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Order.java @@ -1,3 +1,28 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -200,10 +225,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java index 3c8ab5da478..842ff8eb247 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Pet.java @@ -1,3 +1,28 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -215,10 +240,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java index 24fd1d55d2a..e6bdb14e845 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/Tag.java @@ -1,3 +1,28 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -76,10 +101,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java index 858e8e14268..9b1fbee8881 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/io/swagger/model/User.java @@ -1,3 +1,28 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -194,7 +219,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -205,10 +230,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/PetApiTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/PetApiTest.java index bbb67c24390..95743b0f965 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/PetApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/PetApiTest.java @@ -49,7 +49,11 @@ /** - * API tests for PetApi + * Swagger Petstore + * + *

This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * API tests for PetApi */ public class PetApiTest { @@ -80,7 +84,7 @@ public void setup() { @Test public void addPetTest() { Pet body = null; - //api.addPet(body); + //api.addPet(body); // TODO: test validations @@ -99,7 +103,7 @@ public void addPetTest() { public void deletePetTest() { Long petId = null; String apiKey = null; - //api.deletePet(petId, apiKey); + //api.deletePet(petId, apiKey); // TODO: test validations @@ -117,7 +121,7 @@ public void deletePetTest() { @Test public void findPetsByStatusTest() { List status = null; - //List response = api.findPetsByStatus(status); + //List response = api.findPetsByStatus(status); //assertNotNull(response); // TODO: test validations @@ -135,7 +139,7 @@ public void findPetsByStatusTest() { @Test public void findPetsByTagsTest() { List tags = null; - //List response = api.findPetsByTags(tags); + //List response = api.findPetsByTags(tags); //assertNotNull(response); // TODO: test validations @@ -153,7 +157,7 @@ public void findPetsByTagsTest() { @Test public void getPetByIdTest() { Long petId = null; - //Pet response = api.getPetById(petId); + //Pet response = api.getPetById(petId); //assertNotNull(response); // TODO: test validations @@ -171,7 +175,7 @@ public void getPetByIdTest() { @Test public void updatePetTest() { Pet body = null; - //api.updatePet(body); + //api.updatePet(body); // TODO: test validations @@ -191,7 +195,7 @@ public void updatePetWithFormTest() { Long petId = null; String name = null; String status = null; - //api.updatePetWithForm(petId, name, status); + //api.updatePetWithForm(petId, name, status); // TODO: test validations @@ -211,7 +215,7 @@ public void uploadFileTest() { Long petId = null; String additionalMetadata = null; org.apache.cxf.jaxrs.ext.multipart.Attachment file = null; - //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); + //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); //assertNotNull(response); // TODO: test validations diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/StoreApiTest.java index af89e255a9f..721e05dfd97 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/StoreApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/StoreApiTest.java @@ -48,7 +48,11 @@ /** - * API tests for StoreApi + * Swagger Petstore + * + *

This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * API tests for StoreApi */ public class StoreApiTest { @@ -79,7 +83,7 @@ public void setup() { @Test public void deleteOrderTest() { String orderId = null; - //api.deleteOrder(orderId); + //api.deleteOrder(orderId); // TODO: test validations @@ -96,7 +100,7 @@ public void deleteOrderTest() { */ @Test public void getInventoryTest() { - //Map response = api.getInventory(); + //Map response = api.getInventory(); //assertNotNull(response); // TODO: test validations @@ -114,7 +118,7 @@ public void getInventoryTest() { @Test public void getOrderByIdTest() { Long orderId = null; - //Order response = api.getOrderById(orderId); + //Order response = api.getOrderById(orderId); //assertNotNull(response); // TODO: test validations @@ -132,7 +136,7 @@ public void getOrderByIdTest() { @Test public void placeOrderTest() { Order body = null; - //Order response = api.placeOrder(body); + //Order response = api.placeOrder(body); //assertNotNull(response); // TODO: test validations diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/UserApiTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/UserApiTest.java index f789f0fc936..51afe6cc6f2 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/UserApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/api/UserApiTest.java @@ -48,7 +48,11 @@ /** - * API tests for UserApi + * Swagger Petstore + * + *

This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * API tests for UserApi */ public class UserApiTest { @@ -79,7 +83,7 @@ public void setup() { @Test public void createUserTest() { User body = null; - //api.createUser(body); + //api.createUser(body); // TODO: test validations @@ -97,7 +101,7 @@ public void createUserTest() { @Test public void createUsersWithArrayInputTest() { List body = null; - //api.createUsersWithArrayInput(body); + //api.createUsersWithArrayInput(body); // TODO: test validations @@ -115,7 +119,7 @@ public void createUsersWithArrayInputTest() { @Test public void createUsersWithListInputTest() { List body = null; - //api.createUsersWithListInput(body); + //api.createUsersWithListInput(body); // TODO: test validations @@ -133,7 +137,7 @@ public void createUsersWithListInputTest() { @Test public void deleteUserTest() { String username = null; - //api.deleteUser(username); + //api.deleteUser(username); // TODO: test validations @@ -151,7 +155,7 @@ public void deleteUserTest() { @Test public void getUserByNameTest() { String username = null; - //User response = api.getUserByName(username); + //User response = api.getUserByName(username); //assertNotNull(response); // TODO: test validations @@ -170,7 +174,7 @@ public void getUserByNameTest() { public void loginUserTest() { String username = null; String password = null; - //String response = api.loginUser(username, password); + //String response = api.loginUser(username, password); //assertNotNull(response); // TODO: test validations @@ -187,7 +191,7 @@ public void loginUserTest() { */ @Test public void logoutUserTest() { - //api.logoutUser(); + //api.logoutUser(); // TODO: test validations @@ -206,7 +210,7 @@ public void logoutUserTest() { public void updateUserTest() { String username = null; User body = null; - //api.updateUser(username, body); + //api.updateUser(username, body); // TODO: test validations diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..4892e274437 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,61 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..f996dd75012 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,61 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..904694865d4 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,62 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; +import java.util.Date; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..a14ea176bae --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,65 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..b6b64f3da08 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,61 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..da53d871e20 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,71 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..0df247d3030 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,100 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/pom.xml b/samples/server/petstore/jaxrs-cxf-cdi/pom.xml index 94292deb437..573bc25bed1 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-cdi/pom.xml @@ -5,11 +5,9 @@ war swagger-jaxrs-cxf-cdi-server 1.0.0 - src/main/java - @@ -31,7 +29,6 @@ - maven-war-plugin @@ -42,9 +39,7 @@ - - javax @@ -52,7 +47,6 @@ 7.0 provided - org.apache.cxf @@ -62,21 +56,18 @@ 3.0.2 provided - com.fasterxml.jackson.jaxrs jackson-jaxrs-json-provider [2.8.3,3) - io.swagger swagger-annotations [1.5.3,1.5.16] - javax.validation @@ -84,7 +75,14 @@ 1.1.0.Final provided - + + junit + junit + ${junit-version} + test + - + + 4.12 + diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Category.java index 92a3fc286e3..8a7ac379f4d 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import com.fasterxml.jackson.annotation.JsonProperty; @@ -90,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/ModelApiResponse.java index becb77ed19e..15e285535ba 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import com.fasterxml.jackson.annotation.JsonProperty; @@ -110,9 +123,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Order.java index e5e8aacb1a5..36ab035b631 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import com.fasterxml.jackson.annotation.JsonProperty; @@ -204,9 +217,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Pet.java index c8868b563d0..1aa8fde7fb3 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import com.fasterxml.jackson.annotation.JsonProperty; @@ -210,9 +223,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Tag.java index 42f36861a08..b812abc6c1d 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import com.fasterxml.jackson.annotation.JsonProperty; @@ -90,9 +103,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/User.java index e8cfc7d6b1d..e6fc165b625 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/io/swagger/model/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import com.fasterxml.jackson.annotation.JsonProperty; @@ -199,7 +212,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -211,9 +224,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/RestApplication.java b/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/RestApplication.java index 3b43beeb9be..1ae54938776 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/RestApplication.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/main/java/io/swagger/api/RestApplication.java @@ -1,9 +1,9 @@ -package io.swagger.api; - -import javax.ws.rs.ApplicationPath; -import javax.ws.rs.core.Application; - -@ApplicationPath("/") -public class RestApplication extends Application { - // Add implementation-specific details here +package io.swagger.api; + +import javax.ws.rs.ApplicationPath; +import javax.ws.rs.core.Application; + +@ApplicationPath("/") +public class RestApplication extends Application { + // Add implementation-specific details here } \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/main/webapp/WEB-INF/beans.xml b/samples/server/petstore/jaxrs-cxf-cdi/src/main/webapp/WEB-INF/beans.xml index f9f7d3d948b..cb6d500d43f 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/main/webapp/WEB-INF/beans.xml +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/main/webapp/WEB-INF/beans.xml @@ -1,13 +1,13 @@ - - - - - + + + + + \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..43c14b30018 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..ea2ba5abe94 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..5b2a76b7ef9 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..176a6166256 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,55 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..a3339988e9e --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..b8cbb0e1d1c --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,61 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..58c0478b89b --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,88 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-cdi/swagger.json b/samples/server/petstore/jaxrs-cxf-cdi/swagger.json index 46239b84287..f2d2e71cd1c 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/swagger.json +++ b/samples/server/petstore/jaxrs-cxf-cdi/swagger.json @@ -1,831 +1,832 @@ -{ - "swagger" : "2.0", - "info" : { - "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - "version" : "1.0.0", - "title" : "Swagger Petstore", - "termsOfService" : "http://swagger.io/terms/", - "contact" : { - "email" : "apiteam@swagger.io" - }, - "license" : { - "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "host" : "petstore.swagger.io", - "basePath" : "/v2", - "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets", - "externalDocs" : { - "description" : "Find out more", - "url" : "http://swagger.io" - } - }, { - "name" : "store", - "description" : "Access to Petstore orders" - }, { - "name" : "user", - "description" : "Operations about user", - "externalDocs" : { - "description" : "Find out more about our store", - "url" : "http://swagger.io" - } - } ], - "schemes" : [ "http" ], - "paths" : { - "/pet" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "description" : "", - "operationId" : "addPet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - }, - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "description" : "", - "operationId" : "updatePet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - } - }, - "/pet/findByStatus" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "status", - "in" : "query", - "description" : "Status values that need to be considered for filter", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "default" : "available", - "enum" : [ "available", "pending", "sold" ] - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - } - }, - "/pet/findByTags" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "tags", - "in" : "query", - "description" : "Tags to filter by", - "required" : true, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "deprecated" : true - } - }, - "/pet/{petId}" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", - "description" : "Returns a single pet", - "operationId" : "getPetById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to return", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Pet" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ] - }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", - "description" : "", - "operationId" : "updatePetWithForm", - "consumes" : [ "application/x-www-form-urlencoded" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet that needs to be updated", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "name", - "in" : "formData", - "description" : "Updated name of the pet", - "required" : false, - "type" : "string" - }, { - "name" : "status", - "in" : "formData", - "description" : "Updated status of the pet", - "required" : false, - "type" : "string" - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "description" : "", - "operationId" : "deletePet", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "required" : false, - "type" : "string" - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", - "description" : "", - "operationId" : "uploadFile", - "consumes" : [ "multipart/form-data" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to update", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "additionalMetadata", - "in" : "formData", - "description" : "Additional data to pass to server", - "required" : false, - "type" : "string" - }, { - "name" : "file", - "in" : "formData", - "description" : "file to upload", - "required" : false, - "type" : "file" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/ApiResponse" - } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - } - }, - "/store/inventory" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "produces" : [ "application/json" ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } - } - } - }, - "security" : [ { - "api_key" : [ ] - } ] - } - }, - "/store/order" : { - "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", - "description" : "", - "operationId" : "placeOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "order placed for purchasing the pet", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Order" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid Order" - } - } - } - }, - "/store/order/{orderId}" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of pet that needs to be fetched", - "required" : true, - "type" : "integer", - "maximum" : 5, - "minimum" : 1, - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - } - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - } - } - }, - "/user" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Create user", - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Created user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - } - } - }, - "/user/createWithArray" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithArrayInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - } - } - }, - "/user/createWithList" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithListInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - } - } - }, - "/user/login" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", - "description" : "", - "operationId" : "loginUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "query", - "description" : "The user name for login", - "required" : true, - "type" : "string" - }, { - "name" : "password", - "in" : "query", - "description" : "The password for login in clear text", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "string" - }, - "headers" : { - "X-Rate-Limit" : { - "type" : "integer", - "format" : "int32", - "description" : "calls per hour allowed by the user" - }, - "X-Expires-After" : { - "type" : "string", - "format" : "date-time", - "description" : "date in UTC when toekn expires" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - } - } - }, - "/user/logout" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", - "description" : "", - "operationId" : "logoutUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ ], - "responses" : { - "default" : { - "description" : "successful operation" - } - } - } - }, - "/user/{username}" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", - "description" : "", - "operationId" : "getUserByName", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be fetched. Use user1 for testing. ", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/User" - } - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - } - }, - "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "name that need to be deleted", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Updated user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - } - }, - "delete" : { - "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - } - } - } - }, - "securityDefinitions" : { - "petstore_auth" : { - "type" : "oauth2", - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "flow" : "implicit", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - }, - "api_key" : { - "type" : "apiKey", - "name" : "api_key", - "in" : "header" - } - }, - "definitions" : { - "Order" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "petId" : { - "type" : "integer", - "format" : "int64" - }, - "quantity" : { - "type" : "integer", - "format" : "int32" - }, - "shipDate" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] - }, - "complete" : { - "type" : "boolean", - "default" : false - } - }, - "title" : "Pet Order", - "description" : "An order for a pets from the pet store", - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet catehgry", - "description" : "A category for a pet", - "xml" : { - "name" : "Category" - } - }, - "User" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "type" : "integer", - "format" : "int32", - "description" : "User Status" - } - }, - "title" : "a User", - "description" : "A User who is purchasing from the pet store", - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "description" : "A tag for a pet", - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "type" : "object", - "required" : [ "name", "photoUrls" ], - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "category" : { - "$ref" : "#/definitions/Category" - }, - "name" : { - "type" : "string", - "example" : "doggie" - }, - "photoUrls" : { - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - }, - "items" : { - "type" : "string" - } - }, - "tags" : { - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - }, - "items" : { - "$ref" : "#/definitions/Tag" - } - }, - "status" : { - "type" : "string", - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] - } - }, - "title" : "a Pet", - "description" : "A pet for sale in the pet store", - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "integer", - "format" : "int32" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "description" : "Describes the result of uploading an image resource" - } - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - } +{ + "swagger" : "2.0", + "info" : { + "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "version" : "1.0.0", + "title" : "Swagger Petstore", + "termsOfService" : "http://swagger.io/terms/", + "contact" : { + "email" : "apiteam@swagger.io" + }, + "license" : { + "name" : "Apache-2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "host" : "petstore.swagger.io", + "basePath" : "/v2", + "tags" : [ { + "name" : "pet", + "description" : "Everything about your Pets", + "externalDocs" : { + "description" : "Find out more", + "url" : "http://swagger.io" + } + }, { + "name" : "store", + "description" : "Access to Petstore orders" + }, { + "name" : "user", + "description" : "Operations about user", + "externalDocs" : { + "description" : "Find out more about our store", + "url" : "http://swagger.io" + } + } ], + "schemes" : [ "http" ], + "paths" : { + "/pet" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "Add a new pet to the store", + "description" : "", + "operationId" : "addPet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + }, + "put" : { + "tags" : [ "pet" ], + "summary" : "Update an existing pet", + "description" : "", + "operationId" : "updatePet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + }, + "405" : { + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + } + }, + "/pet/findByStatus" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by status", + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "status", + "in" : "query", + "description" : "Status values that need to be considered for filter", + "required" : true, + "type" : "array", + "items" : { + "type" : "string", + "default" : "available", + "enum" : [ "available", "pending", "sold" ] + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid status value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + } + }, + "/pet/findByTags" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by tags", + "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId" : "findPetsByTags", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "tags", + "in" : "query", + "description" : "Tags to filter by", + "required" : true, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid tag value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "deprecated" : true + } + }, + "/pet/{petId}" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Find pet by ID", + "description" : "Returns a single pet", + "operationId" : "getPetById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to return", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Pet" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ] + }, + "post" : { + "tags" : [ "pet" ], + "summary" : "Updates a pet in the store with form data", + "description" : "", + "operationId" : "updatePetWithForm", + "consumes" : [ "application/x-www-form-urlencoded" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet that needs to be updated", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "name", + "in" : "formData", + "description" : "Updated name of the pet", + "required" : false, + "type" : "string" + }, { + "name" : "status", + "in" : "formData", + "description" : "Updated status of the pet", + "required" : false, + "type" : "string" + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + }, + "delete" : { + "tags" : [ "pet" ], + "summary" : "Deletes a pet", + "description" : "", + "operationId" : "deletePet", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "api_key", + "in" : "header", + "required" : false, + "type" : "string" + }, { + "name" : "petId", + "in" : "path", + "description" : "Pet id to delete", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "400" : { + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + } + }, + "/pet/{petId}/uploadImage" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "description" : "", + "operationId" : "uploadFile", + "consumes" : [ "multipart/form-data" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "additionalMetadata", + "in" : "formData", + "description" : "Additional data to pass to server", + "required" : false, + "type" : "string" + }, { + "name" : "file", + "in" : "formData", + "description" : "file to upload", + "required" : false, + "type" : "file" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/ApiResponse" + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + } + }, + "/store/inventory" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Returns pet inventories by status", + "description" : "Returns a map of status codes to quantities", + "operationId" : "getInventory", + "produces" : [ "application/json" ], + "parameters" : [ ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int32" + } + } + } + }, + "security" : [ { + "api_key" : [ ] + } ] + } + }, + "/store/order" : { + "post" : { + "tags" : [ "store" ], + "summary" : "Place an order for a pet", + "description" : "", + "operationId" : "placeOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "order placed for purchasing the pet", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Order" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid Order" + } + } + } + }, + "/store/order/{orderId}" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Find purchase order by ID", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId" : "getOrderById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of pet that needs to be fetched", + "required" : true, + "type" : "integer", + "maximum" : 5, + "minimum" : 1, + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + } + }, + "delete" : { + "tags" : [ "store" ], + "summary" : "Delete purchase order by ID", + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of the order that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + } + } + }, + "/user" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Create user", + "description" : "This can only be done by the logged in user.", + "operationId" : "createUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Created user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + } + } + }, + "/user/createWithArray" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithArrayInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + } + } + }, + "/user/createWithList" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithListInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + } + } + }, + "/user/login" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs user into the system", + "description" : "", + "operationId" : "loginUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "query", + "description" : "The user name for login", + "required" : true, + "type" : "string" + }, { + "name" : "password", + "in" : "query", + "description" : "The password for login in clear text", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "string" + }, + "headers" : { + "X-Rate-Limit" : { + "type" : "integer", + "format" : "int32", + "description" : "calls per hour allowed by the user" + }, + "X-Expires-After" : { + "type" : "string", + "format" : "date-time", + "description" : "date in UTC when toekn expires" + } + } + }, + "400" : { + "description" : "Invalid username/password supplied" + } + } + } + }, + "/user/logout" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs out current logged in user session", + "description" : "", + "operationId" : "logoutUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ ], + "responses" : { + "default" : { + "description" : "successful operation" + } + } + } + }, + "/user/{username}" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Get user by user name", + "description" : "", + "operationId" : "getUserByName", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be fetched. Use user1 for testing. ", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/User" + } + }, + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + } + }, + "put" : { + "tags" : [ "user" ], + "summary" : "Updated user", + "description" : "This can only be done by the logged in user.", + "operationId" : "updateUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "name that need to be deleted", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Updated user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid user supplied" + }, + "404" : { + "description" : "User not found" + } + } + }, + "delete" : { + "tags" : [ "user" ], + "summary" : "Delete user", + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + } + } + } + }, + "securityDefinitions" : { + "petstore_auth" : { + "type" : "oauth2", + "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", + "flow" : "implicit", + "scopes" : { + "write:pets" : "modify pets in your account", + "read:pets" : "read your pets" + } + }, + "api_key" : { + "type" : "apiKey", + "name" : "api_key", + "in" : "header" + } + }, + "definitions" : { + "Order" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "petId" : { + "type" : "integer", + "format" : "int64" + }, + "quantity" : { + "type" : "integer", + "format" : "int32" + }, + "shipDate" : { + "type" : "string", + "format" : "date-time" + }, + "status" : { + "type" : "string", + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ] + }, + "complete" : { + "type" : "boolean", + "default" : false + } + }, + "title" : "Pet Order", + "description" : "An order for a pets from the pet store", + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet catehgry", + "description" : "A category for a pet", + "xml" : { + "name" : "Category" + } + }, + "User" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string", + "x-obfuscated" : true + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "type" : "integer", + "format" : "int32", + "description" : "User Status" + } + }, + "title" : "a User", + "description" : "A User who is purchasing from the pet store", + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet Tag", + "description" : "A tag for a pet", + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "type" : "object", + "required" : [ "name", "photoUrls" ], + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "category" : { + "$ref" : "#/definitions/Category" + }, + "name" : { + "type" : "string", + "example" : "doggie" + }, + "photoUrls" : { + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + }, + "items" : { + "type" : "string" + } + }, + "tags" : { + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + }, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "status" : { + "type" : "string", + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ] + } + }, + "title" : "a Pet", + "description" : "A pet for sale in the pet store", + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + }, + "title" : "An uploaded response", + "description" : "Describes the result of uploading an image resource" + } + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + } } \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen-ignore b/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen-ignore index c5fa491b4c5..70b88e71039 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen-ignore +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.swagger-codegen-ignore @@ -21,3 +21,5 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md + +**/impl/* \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java index 9a1956aae8c..9df036feaa7 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Category.java @@ -1,3 +1,28 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -76,10 +101,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java index 51ffbeff6da..a08985c0651 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,3 +1,28 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -97,10 +122,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java index dac33686761..8f632d73212 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Order.java @@ -1,3 +1,28 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -200,10 +225,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java index 3c8ab5da478..842ff8eb247 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Pet.java @@ -1,3 +1,28 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -215,10 +240,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java index 24fd1d55d2a..e6bdb14e845 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/Tag.java @@ -1,3 +1,28 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -76,10 +101,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java index 858e8e14268..9b1fbee8881 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/io/swagger/model/User.java @@ -1,3 +1,28 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -194,7 +219,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -205,10 +230,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/PetApiTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/PetApiTest.java index bbb67c24390..95743b0f965 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/PetApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/PetApiTest.java @@ -49,7 +49,11 @@ /** - * API tests for PetApi + * Swagger Petstore + * + *

This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * API tests for PetApi */ public class PetApiTest { @@ -80,7 +84,7 @@ public void setup() { @Test public void addPetTest() { Pet body = null; - //api.addPet(body); + //api.addPet(body); // TODO: test validations @@ -99,7 +103,7 @@ public void addPetTest() { public void deletePetTest() { Long petId = null; String apiKey = null; - //api.deletePet(petId, apiKey); + //api.deletePet(petId, apiKey); // TODO: test validations @@ -117,7 +121,7 @@ public void deletePetTest() { @Test public void findPetsByStatusTest() { List status = null; - //List response = api.findPetsByStatus(status); + //List response = api.findPetsByStatus(status); //assertNotNull(response); // TODO: test validations @@ -135,7 +139,7 @@ public void findPetsByStatusTest() { @Test public void findPetsByTagsTest() { List tags = null; - //List response = api.findPetsByTags(tags); + //List response = api.findPetsByTags(tags); //assertNotNull(response); // TODO: test validations @@ -153,7 +157,7 @@ public void findPetsByTagsTest() { @Test public void getPetByIdTest() { Long petId = null; - //Pet response = api.getPetById(petId); + //Pet response = api.getPetById(petId); //assertNotNull(response); // TODO: test validations @@ -171,7 +175,7 @@ public void getPetByIdTest() { @Test public void updatePetTest() { Pet body = null; - //api.updatePet(body); + //api.updatePet(body); // TODO: test validations @@ -191,7 +195,7 @@ public void updatePetWithFormTest() { Long petId = null; String name = null; String status = null; - //api.updatePetWithForm(petId, name, status); + //api.updatePetWithForm(petId, name, status); // TODO: test validations @@ -211,7 +215,7 @@ public void uploadFileTest() { Long petId = null; String additionalMetadata = null; org.apache.cxf.jaxrs.ext.multipart.Attachment file = null; - //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); + //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); //assertNotNull(response); // TODO: test validations diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/StoreApiTest.java index af89e255a9f..721e05dfd97 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/StoreApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/StoreApiTest.java @@ -48,7 +48,11 @@ /** - * API tests for StoreApi + * Swagger Petstore + * + *

This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * API tests for StoreApi */ public class StoreApiTest { @@ -79,7 +83,7 @@ public void setup() { @Test public void deleteOrderTest() { String orderId = null; - //api.deleteOrder(orderId); + //api.deleteOrder(orderId); // TODO: test validations @@ -96,7 +100,7 @@ public void deleteOrderTest() { */ @Test public void getInventoryTest() { - //Map response = api.getInventory(); + //Map response = api.getInventory(); //assertNotNull(response); // TODO: test validations @@ -114,7 +118,7 @@ public void getInventoryTest() { @Test public void getOrderByIdTest() { Long orderId = null; - //Order response = api.getOrderById(orderId); + //Order response = api.getOrderById(orderId); //assertNotNull(response); // TODO: test validations @@ -132,7 +136,7 @@ public void getOrderByIdTest() { @Test public void placeOrderTest() { Order body = null; - //Order response = api.placeOrder(body); + //Order response = api.placeOrder(body); //assertNotNull(response); // TODO: test validations diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/UserApiTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/UserApiTest.java index f789f0fc936..51afe6cc6f2 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/UserApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/api/UserApiTest.java @@ -48,7 +48,11 @@ /** - * API tests for UserApi + * Swagger Petstore + * + *

This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * API tests for UserApi */ public class UserApiTest { @@ -79,7 +83,7 @@ public void setup() { @Test public void createUserTest() { User body = null; - //api.createUser(body); + //api.createUser(body); // TODO: test validations @@ -97,7 +101,7 @@ public void createUserTest() { @Test public void createUsersWithArrayInputTest() { List body = null; - //api.createUsersWithArrayInput(body); + //api.createUsersWithArrayInput(body); // TODO: test validations @@ -115,7 +119,7 @@ public void createUsersWithArrayInputTest() { @Test public void createUsersWithListInputTest() { List body = null; - //api.createUsersWithListInput(body); + //api.createUsersWithListInput(body); // TODO: test validations @@ -133,7 +137,7 @@ public void createUsersWithListInputTest() { @Test public void deleteUserTest() { String username = null; - //api.deleteUser(username); + //api.deleteUser(username); // TODO: test validations @@ -151,7 +155,7 @@ public void deleteUserTest() { @Test public void getUserByNameTest() { String username = null; - //User response = api.getUserByName(username); + //User response = api.getUserByName(username); //assertNotNull(response); // TODO: test validations @@ -170,7 +174,7 @@ public void getUserByNameTest() { public void loginUserTest() { String username = null; String password = null; - //String response = api.loginUser(username, password); + //String response = api.loginUser(username, password); //assertNotNull(response); // TODO: test validations @@ -187,7 +191,7 @@ public void loginUserTest() { */ @Test public void logoutUserTest() { - //api.logoutUser(); + //api.logoutUser(); // TODO: test validations @@ -206,7 +210,7 @@ public void logoutUserTest() { public void updateUserTest() { String username = null; User body = null; - //api.updateUser(username, body); + //api.updateUser(username, body); // TODO: test validations diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..4892e274437 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,61 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..f996dd75012 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,61 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..904694865d4 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,62 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; +import java.util.Date; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..a14ea176bae --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,65 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..b6b64f3da08 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,61 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..da53d871e20 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,71 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..0df247d3030 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,100 @@ +/** + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * 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.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf/.swagger-codegen-ignore b/samples/server/petstore/jaxrs-cxf/.swagger-codegen-ignore index e36d46f1344..70b88e71039 100644 --- a/samples/server/petstore/jaxrs-cxf/.swagger-codegen-ignore +++ b/samples/server/petstore/jaxrs-cxf/.swagger-codegen-ignore @@ -22,4 +22,4 @@ # Then explicitly reverse the ignore rule for a single file: #!docs/README.md -#**/impl/* +**/impl/* \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java index 353bc6e2cbc..ce26b6e4267 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import java.util.HashMap; @@ -84,10 +109,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Animal.java index 2962c676df8..e6f15f41c29 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Animal.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -74,10 +99,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AnimalFarm.java index f124292c31d..91d65f3220b 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/AnimalFarm.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import io.swagger.model.Animal; @@ -30,10 +55,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index de5d9f8863c..55442309d01 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import java.math.BigDecimal; @@ -57,10 +82,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java index d9e2795aa97..5eb0c0d6599 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import java.math.BigDecimal; @@ -57,10 +82,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayTest.java index fa3e7f481ab..dbcf2a4fa71 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ArrayTest.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import io.swagger.model.ReadOnlyFirst; @@ -111,10 +136,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Capitalization.java index 7333898c61f..f143236f01d 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Capitalization.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import javax.validation.constraints.*; @@ -162,10 +187,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Cat.java index f5af4d9c733..409a3b219c8 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Cat.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import io.swagger.model.Animal; @@ -50,10 +75,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Category.java index 2be982a410b..3960300ad34 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Category.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import javax.validation.constraints.*; @@ -71,10 +96,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ClassModel.java index e3af436a21c..b0f0edc5033 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ClassModel.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -54,10 +79,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Client.java index 4d6bd4d0363..ac3f1c53468 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Client.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Client.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import javax.validation.constraints.*; @@ -49,10 +74,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Dog.java index aca8d694c72..099935a03e2 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Dog.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import io.swagger.model.Animal; @@ -50,10 +75,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumArrays.java index ecf3512c1d2..673ee908208 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumArrays.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import java.util.ArrayList; @@ -147,10 +172,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumClass.java index 928ecf719c8..6844c200571 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumClass.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumClass.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import javax.validation.constraints.*; diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumTest.java index 93e832b37b9..4773842df46 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/EnumTest.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import io.swagger.model.OuterEnum; @@ -224,10 +249,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/FormatTest.java index c9085fc2e6f..205fa22a3c1 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/FormatTest.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import java.math.BigDecimal; @@ -331,10 +356,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index e9ab9aadf50..04c31be2893 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import javax.validation.constraints.*; @@ -55,10 +80,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MapTest.java index fa39d05a288..62b0ccc50d6 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MapTest.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import java.util.HashMap; @@ -117,10 +142,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index c86319b2fca..d2e2eaa1de1 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import io.swagger.model.Animal; @@ -104,10 +129,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Model200Response.java index 30e12af1b47..edf090dc509 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Model200Response.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -76,10 +101,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelApiResponse.java index 64f77fc254e..a21ae1de48d 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import javax.validation.constraints.*; @@ -93,10 +118,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelReturn.java index 3d11f555a12..0c9e18ff06a 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ModelReturn.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -54,10 +79,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Name.java index 2c7e77096ed..2c7a316b2ea 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Name.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import io.swagger.annotations.ApiModel; @@ -105,10 +130,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/NumberOnly.java index 8d6e7d662ae..59ced7d0f93 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/NumberOnly.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import java.math.BigDecimal; @@ -50,10 +75,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Order.java index 4e4a7a75b65..0f8290e04b6 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Order.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import java.util.Date; @@ -199,10 +224,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterComposite.java index 33fd0d7c28a..bda13790d3f 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterComposite.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import java.math.BigDecimal; @@ -94,10 +119,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterEnum.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterEnum.java index a95e0f4f052..9c24c6f5157 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterEnum.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/OuterEnum.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import javax.validation.constraints.*; diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Pet.java index a91ce9b1713..a723c8c47d9 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Pet.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import io.swagger.model.Category; @@ -214,10 +239,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ReadOnlyFirst.java index 144819040de..98b53b6d00d 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import javax.validation.constraints.*; @@ -63,10 +88,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/SpecialModelName.java index ab33c276f21..a45423a4860 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/SpecialModelName.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import javax.validation.constraints.*; @@ -49,10 +74,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Tag.java index a6497e31663..20800271143 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/Tag.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import javax.validation.constraints.*; @@ -71,10 +96,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/User.java index 62643de8aa2..e8db93b81fc 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/io/swagger/model/User.java @@ -1,3 +1,28 @@ +/** + * 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. + * + * 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.model; import javax.validation.constraints.*; @@ -195,7 +220,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -206,10 +231,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private static String toIndentedString(java.lang.Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/AnotherFakeApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/AnotherFakeApiTest.java index 85670e19231..e2419ffd553 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/AnotherFakeApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/AnotherFakeApiTest.java @@ -47,7 +47,11 @@ /** - * API tests for AnotherFakeApi + * 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: \" \\ + * + * API tests for AnotherFakeApi */ public class AnotherFakeApiTest { diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeApiTest.java index 20334be9858..3e5a99d27c5 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeApiTest.java @@ -29,6 +29,7 @@ import io.swagger.model.Client; import java.util.Date; import org.joda.time.LocalDate; +import io.swagger.model.OuterComposite; import org.junit.Test; import org.junit.Before; import static org.junit.Assert.*; @@ -50,7 +51,11 @@ /** - * API tests for FakeApi + * 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: \" \\ + * + * API tests for FakeApi */ public class FakeApiTest { @@ -63,13 +68,69 @@ public void setup() { List providers = new ArrayList(); providers.add(provider); - api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", FakeApi.class, providers); + api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", FakeApi.class, providers); org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); ClientConfiguration config = WebClient.getConfig(client); } + /** + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterBooleanSerializeTest() { + Boolean body = null; + //Boolean response = api.fakeOuterBooleanSerialize(body); + //assertNotNull(response); + // TODO: test validations + + + } + + /** + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterCompositeSerializeTest() { + OuterComposite body = null; + //OuterComposite response = api.fakeOuterCompositeSerialize(body); + //assertNotNull(response); + // TODO: test validations + + + } + + /** + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterNumberSerializeTest() { + BigDecimal body = null; + //BigDecimal response = api.fakeOuterNumberSerialize(body); + //assertNotNull(response); + // TODO: test validations + + + } + + /** + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeOuterStringSerializeTest() { + String body = null; + //String response = api.fakeOuterStringSerialize(body); + //assertNotNull(response); + // TODO: test validations + + + } + /** * To test \"client\" model * @@ -144,4 +205,41 @@ public void testEnumParametersTest() { } + /** + * test inline additionalProperties + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testInlineAdditionalPropertiesTest() { + 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() { + String param = null; + String param2 = null; + //api.testJsonFormData(param, param2); + + // TODO: test validations + + + } + } diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeClassnameTags123ApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeClassnameTags123ApiTest.java index 0cbd5df920a..cc6aaa259ba 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeClassnameTags123ApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/FakeClassnameTags123ApiTest.java @@ -47,7 +47,11 @@ /** - * API tests for FakeClassnameTags123Api + * 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: \" \\ + * + * API tests for FakeClassnameTags123Api */ public class FakeClassnameTags123ApiTest { @@ -60,7 +64,7 @@ public void setup() { List providers = new ArrayList(); providers.add(provider); - api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", FakeClassnameTags123Api.class, providers); + api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", FakeClassnameTags123Api.class, providers); org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); ClientConfiguration config = WebClient.getConfig(client); @@ -70,15 +74,13 @@ public void setup() { /** * To test class name in snake case * - * - * * @throws ApiException * if the Api call fails */ @Test public void testClassnameTest() { Client body = null; - //Client response = api.testClassname(body); + //Client response = api.testClassname(body); //assertNotNull(response); // TODO: test validations diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/PetApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/PetApiTest.java index 444c595b78e..18b7143bba1 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/PetApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/PetApiTest.java @@ -49,7 +49,11 @@ /** - * API tests for PetApi + * 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: \" \\ + * + * API tests for PetApi */ public class PetApiTest { @@ -62,7 +66,7 @@ public void setup() { List providers = new ArrayList(); providers.add(provider); - api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", PetApi.class, providers); + api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", PetApi.class, providers); org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); ClientConfiguration config = WebClient.getConfig(client); @@ -80,7 +84,7 @@ public void setup() { @Test public void addPetTest() { Pet body = null; - //api.addPet(body); + //api.addPet(body); // TODO: test validations @@ -99,7 +103,7 @@ public void addPetTest() { public void deletePetTest() { Long petId = null; String apiKey = null; - //api.deletePet(petId, apiKey); + //api.deletePet(petId, apiKey); // TODO: test validations @@ -153,7 +157,7 @@ public void findPetsByTagsTest() { @Test public void getPetByIdTest() { Long petId = null; - //Pet response = api.getPetById(petId); + //Pet response = api.getPetById(petId); //assertNotNull(response); // TODO: test validations @@ -171,7 +175,7 @@ public void getPetByIdTest() { @Test public void updatePetTest() { Pet body = null; - //api.updatePet(body); + //api.updatePet(body); // TODO: test validations @@ -191,7 +195,7 @@ public void updatePetWithFormTest() { Long petId = null; String name = null; String status = null; - //api.updatePetWithForm(petId, name, status); + //api.updatePetWithForm(petId, name, status); // TODO: test validations @@ -211,7 +215,7 @@ public void uploadFileTest() { Long petId = null; String additionalMetadata = null; org.apache.cxf.jaxrs.ext.multipart.Attachment file = null; - //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); + //ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file); //assertNotNull(response); // TODO: test validations diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/StoreApiTest.java index c0cd10dca71..e7eacb68749 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/StoreApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/StoreApiTest.java @@ -48,7 +48,11 @@ /** - * API tests for StoreApi + * 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: \" \\ + * + * API tests for StoreApi */ public class StoreApiTest { @@ -61,7 +65,7 @@ public void setup() { List providers = new ArrayList(); providers.add(provider); - api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", StoreApi.class, providers); + api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", StoreApi.class, providers); org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); ClientConfiguration config = WebClient.getConfig(client); @@ -79,7 +83,7 @@ public void setup() { @Test public void deleteOrderTest() { String orderId = null; - //api.deleteOrder(orderId); + //api.deleteOrder(orderId); // TODO: test validations @@ -114,7 +118,7 @@ public void getInventoryTest() { @Test public void getOrderByIdTest() { Long orderId = null; - //Order response = api.getOrderById(orderId); + //Order response = api.getOrderById(orderId); //assertNotNull(response); // TODO: test validations @@ -132,7 +136,7 @@ public void getOrderByIdTest() { @Test public void placeOrderTest() { Order body = null; - //Order response = api.placeOrder(body); + //Order response = api.placeOrder(body); //assertNotNull(response); // TODO: test validations diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/UserApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/UserApiTest.java index 2d1481bde34..4fa7034b4f3 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/UserApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/api/UserApiTest.java @@ -48,7 +48,11 @@ /** - * API tests for UserApi + * 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: \" \\ + * + * API tests for UserApi */ public class UserApiTest { @@ -61,7 +65,7 @@ public void setup() { List providers = new ArrayList(); providers.add(provider); - api = JAXRSClientFactory.create("http://petstore.swagger.io/v2", UserApi.class, providers); + api = JAXRSClientFactory.create("http://petstore.swagger.io:80/v2", UserApi.class, providers); org.apache.cxf.jaxrs.client.Client client = WebClient.client(api); ClientConfiguration config = WebClient.getConfig(client); @@ -79,7 +83,7 @@ public void setup() { @Test public void createUserTest() { User body = null; - //api.createUser(body); + //api.createUser(body); // TODO: test validations @@ -97,7 +101,7 @@ public void createUserTest() { @Test public void createUsersWithArrayInputTest() { List body = null; - //api.createUsersWithArrayInput(body); + //api.createUsersWithArrayInput(body); // TODO: test validations @@ -115,7 +119,7 @@ public void createUsersWithArrayInputTest() { @Test public void createUsersWithListInputTest() { List body = null; - //api.createUsersWithListInput(body); + //api.createUsersWithListInput(body); // TODO: test validations @@ -133,7 +137,7 @@ public void createUsersWithListInputTest() { @Test public void deleteUserTest() { String username = null; - //api.deleteUser(username); + //api.deleteUser(username); // TODO: test validations @@ -151,7 +155,7 @@ public void deleteUserTest() { @Test public void getUserByNameTest() { String username = null; - //User response = api.getUserByName(username); + //User response = api.getUserByName(username); //assertNotNull(response); // TODO: test validations @@ -170,7 +174,7 @@ public void getUserByNameTest() { public void loginUserTest() { String username = null; String password = null; - //String response = api.loginUser(username, password); + //String response = api.loginUser(username, password); //assertNotNull(response); // TODO: test validations @@ -187,7 +191,7 @@ public void loginUserTest() { */ @Test public void logoutUserTest() { - //api.logoutUser(); + //api.logoutUser(); // TODO: test validations @@ -206,7 +210,7 @@ public void logoutUserTest() { public void updateUserTest() { String username = null; User body = null; - //api.updateUser(username, body); + //api.updateUser(username, body); // TODO: test validations diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..10ca48ec7cc --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,63 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..d028d06360f --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,63 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..f0f3772ba92 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,62 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..218997e0431 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,63 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..02e65f44394 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,63 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..9f5d3be8a99 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,63 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..1c7c147e4dc --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,60 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..e5967f1c0ec --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,61 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..ba9a5537020 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,60 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..a0bdd039205 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,61 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..b6596f15cd6 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,60 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..cf7e3939b37 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,61 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..d126a0b483d --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,62 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..b920daa186f --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,55 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..0476610db07 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,61 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..4e9e341c0e2 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,64 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; +import java.util.Date; +import java.util.UUID; +import org.joda.time.LocalDate; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..8540ea48fe5 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,60 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..326d5e76d71 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,63 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..5097343cf81 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,66 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..ca37a129958 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,61 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..32b05f76203 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,60 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..5a9ce0e7ce6 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,61 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..9c0fbd10ad8 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,61 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..184fb714767 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,61 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..221f01f394e --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,61 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.util.Date; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..1d9dda0673f --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,61 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..c605e7d576e --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,55 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..d2a2de51654 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,64 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..f9f8b146855 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,60 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..a8187845f90 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,60 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..9123cf9aa18 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,60 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..0f1eb562ac7 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,70 @@ +/** + * 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. + * + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..a6e84ce7478 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,100 @@ +/** + * 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. + * + * 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.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java index 85fdecdc662..606d55a298c 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -74,9 +87,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java index 9a9ff0db8cd..f4b91debba0 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -89,9 +102,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java index 2f62263c9d3..775aac5d557 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -160,9 +173,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java index 4e48fb253b1..bfba52ad978 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -164,9 +177,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java index 750e1a82b1e..62a014967d8 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -74,9 +87,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java index a52524db22a..4823df804f4 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/io/swagger/model/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -153,7 +166,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -165,9 +178,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..43c14b30018 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..ea2ba5abe94 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..96ea1e033e4 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,53 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import java.util.Date; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..33e1253c105 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,55 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..a3339988e9e --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..b8cbb0e1d1c --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,61 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..58c0478b89b --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/default/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,88 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Category.java index 833b7c04571..512f2a07578 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -73,10 +86,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/ModelApiResponse.java index 2ec59cd9f20..acf42a90e62 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -88,10 +101,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Order.java index 3b7151b390e..fc6fc9c0b11 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -159,10 +172,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Pet.java index ce855066266..cd4262c21ee 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -163,10 +176,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Tag.java index 356b2abc3b0..64ccf998d81 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -73,10 +86,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/User.java index 50b50e4551b..97880d6a445 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/io/swagger/model/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -153,7 +166,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -164,10 +177,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..e0adb833f35 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,54 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..476f4fabbcb --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,54 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..e925cae7067 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import java.time.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..58ee7d443a2 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,58 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..976568d1dfb --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,54 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..b4d0fd460c7 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,64 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..22fbeb508b1 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,100 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.model.util; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md b/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md index cc011c37ee5..499909ec874 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/README.md @@ -5,13 +5,9 @@ This server was generated by the [swagger-codegen](https://github.com/swagger-ap [OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This is an example of building a swagger-enabled JAX-RS server. -This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework. +This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework for Jboss Resteasy. -To run the server, please execute the following: - -``` -mvn clean package jetty:run -``` +You can deploy the WAR file to Jboss EAP or any other JEE server supporting Jboss Resteasy. You can then view the swagger listing here: diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Category.java index 833b7c04571..512f2a07578 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -73,10 +86,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/ModelApiResponse.java index 2ec59cd9f20..acf42a90e62 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -88,10 +101,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Order.java index 7e5b9613d76..e98460955d6 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -159,10 +172,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Pet.java index 0e258641f27..a942bfc2a03 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -163,10 +176,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Tag.java index 356b2abc3b0..64ccf998d81 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -73,10 +86,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/User.java index 50b50e4551b..97880d6a445 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/io/swagger/model/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -153,7 +166,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -164,10 +177,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..b5fa125e8f7 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,53 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..d5a97071c9e --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,53 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..13006087beb --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,55 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import org.joda.time.DateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..46f793ccd08 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,57 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..eb746628c93 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,53 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..6d9d732d842 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,63 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..7cb643581ca --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.model.util; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/eap/README.md b/samples/server/petstore/jaxrs-resteasy/eap/README.md index cc011c37ee5..499909ec874 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/README.md +++ b/samples/server/petstore/jaxrs-resteasy/eap/README.md @@ -5,13 +5,9 @@ This server was generated by the [swagger-codegen](https://github.com/swagger-ap [OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This is an example of building a swagger-enabled JAX-RS server. -This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework. +This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework for Jboss Resteasy. -To run the server, please execute the following: - -``` -mvn clean package jetty:run -``` +You can deploy the WAR file to Jboss EAP or any other JEE server supporting Jboss Resteasy. You can then view the swagger listing here: diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Category.java index 833b7c04571..512f2a07578 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -73,10 +86,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/ModelApiResponse.java index 2ec59cd9f20..acf42a90e62 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -88,10 +101,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Order.java index a88a6ca70f6..993d0c3484d 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -159,10 +172,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Pet.java index 0e258641f27..a942bfc2a03 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -163,10 +176,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Tag.java index 356b2abc3b0..64ccf998d81 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -73,10 +86,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/User.java index 50b50e4551b..97880d6a445 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/io/swagger/model/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -153,7 +166,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -164,10 +177,21 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(Object o) { + private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..43c14b30018 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..ea2ba5abe94 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..96ea1e033e4 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,53 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import java.util.Date; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..33e1253c105 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,55 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..a3339988e9e --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,51 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..b8cbb0e1d1c --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,61 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..58c0478b89b --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,88 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/settings.gradle b/samples/server/petstore/jaxrs-resteasy/joda/settings.gradle index 6392b5011e0..d4513c5f7ff 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/settings.gradle +++ b/samples/server/petstore/jaxrs-resteasy/joda/settings.gradle @@ -1 +1 @@ -rootProject.name = "swagger-jaxrs-resteasy-server" \ No newline at end of file +rootProject.name = "swagger-jaxrs-resteasy-joda-server" \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java index 85fdecdc662..606d55a298c 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -74,9 +87,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java index 9a9ff0db8cd..f4b91debba0 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -89,9 +102,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java index cfdf85d655d..d308e71d82a 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -160,9 +173,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java index 4e48fb253b1..bfba52ad978 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -164,9 +177,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java index 750e1a82b1e..62a014967d8 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -74,9 +87,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java index a52524db22a..4823df804f4 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/io/swagger/model/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -153,7 +166,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -165,9 +178,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..b5fa125e8f7 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,53 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..d5a97071c9e --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,53 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..13006087beb --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,55 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import org.joda.time.DateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..46f793ccd08 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,57 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..eb746628c93 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,53 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..6d9d732d842 --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,63 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..7cb643581ca --- /dev/null +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.model.util; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(DateTime.class)) { + return (T) DateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ 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 e9c28d5da5f..1c9903022bd 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/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java index 6aa5fc2b980..063fa31c019 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.HashMap; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Animal.java index bb54e9cad22..4d831f90103 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Animal.java @@ -1,3 +1,16 @@ +/* + * 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.model; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AnimalFarm.java index f14a33d343e..b78c8bee48c 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AnimalFarm.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.model.Animal; @@ -48,9 +61,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 0be06450317..d08fb2aadf6 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.math.BigDecimal; @@ -67,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java index c131d2c633a..628b1de355e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.math.BigDecimal; @@ -67,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayTest.java index 1720cde126c..095fbc34377 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.model.ReadOnlyFirst; @@ -107,9 +120,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Capitalization.java index 00402e4788a..85e48715797 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Capitalization.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -165,9 +178,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Cat.java index 086c6462d8e..1fe2e75320e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Cat.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.model.Animal; @@ -65,9 +78,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Category.java index 1e5c20bf730..4603f751d16 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Category.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -84,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ClassModel.java index c05c7b4a9b6..64cb3be6d7b 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ClassModel.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.annotations.ApiModel; @@ -68,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Client.java index 61c2aef0512..a8d00c746c2 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Client.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Client.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -64,9 +77,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Dog.java index 8c1d2c3f85b..6393e232c84 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Dog.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.model.Animal; @@ -65,9 +78,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumArrays.java index 595f687217d..d2745a8ddc1 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumArrays.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.ArrayList; @@ -148,9 +161,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumClass.java index 13cf0a338e7..884fb782ab8 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumClass.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumTest.java index d704287dd95..11bb43234e4 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.model.OuterEnum; @@ -218,9 +231,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/FormatTest.java index bb3072fe1e9..dab7cc190da 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/FormatTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.math.BigDecimal; @@ -322,9 +335,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index ef9c2728846..13aafdb24f8 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -84,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MapTest.java index 54abae05490..6d29c51841d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MapTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.HashMap; @@ -118,9 +131,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 673adda125e..51f847a805d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.model.Animal; @@ -110,9 +123,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Model200Response.java index eeb8e7547cf..1dac69350a1 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Model200Response.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.annotations.ApiModel; @@ -88,9 +101,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelApiResponse.java index e97b1fdfd8b..28f716828f4 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -104,9 +117,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelReturn.java index 72a677f7ab0..872fc7e1c95 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelReturn.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.annotations.ApiModel; @@ -68,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Name.java index 5460ff8a9b9..e4f0645d942 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Name.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.annotations.ApiModel; @@ -129,9 +142,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NumberOnly.java index 5f02fd0649a..e98d7b63dc3 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.math.BigDecimal; @@ -65,9 +78,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Order.java index f7665f15a54..e5febb662ee 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Order.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Date; @@ -197,9 +210,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterComposite.java index bfe8211b654..666268371bb 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterComposite.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.math.BigDecimal; @@ -105,9 +118,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterEnum.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterEnum.java index d682c3f5080..f42c4fc1978 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterEnum.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterEnum.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Pet.java index fc8a6796b79..352203ce60e 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Pet.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.model.Category; @@ -202,9 +215,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ReadOnlyFirst.java index bd4ee7e1cb1..4fbd86aa283 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -84,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SpecialModelName.java index b8144314b82..406eb959d83 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SpecialModelName.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -64,9 +77,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Tag.java index 10a7ffc7c57..5eafc2bebf2 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Tag.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -84,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/User.java index a86f0eae070..61a1bb3a622 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/User.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -193,7 +206,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -205,9 +218,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..5cc7edd42cb --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..14db584c435 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..c88bf4eef82 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,50 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..15eee022793 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..5452d36b8f2 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..945511a7658 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..de250fd985b --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..777a81dcc47 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..4b71cbbe16f --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..3bb35f3d92a --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..2c0d2bfc308 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..6da0014b379 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..cb6feff0526 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,50 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..966d6357179 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,43 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..c20805b5c47 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..37952f15808 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; +import java.util.Date; +import java.util.UUID; +import org.joda.time.LocalDate; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..7e902fea4ee --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..b457755d001 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..572a6785069 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..c79c7e3b03b --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..4fd17dad5bf --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..1d9320c3a70 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..a742aa3f725 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..6626b163ed6 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..deac0c45bfc --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.util.Date; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..3c5ef1c5df1 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..1c298732899 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,43 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..3a3ac6041f5 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..52fc9c7305e --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..ea796d3b052 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..18dc6d484ec --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..f6a6637bf58 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..8014ad95bf6 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,88 @@ +/* + * 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.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec-interface/swagger.json b/samples/server/petstore/jaxrs-spec-interface/swagger.json index 5b53d7108d0..adf9c0f817b 100644 --- a/samples/server/petstore/jaxrs-spec-interface/swagger.json +++ b/samples/server/petstore/jaxrs-spec-interface/swagger.json @@ -1,1693 +1,1720 @@ -{ - "swagger" : "2.0", - "info" : { - "description" : "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\", - "version" : "1.0.0", - "title" : "Swagger Petstore", - "termsOfService" : "http://swagger.io/terms/", - "contact" : { - "email" : "apiteam@swagger.io" - }, - "license" : { - "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "host" : "petstore.swagger.io:80", - "basePath" : "/v2", - "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets", - "externalDocs" : { - "description" : "Find out more", - "url" : "http://swagger.io" - } - }, { - "name" : "store", - "description" : "Access to Petstore orders" - }, { - "name" : "user", - "description" : "Operations about user", - "externalDocs" : { - "description" : "Find out more about our store", - "url" : "http://swagger.io" - } - } ], - "schemes" : [ "http" ], - "paths" : { - "/pet" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "description" : "", - "operationId" : "addPet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - }, - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "description" : "", - "operationId" : "updatePet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - } - }, - "/pet/findByStatus" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "status", - "in" : "query", - "description" : "Status values that need to be considered for filter", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - } - }, - "/pet/findByTags" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "tags", - "in" : "query", - "description" : "Tags to filter by", - "required" : true, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "deprecated" : true - } - }, - "/pet/{petId}" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", - "description" : "Returns a single pet", - "operationId" : "getPetById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to return", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Pet" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ] - }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", - "description" : "", - "operationId" : "updatePetWithForm", - "consumes" : [ "application/x-www-form-urlencoded" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet that needs to be updated", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "name", - "in" : "formData", - "description" : "Updated name of the pet", - "required" : false, - "type" : "string" - }, { - "name" : "status", - "in" : "formData", - "description" : "Updated status of the pet", - "required" : false, - "type" : "string" - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "description" : "", - "operationId" : "deletePet", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "required" : false, - "type" : "string" - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", - "description" : "", - "operationId" : "uploadFile", - "consumes" : [ "multipart/form-data" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to update", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "additionalMetadata", - "in" : "formData", - "description" : "Additional data to pass to server", - "required" : false, - "type" : "string" - }, { - "name" : "file", - "in" : "formData", - "description" : "file to upload", - "required" : false, - "type" : "file" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/ApiResponse" - } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - } - }, - "/store/inventory" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "produces" : [ "application/json" ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } - } - } - }, - "security" : [ { - "api_key" : [ ] - } ] - } - }, - "/store/order" : { - "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", - "description" : "", - "operationId" : "placeOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "order placed for purchasing the pet", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Order" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid Order" - } - } - } - }, - "/store/order/{order_id}" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "order_id", - "in" : "path", - "description" : "ID of pet that needs to be fetched", - "required" : true, - "type" : "integer", - "maximum" : 5, - "minimum" : 1, - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - } - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "order_id", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - } - } - }, - "/user" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Create user", - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Created user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - } - } - }, - "/user/createWithArray" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithArrayInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - } - } - }, - "/user/createWithList" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithListInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - } - } - }, - "/user/login" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", - "description" : "", - "operationId" : "loginUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "query", - "description" : "The user name for login", - "required" : true, - "type" : "string" - }, { - "name" : "password", - "in" : "query", - "description" : "The password for login in clear text", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "string" - }, - "headers" : { - "X-Rate-Limit" : { - "type" : "integer", - "format" : "int32", - "description" : "calls per hour allowed by the user" - }, - "X-Expires-After" : { - "type" : "string", - "format" : "date-time", - "description" : "date in UTC when toekn expires" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - } - } - }, - "/user/logout" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", - "description" : "", - "operationId" : "logoutUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ ], - "responses" : { - "default" : { - "description" : "successful operation" - } - } - } - }, - "/user/{username}" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", - "description" : "", - "operationId" : "getUserByName", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be fetched. Use user1 for testing. ", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/User" - } - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - } - }, - "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "name that need to be deleted", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Updated user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - } - }, - "delete" : { - "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - } - } - }, - "/fake_classname_test" : { - "patch" : { - "tags" : [ "fake_classname_tags 123#$%^" ], - "summary" : "To test class name in snake case", - "operationId" : "testClassname", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "client model", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Client" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Client" - } - } - }, - "security" : [ { - "api_key_query" : [ ] - } ] - } - }, - "/fake" : { - "get" : { - "tags" : [ "fake" ], - "summary" : "To test enum parameters", - "description" : "To test enum parameters", - "operationId" : "testEnumParameters", - "consumes" : [ "*/*" ], - "produces" : [ "*/*" ], - "parameters" : [ { - "name" : "enum_form_string_array", - "in" : "formData", - "description" : "Form parameter enum test (string array)", - "required" : false, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" - } - }, { - "name" : "enum_form_string", - "in" : "formData", - "description" : "Form parameter enum test (string)", - "required" : false, - "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] - }, { - "name" : "enum_header_string_array", - "in" : "header", - "description" : "Header parameter enum test (string array)", - "required" : false, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" - } - }, { - "name" : "enum_header_string", - "in" : "header", - "description" : "Header parameter enum test (string)", - "required" : false, - "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] - }, { - "name" : "enum_query_string_array", - "in" : "query", - "description" : "Query parameter enum test (string array)", - "required" : false, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" - } - }, { - "name" : "enum_query_string", - "in" : "query", - "description" : "Query parameter enum test (string)", - "required" : false, - "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] - }, { - "name" : "enum_query_integer", - "in" : "query", - "description" : "Query parameter enum test (double)", - "required" : false, - "type" : "integer", - "format" : "int32", - "enum" : [ 1, -2 ] - }, { - "name" : "enum_query_double", - "in" : "formData", - "description" : "Query parameter enum test (double)", - "required" : false, - "type" : "number", - "format" : "double", - "enum" : [ 1.1, -1.2 ] - } ], - "responses" : { - "400" : { - "description" : "Invalid request" - }, - "404" : { - "description" : "Not found" - } - } - }, - "post" : { - "tags" : [ "fake" ], - "summary" : "Fake endpoint for testing various parameters\n假端點\n偽のエンドポイント\n가짜 엔드 포인트\n", - "description" : "Fake endpoint for testing various parameters\n假端點\n偽のエンドポイント\n가짜 엔드 포인트\n", - "operationId" : "testEndpointParameters", - "consumes" : [ "application/xml; charset=utf-8", "application/json; charset=utf-8" ], - "produces" : [ "application/xml; charset=utf-8", "application/json; charset=utf-8" ], - "parameters" : [ { - "name" : "integer", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "integer", - "maximum" : 100, - "minimum" : 10 - }, { - "name" : "int32", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "integer", - "maximum" : 200, - "minimum" : 20, - "format" : "int32" - }, { - "name" : "int64", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "integer", - "format" : "int64" - }, { - "name" : "number", - "in" : "formData", - "description" : "None", - "required" : true, - "type" : "number", - "maximum" : 543.2, - "minimum" : 32.1 - }, { - "name" : "float", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "number", - "maximum" : 987.6, - "format" : "float" - }, { - "name" : "double", - "in" : "formData", - "description" : "None", - "required" : true, - "type" : "number", - "maximum" : 123.4, - "minimum" : 67.8, - "format" : "double" - }, { - "name" : "string", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "pattern" : "/[a-z]/i" - }, { - "name" : "pattern_without_delimiter", - "in" : "formData", - "description" : "None", - "required" : true, - "type" : "string", - "pattern" : "^[A-Z].*" - }, { - "name" : "byte", - "in" : "formData", - "description" : "None", - "required" : true, - "type" : "string", - "format" : "byte" - }, { - "name" : "binary", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "format" : "binary" - }, { - "name" : "date", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "format" : "date" - }, { - "name" : "dateTime", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "format" : "date-time" - }, { - "name" : "password", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "maxLength" : 64, - "minLength" : 10, - "format" : "password" - }, { - "name" : "callback", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "security" : [ { - "http_basic_test" : [ ] - } ] - }, - "patch" : { - "tags" : [ "fake" ], - "summary" : "To test \"client\" model", - "description" : "To test \"client\" model", - "operationId" : "testClientModel", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "client model", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Client" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Client" - } - } - } - } - }, - "/fake/outer/number" : { - "post" : { - "tags" : [ "fake" ], - "description" : "Test serialization of outer number types", - "operationId" : "fakeOuterNumberSerialize", - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Input number as post body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/OuterNumber" - } - } ], - "responses" : { - "200" : { - "description" : "Output number", - "schema" : { - "$ref" : "#/definitions/OuterNumber" - } - } - } - } - }, - "/fake/outer/string" : { - "post" : { - "tags" : [ "fake" ], - "description" : "Test serialization of outer string types", - "operationId" : "fakeOuterStringSerialize", - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Input string as post body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/OuterString" - } - } ], - "responses" : { - "200" : { - "description" : "Output string", - "schema" : { - "$ref" : "#/definitions/OuterString" - } - } - } - } - }, - "/fake/outer/boolean" : { - "post" : { - "tags" : [ "fake" ], - "description" : "Test serialization of outer boolean types", - "operationId" : "fakeOuterBooleanSerialize", - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Input boolean as post body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/OuterBoolean" - } - } ], - "responses" : { - "200" : { - "description" : "Output boolean", - "schema" : { - "$ref" : "#/definitions/OuterBoolean" - } - } - } - } - }, - "/fake/outer/composite" : { - "post" : { - "tags" : [ "fake" ], - "description" : "Test serialization of object with outer number type", - "operationId" : "fakeOuterCompositeSerialize", - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Input composite as post body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/OuterComposite" - } - } ], - "responses" : { - "200" : { - "description" : "Output composite", - "schema" : { - "$ref" : "#/definitions/OuterComposite" - } - } - } - } - }, - "/fake/jsonFormData" : { - "get" : { - "tags" : [ "fake" ], - "summary" : "test json serialization of form data", - "description" : "", - "operationId" : "testJsonFormData", - "consumes" : [ "application/json" ], - "parameters" : [ { - "name" : "param", - "in" : "formData", - "description" : "field1", - "required" : true, - "type" : "string" - }, { - "name" : "param2", - "in" : "formData", - "description" : "field2", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation" - } - } - } - }, - "/another-fake/dummy" : { - "patch" : { - "tags" : [ "$another-fake?" ], - "summary" : "To test special tags", - "description" : "To test special tags", - "operationId" : "test_special_tags", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "client model", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Client" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Client" - } - } - } - } - } - }, - "securityDefinitions" : { - "petstore_auth" : { - "type" : "oauth2", - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "flow" : "implicit", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - }, - "api_key" : { - "type" : "apiKey", - "name" : "api_key", - "in" : "header" - }, - "api_key_query" : { - "type" : "apiKey", - "name" : "api_key_query", - "in" : "query" - }, - "http_basic_test" : { - "type" : "basic" - } - }, - "definitions" : { - "Order" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "petId" : { - "type" : "integer", - "format" : "int64" - }, - "quantity" : { - "type" : "integer", - "format" : "int32" - }, - "shipDate" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] - }, - "complete" : { - "type" : "boolean", - "default" : false - } - }, - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "xml" : { - "name" : "Category" - } - }, - "User" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64", - "x-is-unique" : true - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "type" : "integer", - "format" : "int32", - "description" : "User Status" - } - }, - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "type" : "object", - "required" : [ "name", "photoUrls" ], - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64", - "x-is-unique" : true - }, - "category" : { - "$ref" : "#/definitions/Category" - }, - "name" : { - "type" : "string", - "example" : "doggie" - }, - "photoUrls" : { - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - }, - "items" : { - "type" : "string" - } - }, - "tags" : { - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - }, - "items" : { - "$ref" : "#/definitions/Tag" - } - }, - "status" : { - "type" : "string", - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] - } - }, - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "integer", - "format" : "int32" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - } - }, - "$special[model.name]" : { - "properties" : { - "$special[property.name]" : { - "type" : "integer", - "format" : "int64" - } - }, - "xml" : { - "name" : "$special[model.name]" - } - }, - "Return" : { - "properties" : { - "return" : { - "type" : "integer", - "format" : "int32" - } - }, - "description" : "Model for testing reserved words", - "xml" : { - "name" : "Return" - } - }, - "Name" : { - "required" : [ "name" ], - "properties" : { - "name" : { - "type" : "integer", - "format" : "int32" - }, - "snake_case" : { - "type" : "integer", - "format" : "int32", - "readOnly" : true - }, - "property" : { - "type" : "string" - }, - "123Number" : { - "type" : "integer", - "readOnly" : true - } - }, - "description" : "Model for testing model name same as property name", - "xml" : { - "name" : "Name" - } - }, - "200_response" : { - "properties" : { - "name" : { - "type" : "integer", - "format" : "int32" - }, - "class" : { - "type" : "string" - } - }, - "description" : "Model for testing model name starting with number", - "xml" : { - "name" : "Name" - } - }, - "ClassModel" : { - "properties" : { - "_class" : { - "type" : "string" - } - }, - "description" : "Model for testing model with \"_class\" property" - }, - "Dog" : { - "allOf" : [ { - "$ref" : "#/definitions/Animal" - }, { - "type" : "object", - "properties" : { - "breed" : { - "type" : "string" - } - } - } ] - }, - "Cat" : { - "allOf" : [ { - "$ref" : "#/definitions/Animal" - }, { - "type" : "object", - "properties" : { - "declawed" : { - "type" : "boolean" - } - } - } ] - }, - "Animal" : { - "type" : "object", - "required" : [ "className" ], - "discriminator" : "className", - "properties" : { - "className" : { - "type" : "string" - }, - "color" : { - "type" : "string", - "default" : "red" - } - } - }, - "AnimalFarm" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Animal" - } - }, - "format_test" : { - "type" : "object", - "required" : [ "byte", "date", "number", "password" ], - "properties" : { - "integer" : { - "type" : "integer", - "minimum" : 10, - "maximum" : 100 - }, - "int32" : { - "type" : "integer", - "format" : "int32", - "minimum" : 20, - "maximum" : 200 - }, - "int64" : { - "type" : "integer", - "format" : "int64" - }, - "number" : { - "type" : "number", - "minimum" : 32.1, - "maximum" : 543.2 - }, - "float" : { - "type" : "number", - "format" : "float", - "minimum" : 54.3, - "maximum" : 987.6 - }, - "double" : { - "type" : "number", - "format" : "double", - "minimum" : 67.8, - "maximum" : 123.4 - }, - "string" : { - "type" : "string", - "pattern" : "/[a-z]/i" - }, - "byte" : { - "type" : "string", - "format" : "byte", - "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - }, - "binary" : { - "type" : "string", - "format" : "binary" - }, - "date" : { - "type" : "string", - "format" : "date" - }, - "dateTime" : { - "type" : "string", - "format" : "date-time" - }, - "uuid" : { - "type" : "string", - "format" : "uuid" - }, - "password" : { - "type" : "string", - "format" : "password", - "minLength" : 10, - "maxLength" : 64 - } - } - }, - "EnumClass" : { - "type" : "string", - "enum" : [ "_abc", "-efg", "(xyz)" ], - "default" : "-efg" - }, - "Enum_Test" : { - "type" : "object", - "properties" : { - "enum_string" : { - "type" : "string", - "enum" : [ "UPPER", "lower", "" ] - }, - "enum_integer" : { - "type" : "integer", - "format" : "int32", - "enum" : [ 1, -1 ] - }, - "enum_number" : { - "type" : "number", - "format" : "double", - "enum" : [ 1.1, -1.2 ] - }, - "outerEnum" : { - "$ref" : "#/definitions/OuterEnum" - } - } - }, - "AdditionalPropertiesClass" : { - "type" : "object", - "properties" : { - "map_property" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - }, - "map_of_map_property" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - } - } - } - }, - "MixedPropertiesAndAdditionalPropertiesClass" : { - "type" : "object", - "properties" : { - "uuid" : { - "type" : "string", - "format" : "uuid" - }, - "dateTime" : { - "type" : "string", - "format" : "date-time" - }, - "map" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/Animal" - } - } - } - }, - "List" : { - "type" : "object", - "properties" : { - "123-list" : { - "type" : "string" - } - } - }, - "Client" : { - "type" : "object", - "properties" : { - "client" : { - "type" : "string" - } - } - }, - "ReadOnlyFirst" : { - "type" : "object", - "properties" : { - "bar" : { - "type" : "string", - "readOnly" : true - }, - "baz" : { - "type" : "string" - } - } - }, - "hasOnlyReadOnly" : { - "type" : "object", - "properties" : { - "bar" : { - "type" : "string", - "readOnly" : true - }, - "foo" : { - "type" : "string", - "readOnly" : true - } - } - }, - "Capitalization" : { - "type" : "object", - "properties" : { - "smallCamel" : { - "type" : "string" - }, - "CapitalCamel" : { - "type" : "string" - }, - "small_Snake" : { - "type" : "string" - }, - "Capital_Snake" : { - "type" : "string" - }, - "SCA_ETH_Flow_Points" : { - "type" : "string" - }, - "ATT_NAME" : { - "type" : "string", - "description" : "Name of the pet\n" - } - } - }, - "MapTest" : { - "type" : "object", - "properties" : { - "map_map_of_string" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - } - }, - "map_of_enum_string" : { - "type" : "object", - "additionalProperties" : { - "type" : "string", - "enum" : [ "UPPER", "lower" ] - } - } - } - }, - "ArrayTest" : { - "type" : "object", - "properties" : { - "array_of_string" : { - "type" : "array", - "items" : { - "type" : "string" - } - }, - "array_array_of_integer" : { - "type" : "array", - "items" : { - "type" : "array", - "items" : { - "type" : "integer", - "format" : "int64" - } - } - }, - "array_array_of_model" : { - "type" : "array", - "items" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReadOnlyFirst" - } - } - } - } - }, - "NumberOnly" : { - "type" : "object", - "properties" : { - "JustNumber" : { - "type" : "number" - } - } - }, - "ArrayOfNumberOnly" : { - "type" : "object", - "properties" : { - "ArrayNumber" : { - "type" : "array", - "items" : { - "type" : "number" - } - } - } - }, - "ArrayOfArrayOfNumberOnly" : { - "type" : "object", - "properties" : { - "ArrayArrayNumber" : { - "type" : "array", - "items" : { - "type" : "array", - "items" : { - "type" : "number" - } - } - } - } - }, - "EnumArrays" : { - "type" : "object", - "properties" : { - "just_symbol" : { - "type" : "string", - "enum" : [ ">=", "$" ] - }, - "array_enum" : { - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "fish", "crab" ] - } - } - } - }, - "OuterEnum" : { - "type" : "string", - "enum" : [ "placed", "approved", "delivered" ] - }, - "OuterComposite" : { - "type" : "object", - "properties" : { - "my_number" : { - "$ref" : "#/definitions/OuterNumber" - }, - "my_string" : { - "$ref" : "#/definitions/OuterString" - }, - "my_boolean" : { - "$ref" : "#/definitions/OuterBoolean" - } - } - }, - "OuterNumber" : { - "type" : "number" - }, - "OuterString" : { - "type" : "string" - }, - "OuterBoolean" : { - "type" : "boolean" - } - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - } +{ + "swagger" : "2.0", + "info" : { + "description" : "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\", + "version" : "1.0.0", + "title" : "Swagger Petstore", + "termsOfService" : "http://swagger.io/terms/", + "contact" : { + "email" : "apiteam@swagger.io" + }, + "license" : { + "name" : "Apache-2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "host" : "petstore.swagger.io:80", + "basePath" : "/v2", + "tags" : [ { + "name" : "pet", + "description" : "Everything about your Pets", + "externalDocs" : { + "description" : "Find out more", + "url" : "http://swagger.io" + } + }, { + "name" : "store", + "description" : "Access to Petstore orders" + }, { + "name" : "user", + "description" : "Operations about user", + "externalDocs" : { + "description" : "Find out more about our store", + "url" : "http://swagger.io" + } + } ], + "schemes" : [ "http" ], + "paths" : { + "/pet" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "Add a new pet to the store", + "description" : "", + "operationId" : "addPet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + }, + "put" : { + "tags" : [ "pet" ], + "summary" : "Update an existing pet", + "description" : "", + "operationId" : "updatePet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + }, + "405" : { + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + } + }, + "/pet/findByStatus" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by status", + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "status", + "in" : "query", + "description" : "Status values that need to be considered for filter", + "required" : true, + "type" : "array", + "items" : { + "type" : "string", + "default" : "available", + "enum" : [ "available", "pending", "sold" ] + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid status value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + } + }, + "/pet/findByTags" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by tags", + "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId" : "findPetsByTags", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "tags", + "in" : "query", + "description" : "Tags to filter by", + "required" : true, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid tag value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "deprecated" : true + } + }, + "/pet/{petId}" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Find pet by ID", + "description" : "Returns a single pet", + "operationId" : "getPetById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to return", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Pet" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ] + }, + "post" : { + "tags" : [ "pet" ], + "summary" : "Updates a pet in the store with form data", + "description" : "", + "operationId" : "updatePetWithForm", + "consumes" : [ "application/x-www-form-urlencoded" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet that needs to be updated", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "name", + "in" : "formData", + "description" : "Updated name of the pet", + "required" : false, + "type" : "string" + }, { + "name" : "status", + "in" : "formData", + "description" : "Updated status of the pet", + "required" : false, + "type" : "string" + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + }, + "delete" : { + "tags" : [ "pet" ], + "summary" : "Deletes a pet", + "description" : "", + "operationId" : "deletePet", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "api_key", + "in" : "header", + "required" : false, + "type" : "string" + }, { + "name" : "petId", + "in" : "path", + "description" : "Pet id to delete", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "400" : { + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + } + }, + "/pet/{petId}/uploadImage" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "description" : "", + "operationId" : "uploadFile", + "consumes" : [ "multipart/form-data" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "additionalMetadata", + "in" : "formData", + "description" : "Additional data to pass to server", + "required" : false, + "type" : "string" + }, { + "name" : "file", + "in" : "formData", + "description" : "file to upload", + "required" : false, + "type" : "file" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/ApiResponse" + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + } + }, + "/store/inventory" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Returns pet inventories by status", + "description" : "Returns a map of status codes to quantities", + "operationId" : "getInventory", + "produces" : [ "application/json" ], + "parameters" : [ ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int32" + } + } + } + }, + "security" : [ { + "api_key" : [ ] + } ] + } + }, + "/store/order" : { + "post" : { + "tags" : [ "store" ], + "summary" : "Place an order for a pet", + "description" : "", + "operationId" : "placeOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "order placed for purchasing the pet", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Order" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid Order" + } + } + } + }, + "/store/order/{order_id}" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Find purchase order by ID", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId" : "getOrderById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "order_id", + "in" : "path", + "description" : "ID of pet that needs to be fetched", + "required" : true, + "type" : "integer", + "maximum" : 5, + "minimum" : 1, + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + } + }, + "delete" : { + "tags" : [ "store" ], + "summary" : "Delete purchase order by ID", + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "order_id", + "in" : "path", + "description" : "ID of the order that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + } + } + }, + "/user" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Create user", + "description" : "This can only be done by the logged in user.", + "operationId" : "createUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Created user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + } + } + }, + "/user/createWithArray" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithArrayInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + } + } + }, + "/user/createWithList" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithListInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + } + } + }, + "/user/login" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs user into the system", + "description" : "", + "operationId" : "loginUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "query", + "description" : "The user name for login", + "required" : true, + "type" : "string" + }, { + "name" : "password", + "in" : "query", + "description" : "The password for login in clear text", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "string" + }, + "headers" : { + "X-Rate-Limit" : { + "type" : "integer", + "format" : "int32", + "description" : "calls per hour allowed by the user" + }, + "X-Expires-After" : { + "type" : "string", + "format" : "date-time", + "description" : "date in UTC when toekn expires" + } + } + }, + "400" : { + "description" : "Invalid username/password supplied" + } + } + } + }, + "/user/logout" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs out current logged in user session", + "description" : "", + "operationId" : "logoutUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ ], + "responses" : { + "default" : { + "description" : "successful operation" + } + } + } + }, + "/user/{username}" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Get user by user name", + "description" : "", + "operationId" : "getUserByName", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be fetched. Use user1 for testing. ", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/User" + } + }, + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + } + }, + "put" : { + "tags" : [ "user" ], + "summary" : "Updated user", + "description" : "This can only be done by the logged in user.", + "operationId" : "updateUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "name that need to be deleted", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Updated user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid user supplied" + }, + "404" : { + "description" : "User not found" + } + } + }, + "delete" : { + "tags" : [ "user" ], + "summary" : "Delete user", + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + } + } + }, + "/fake_classname_test" : { + "patch" : { + "tags" : [ "fake_classname_tags 123#$%^" ], + "summary" : "To test class name in snake case", + "operationId" : "testClassname", + "consumes" : [ "application/json" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "client model", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Client" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Client" + } + } + }, + "security" : [ { + "api_key_query" : [ ] + } ] + } + }, + "/fake" : { + "get" : { + "tags" : [ "fake" ], + "summary" : "To test enum parameters", + "description" : "To test enum parameters", + "operationId" : "testEnumParameters", + "consumes" : [ "*/*" ], + "produces" : [ "*/*" ], + "parameters" : [ { + "name" : "enum_form_string_array", + "in" : "formData", + "description" : "Form parameter enum test (string array)", + "required" : false, + "type" : "array", + "items" : { + "type" : "string", + "default" : "$", + "enum" : [ ">", "$" ] + } + }, { + "name" : "enum_form_string", + "in" : "formData", + "description" : "Form parameter enum test (string)", + "required" : false, + "type" : "string", + "default" : "-efg", + "enum" : [ "_abc", "-efg", "(xyz)" ] + }, { + "name" : "enum_header_string_array", + "in" : "header", + "description" : "Header parameter enum test (string array)", + "required" : false, + "type" : "array", + "items" : { + "type" : "string", + "default" : "$", + "enum" : [ ">", "$" ] + } + }, { + "name" : "enum_header_string", + "in" : "header", + "description" : "Header parameter enum test (string)", + "required" : false, + "type" : "string", + "default" : "-efg", + "enum" : [ "_abc", "-efg", "(xyz)" ] + }, { + "name" : "enum_query_string_array", + "in" : "query", + "description" : "Query parameter enum test (string array)", + "required" : false, + "type" : "array", + "items" : { + "type" : "string", + "default" : "$", + "enum" : [ ">", "$" ] + } + }, { + "name" : "enum_query_string", + "in" : "query", + "description" : "Query parameter enum test (string)", + "required" : false, + "type" : "string", + "default" : "-efg", + "enum" : [ "_abc", "-efg", "(xyz)" ] + }, { + "name" : "enum_query_integer", + "in" : "query", + "description" : "Query parameter enum test (double)", + "required" : false, + "type" : "integer", + "format" : "int32", + "enum" : [ 1, -2 ] + }, { + "name" : "enum_query_double", + "in" : "formData", + "description" : "Query parameter enum test (double)", + "required" : false, + "type" : "number", + "format" : "double", + "enum" : [ 1.1, -1.2 ] + } ], + "responses" : { + "400" : { + "description" : "Invalid request" + }, + "404" : { + "description" : "Not found" + } + } + }, + "post" : { + "tags" : [ "fake" ], + "summary" : "Fake endpoint for testing various parameters\n???\n?????????\n?? ?? ???\n", + "description" : "Fake endpoint for testing various parameters\n???\n?????????\n?? ?? ???\n", + "operationId" : "testEndpointParameters", + "consumes" : [ "application/xml; charset=utf-8", "application/json; charset=utf-8" ], + "produces" : [ "application/xml; charset=utf-8", "application/json; charset=utf-8" ], + "parameters" : [ { + "name" : "integer", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "integer", + "maximum" : 100, + "minimum" : 10 + }, { + "name" : "int32", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "integer", + "maximum" : 200, + "minimum" : 20, + "format" : "int32" + }, { + "name" : "int64", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "integer", + "format" : "int64" + }, { + "name" : "number", + "in" : "formData", + "description" : "None", + "required" : true, + "type" : "number", + "maximum" : 543.2, + "minimum" : 32.1 + }, { + "name" : "float", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "number", + "maximum" : 987.6, + "format" : "float" + }, { + "name" : "double", + "in" : "formData", + "description" : "None", + "required" : true, + "type" : "number", + "maximum" : 123.4, + "minimum" : 67.8, + "format" : "double" + }, { + "name" : "string", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "pattern" : "/[a-z]/i" + }, { + "name" : "pattern_without_delimiter", + "in" : "formData", + "description" : "None", + "required" : true, + "type" : "string", + "pattern" : "^[A-Z].*" + }, { + "name" : "byte", + "in" : "formData", + "description" : "None", + "required" : true, + "type" : "string", + "format" : "byte" + }, { + "name" : "binary", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "format" : "binary" + }, { + "name" : "date", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "format" : "date" + }, { + "name" : "dateTime", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "format" : "date-time" + }, { + "name" : "password", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "maxLength" : 64, + "minLength" : 10, + "format" : "password" + }, { + "name" : "callback", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "security" : [ { + "http_basic_test" : [ ] + } ] + }, + "patch" : { + "tags" : [ "fake" ], + "summary" : "To test \"client\" model", + "description" : "To test \"client\" model", + "operationId" : "testClientModel", + "consumes" : [ "application/json" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "client model", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Client" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Client" + } + } + } + } + }, + "/fake/outer/number" : { + "post" : { + "tags" : [ "fake" ], + "description" : "Test serialization of outer number types", + "operationId" : "fakeOuterNumberSerialize", + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Input number as post body", + "required" : false, + "schema" : { + "$ref" : "#/definitions/OuterNumber" + } + } ], + "responses" : { + "200" : { + "description" : "Output number", + "schema" : { + "$ref" : "#/definitions/OuterNumber" + } + } + } + } + }, + "/fake/outer/string" : { + "post" : { + "tags" : [ "fake" ], + "description" : "Test serialization of outer string types", + "operationId" : "fakeOuterStringSerialize", + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Input string as post body", + "required" : false, + "schema" : { + "$ref" : "#/definitions/OuterString" + } + } ], + "responses" : { + "200" : { + "description" : "Output string", + "schema" : { + "$ref" : "#/definitions/OuterString" + } + } + } + } + }, + "/fake/outer/boolean" : { + "post" : { + "tags" : [ "fake" ], + "description" : "Test serialization of outer boolean types", + "operationId" : "fakeOuterBooleanSerialize", + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Input boolean as post body", + "required" : false, + "schema" : { + "$ref" : "#/definitions/OuterBoolean" + } + } ], + "responses" : { + "200" : { + "description" : "Output boolean", + "schema" : { + "$ref" : "#/definitions/OuterBoolean" + } + } + } + } + }, + "/fake/outer/composite" : { + "post" : { + "tags" : [ "fake" ], + "description" : "Test serialization of object with outer number type", + "operationId" : "fakeOuterCompositeSerialize", + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Input composite as post body", + "required" : false, + "schema" : { + "$ref" : "#/definitions/OuterComposite" + } + } ], + "responses" : { + "200" : { + "description" : "Output composite", + "schema" : { + "$ref" : "#/definitions/OuterComposite" + } + } + } + } + }, + "/fake/jsonFormData" : { + "get" : { + "tags" : [ "fake" ], + "summary" : "test json serialization of form data", + "description" : "", + "operationId" : "testJsonFormData", + "consumes" : [ "application/json" ], + "parameters" : [ { + "name" : "param", + "in" : "formData", + "description" : "field1", + "required" : true, + "type" : "string" + }, { + "name" : "param2", + "in" : "formData", + "description" : "field2", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation" + } + } + } + }, + "/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?" ], + "summary" : "To test special tags", + "description" : "To test special tags", + "operationId" : "test_special_tags", + "consumes" : [ "application/json" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "client model", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Client" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Client" + } + } + } + } + } + }, + "securityDefinitions" : { + "petstore_auth" : { + "type" : "oauth2", + "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", + "flow" : "implicit", + "scopes" : { + "write:pets" : "modify pets in your account", + "read:pets" : "read your pets" + } + }, + "api_key" : { + "type" : "apiKey", + "name" : "api_key", + "in" : "header" + }, + "api_key_query" : { + "type" : "apiKey", + "name" : "api_key_query", + "in" : "query" + }, + "http_basic_test" : { + "type" : "basic" + } + }, + "definitions" : { + "Order" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "petId" : { + "type" : "integer", + "format" : "int64" + }, + "quantity" : { + "type" : "integer", + "format" : "int32" + }, + "shipDate" : { + "type" : "string", + "format" : "date-time" + }, + "status" : { + "type" : "string", + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ] + }, + "complete" : { + "type" : "boolean", + "default" : false + } + }, + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "xml" : { + "name" : "Category" + } + }, + "User" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64", + "x-is-unique" : true + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string", + "x-obfuscated" : true + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "type" : "integer", + "format" : "int32", + "description" : "User Status" + } + }, + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "type" : "object", + "required" : [ "name", "photoUrls" ], + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64", + "x-is-unique" : true + }, + "category" : { + "$ref" : "#/definitions/Category" + }, + "name" : { + "type" : "string", + "example" : "doggie" + }, + "photoUrls" : { + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + }, + "items" : { + "type" : "string" + } + }, + "tags" : { + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + }, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "status" : { + "type" : "string", + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ] + } + }, + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + } + }, + "$special[model.name]" : { + "properties" : { + "$special[property.name]" : { + "type" : "integer", + "format" : "int64" + } + }, + "xml" : { + "name" : "$special[model.name]" + } + }, + "Return" : { + "properties" : { + "return" : { + "type" : "integer", + "format" : "int32" + } + }, + "description" : "Model for testing reserved words", + "xml" : { + "name" : "Return" + } + }, + "Name" : { + "required" : [ "name" ], + "properties" : { + "name" : { + "type" : "integer", + "format" : "int32" + }, + "snake_case" : { + "type" : "integer", + "format" : "int32", + "readOnly" : true + }, + "property" : { + "type" : "string" + }, + "123Number" : { + "type" : "integer", + "readOnly" : true + } + }, + "description" : "Model for testing model name same as property name", + "xml" : { + "name" : "Name" + } + }, + "200_response" : { + "properties" : { + "name" : { + "type" : "integer", + "format" : "int32" + }, + "class" : { + "type" : "string" + } + }, + "description" : "Model for testing model name starting with number", + "xml" : { + "name" : "Name" + } + }, + "ClassModel" : { + "properties" : { + "_class" : { + "type" : "string" + } + }, + "description" : "Model for testing model with \"_class\" property" + }, + "Dog" : { + "allOf" : [ { + "$ref" : "#/definitions/Animal" + }, { + "type" : "object", + "properties" : { + "breed" : { + "type" : "string" + } + } + } ] + }, + "Cat" : { + "allOf" : [ { + "$ref" : "#/definitions/Animal" + }, { + "type" : "object", + "properties" : { + "declawed" : { + "type" : "boolean" + } + } + } ] + }, + "Animal" : { + "type" : "object", + "required" : [ "className" ], + "discriminator" : "className", + "properties" : { + "className" : { + "type" : "string" + }, + "color" : { + "type" : "string", + "default" : "red" + } + } + }, + "AnimalFarm" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Animal" + } + }, + "format_test" : { + "type" : "object", + "required" : [ "byte", "date", "number", "password" ], + "properties" : { + "integer" : { + "type" : "integer", + "minimum" : 10, + "maximum" : 100 + }, + "int32" : { + "type" : "integer", + "format" : "int32", + "minimum" : 20, + "maximum" : 200 + }, + "int64" : { + "type" : "integer", + "format" : "int64" + }, + "number" : { + "type" : "number", + "minimum" : 32.1, + "maximum" : 543.2 + }, + "float" : { + "type" : "number", + "format" : "float", + "minimum" : 54.3, + "maximum" : 987.6 + }, + "double" : { + "type" : "number", + "format" : "double", + "minimum" : 67.8, + "maximum" : 123.4 + }, + "string" : { + "type" : "string", + "pattern" : "/[a-z]/i" + }, + "byte" : { + "type" : "string", + "format" : "byte", + "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + }, + "binary" : { + "type" : "string", + "format" : "binary" + }, + "date" : { + "type" : "string", + "format" : "date" + }, + "dateTime" : { + "type" : "string", + "format" : "date-time" + }, + "uuid" : { + "type" : "string", + "format" : "uuid" + }, + "password" : { + "type" : "string", + "format" : "password", + "minLength" : 10, + "maxLength" : 64 + } + } + }, + "EnumClass" : { + "type" : "string", + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" + }, + "Enum_Test" : { + "type" : "object", + "properties" : { + "enum_string" : { + "type" : "string", + "enum" : [ "UPPER", "lower", "" ] + }, + "enum_integer" : { + "type" : "integer", + "format" : "int32", + "enum" : [ 1, -1 ] + }, + "enum_number" : { + "type" : "number", + "format" : "double", + "enum" : [ 1.1, -1.2 ] + }, + "outerEnum" : { + "$ref" : "#/definitions/OuterEnum" + } + } + }, + "AdditionalPropertiesClass" : { + "type" : "object", + "properties" : { + "map_property" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, + "map_of_map_property" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + } + } + }, + "MixedPropertiesAndAdditionalPropertiesClass" : { + "type" : "object", + "properties" : { + "uuid" : { + "type" : "string", + "format" : "uuid" + }, + "dateTime" : { + "type" : "string", + "format" : "date-time" + }, + "map" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/Animal" + } + } + } + }, + "List" : { + "type" : "object", + "properties" : { + "123-list" : { + "type" : "string" + } + } + }, + "Client" : { + "type" : "object", + "properties" : { + "client" : { + "type" : "string" + } + } + }, + "ReadOnlyFirst" : { + "type" : "object", + "properties" : { + "bar" : { + "type" : "string", + "readOnly" : true + }, + "baz" : { + "type" : "string" + } + } + }, + "hasOnlyReadOnly" : { + "type" : "object", + "properties" : { + "bar" : { + "type" : "string", + "readOnly" : true + }, + "foo" : { + "type" : "string", + "readOnly" : true + } + } + }, + "Capitalization" : { + "type" : "object", + "properties" : { + "smallCamel" : { + "type" : "string" + }, + "CapitalCamel" : { + "type" : "string" + }, + "small_Snake" : { + "type" : "string" + }, + "Capital_Snake" : { + "type" : "string" + }, + "SCA_ETH_Flow_Points" : { + "type" : "string" + }, + "ATT_NAME" : { + "type" : "string", + "description" : "Name of the pet\n" + } + } + }, + "MapTest" : { + "type" : "object", + "properties" : { + "map_map_of_string" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + }, + "map_of_enum_string" : { + "type" : "object", + "additionalProperties" : { + "type" : "string", + "enum" : [ "UPPER", "lower" ] + } + } + } + }, + "ArrayTest" : { + "type" : "object", + "properties" : { + "array_of_string" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "array_array_of_integer" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } + } + }, + "array_array_of_model" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/ReadOnlyFirst" + } + } + } + } + }, + "NumberOnly" : { + "type" : "object", + "properties" : { + "JustNumber" : { + "type" : "number" + } + } + }, + "ArrayOfNumberOnly" : { + "type" : "object", + "properties" : { + "ArrayNumber" : { + "type" : "array", + "items" : { + "type" : "number" + } + } + } + }, + "ArrayOfArrayOfNumberOnly" : { + "type" : "object", + "properties" : { + "ArrayArrayNumber" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "type" : "number" + } + } + } + } + }, + "EnumArrays" : { + "type" : "object", + "properties" : { + "just_symbol" : { + "type" : "string", + "enum" : [ ">=", "$" ] + }, + "array_enum" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "fish", "crab" ] + } + } + } + }, + "OuterEnum" : { + "type" : "string", + "enum" : [ "placed", "approved", "delivered" ] + }, + "OuterComposite" : { + "type" : "object", + "properties" : { + "my_number" : { + "$ref" : "#/definitions/OuterNumber" + }, + "my_string" : { + "$ref" : "#/definitions/OuterString" + }, + "my_boolean" : { + "$ref" : "#/definitions/OuterBoolean" + } + } + }, + "OuterNumber" : { + "type" : "number" + }, + "OuterString" : { + "type" : "string" + }, + "OuterBoolean" : { + "type" : "boolean" + } + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + } } \ 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 39f7c494893..8c345d48cb6 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 Response testEnumParameters(@FormParam(value = "enum_form_string_array") 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/src/gen/java/io/swagger/api/RestApplication.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/RestApplication.java index 56e801bbf5f..2561172aea9 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/RestApplication.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/api/RestApplication.java @@ -5,5 +5,5 @@ @ApplicationPath("/") public class RestApplication extends Application { - -} \ No newline at end of file + +} diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java index 6aa5fc2b980..063fa31c019 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.HashMap; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Animal.java index bb54e9cad22..4d831f90103 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Animal.java @@ -1,3 +1,16 @@ +/* + * 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.model; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -87,9 +100,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AnimalFarm.java index f14a33d343e..b78c8bee48c 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AnimalFarm.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.model.Animal; @@ -48,9 +61,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 0be06450317..d08fb2aadf6 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.math.BigDecimal; @@ -67,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java index c131d2c633a..628b1de355e 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.math.BigDecimal; @@ -67,9 +80,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayTest.java index 1720cde126c..095fbc34377 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.model.ReadOnlyFirst; @@ -107,9 +120,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Capitalization.java index 00402e4788a..85e48715797 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Capitalization.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -165,9 +178,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Cat.java index 086c6462d8e..1fe2e75320e 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Cat.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.model.Animal; @@ -65,9 +78,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Category.java index 1e5c20bf730..4603f751d16 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Category.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -84,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ClassModel.java index c05c7b4a9b6..64cb3be6d7b 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ClassModel.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.annotations.ApiModel; @@ -68,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Client.java index 61c2aef0512..a8d00c746c2 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Client.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Client.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -64,9 +77,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Dog.java index 8c1d2c3f85b..6393e232c84 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Dog.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.model.Animal; @@ -65,9 +78,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumArrays.java index 595f687217d..d2745a8ddc1 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumArrays.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.ArrayList; @@ -148,9 +161,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumClass.java index 13cf0a338e7..884fb782ab8 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumClass.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumTest.java index d704287dd95..11bb43234e4 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.model.OuterEnum; @@ -218,9 +231,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/FormatTest.java index bb3072fe1e9..dab7cc190da 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/FormatTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.math.BigDecimal; @@ -322,9 +335,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index ef9c2728846..13aafdb24f8 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -84,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MapTest.java index 54abae05490..6d29c51841d 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MapTest.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.HashMap; @@ -118,9 +131,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 673adda125e..51f847a805d 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.model.Animal; @@ -110,9 +123,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Model200Response.java index eeb8e7547cf..1dac69350a1 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Model200Response.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.annotations.ApiModel; @@ -88,9 +101,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelApiResponse.java index e97b1fdfd8b..28f716828f4 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -104,9 +117,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelReturn.java index 72a677f7ab0..872fc7e1c95 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelReturn.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.annotations.ApiModel; @@ -68,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Name.java index 5460ff8a9b9..e4f0645d942 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Name.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.annotations.ApiModel; @@ -129,9 +142,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NumberOnly.java index 5f02fd0649a..e98d7b63dc3 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NumberOnly.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.math.BigDecimal; @@ -65,9 +78,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Order.java index f7665f15a54..e5febb662ee 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Order.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.util.Date; @@ -197,9 +210,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterComposite.java index bfe8211b654..666268371bb 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterComposite.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.math.BigDecimal; @@ -105,9 +118,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterEnum.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterEnum.java index d682c3f5080..f42c4fc1978 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterEnum.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterEnum.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Pet.java index fc8a6796b79..352203ce60e 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Pet.java @@ -1,3 +1,16 @@ +/* + * 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.model; import io.swagger.model.Category; @@ -202,9 +215,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ReadOnlyFirst.java index bd4ee7e1cb1..4fbd86aa283 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -84,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SpecialModelName.java index b8144314b82..406eb959d83 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SpecialModelName.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -64,9 +77,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Tag.java index 10a7ffc7c57..5eafc2bebf2 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Tag.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -84,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/User.java index a86f0eae070..61a1bb3a622 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/User.java @@ -1,3 +1,16 @@ +/* + * 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.model; import java.io.Serializable; @@ -193,7 +206,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -205,9 +218,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..5cc7edd42cb --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..14db584c435 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..c88bf4eef82 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,50 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..15eee022793 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..5452d36b8f2 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..945511a7658 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..de250fd985b --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..777a81dcc47 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..4b71cbbe16f --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..3bb35f3d92a --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..2c0d2bfc308 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..6da0014b379 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..cb6feff0526 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,50 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..966d6357179 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,43 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..c20805b5c47 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..37952f15808 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; +import java.util.Date; +import java.util.UUID; +import org.joda.time.LocalDate; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..7e902fea4ee --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..b457755d001 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..572a6785069 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..c79c7e3b03b --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..4fd17dad5bf --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..1d9320c3a70 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..a742aa3f725 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.annotations.ApiModel; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..6626b163ed6 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..deac0c45bfc --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.util.Date; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..3c5ef1c5df1 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,49 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..1c298732899 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,43 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..3a3ac6041f5 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..52fc9c7305e --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..ea796d3b052 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..18dc6d484ec --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,48 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..f6a6637bf58 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..8014ad95bf6 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,88 @@ +/* + * 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.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-spec/swagger.json b/samples/server/petstore/jaxrs-spec/swagger.json index 5b53d7108d0..adf9c0f817b 100644 --- a/samples/server/petstore/jaxrs-spec/swagger.json +++ b/samples/server/petstore/jaxrs-spec/swagger.json @@ -1,1693 +1,1720 @@ -{ - "swagger" : "2.0", - "info" : { - "description" : "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\", - "version" : "1.0.0", - "title" : "Swagger Petstore", - "termsOfService" : "http://swagger.io/terms/", - "contact" : { - "email" : "apiteam@swagger.io" - }, - "license" : { - "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "host" : "petstore.swagger.io:80", - "basePath" : "/v2", - "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets", - "externalDocs" : { - "description" : "Find out more", - "url" : "http://swagger.io" - } - }, { - "name" : "store", - "description" : "Access to Petstore orders" - }, { - "name" : "user", - "description" : "Operations about user", - "externalDocs" : { - "description" : "Find out more about our store", - "url" : "http://swagger.io" - } - } ], - "schemes" : [ "http" ], - "paths" : { - "/pet" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "description" : "", - "operationId" : "addPet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - }, - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "description" : "", - "operationId" : "updatePet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - } - }, - "/pet/findByStatus" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "status", - "in" : "query", - "description" : "Status values that need to be considered for filter", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - } - }, - "/pet/findByTags" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "tags", - "in" : "query", - "description" : "Tags to filter by", - "required" : true, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "deprecated" : true - } - }, - "/pet/{petId}" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", - "description" : "Returns a single pet", - "operationId" : "getPetById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to return", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Pet" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ] - }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", - "description" : "", - "operationId" : "updatePetWithForm", - "consumes" : [ "application/x-www-form-urlencoded" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet that needs to be updated", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "name", - "in" : "formData", - "description" : "Updated name of the pet", - "required" : false, - "type" : "string" - }, { - "name" : "status", - "in" : "formData", - "description" : "Updated status of the pet", - "required" : false, - "type" : "string" - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "description" : "", - "operationId" : "deletePet", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "required" : false, - "type" : "string" - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", - "description" : "", - "operationId" : "uploadFile", - "consumes" : [ "multipart/form-data" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to update", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "additionalMetadata", - "in" : "formData", - "description" : "Additional data to pass to server", - "required" : false, - "type" : "string" - }, { - "name" : "file", - "in" : "formData", - "description" : "file to upload", - "required" : false, - "type" : "file" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/ApiResponse" - } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ] - } - }, - "/store/inventory" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "produces" : [ "application/json" ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } - } - } - }, - "security" : [ { - "api_key" : [ ] - } ] - } - }, - "/store/order" : { - "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", - "description" : "", - "operationId" : "placeOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "order placed for purchasing the pet", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Order" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid Order" - } - } - } - }, - "/store/order/{order_id}" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "order_id", - "in" : "path", - "description" : "ID of pet that needs to be fetched", - "required" : true, - "type" : "integer", - "maximum" : 5, - "minimum" : 1, - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - } - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "order_id", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - } - } - }, - "/user" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Create user", - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Created user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - } - } - }, - "/user/createWithArray" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithArrayInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - } - } - }, - "/user/createWithList" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithListInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - } - } - }, - "/user/login" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", - "description" : "", - "operationId" : "loginUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "query", - "description" : "The user name for login", - "required" : true, - "type" : "string" - }, { - "name" : "password", - "in" : "query", - "description" : "The password for login in clear text", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "string" - }, - "headers" : { - "X-Rate-Limit" : { - "type" : "integer", - "format" : "int32", - "description" : "calls per hour allowed by the user" - }, - "X-Expires-After" : { - "type" : "string", - "format" : "date-time", - "description" : "date in UTC when toekn expires" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - } - } - }, - "/user/logout" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", - "description" : "", - "operationId" : "logoutUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ ], - "responses" : { - "default" : { - "description" : "successful operation" - } - } - } - }, - "/user/{username}" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", - "description" : "", - "operationId" : "getUserByName", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be fetched. Use user1 for testing. ", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/User" - } - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - } - }, - "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "name that need to be deleted", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Updated user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - } - }, - "delete" : { - "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - } - } - }, - "/fake_classname_test" : { - "patch" : { - "tags" : [ "fake_classname_tags 123#$%^" ], - "summary" : "To test class name in snake case", - "operationId" : "testClassname", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "client model", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Client" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Client" - } - } - }, - "security" : [ { - "api_key_query" : [ ] - } ] - } - }, - "/fake" : { - "get" : { - "tags" : [ "fake" ], - "summary" : "To test enum parameters", - "description" : "To test enum parameters", - "operationId" : "testEnumParameters", - "consumes" : [ "*/*" ], - "produces" : [ "*/*" ], - "parameters" : [ { - "name" : "enum_form_string_array", - "in" : "formData", - "description" : "Form parameter enum test (string array)", - "required" : false, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" - } - }, { - "name" : "enum_form_string", - "in" : "formData", - "description" : "Form parameter enum test (string)", - "required" : false, - "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] - }, { - "name" : "enum_header_string_array", - "in" : "header", - "description" : "Header parameter enum test (string array)", - "required" : false, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" - } - }, { - "name" : "enum_header_string", - "in" : "header", - "description" : "Header parameter enum test (string)", - "required" : false, - "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] - }, { - "name" : "enum_query_string_array", - "in" : "query", - "description" : "Query parameter enum test (string array)", - "required" : false, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ ">", "$" ], - "default" : "$" - } - }, { - "name" : "enum_query_string", - "in" : "query", - "description" : "Query parameter enum test (string)", - "required" : false, - "type" : "string", - "default" : "-efg", - "enum" : [ "_abc", "-efg", "(xyz)" ] - }, { - "name" : "enum_query_integer", - "in" : "query", - "description" : "Query parameter enum test (double)", - "required" : false, - "type" : "integer", - "format" : "int32", - "enum" : [ 1, -2 ] - }, { - "name" : "enum_query_double", - "in" : "formData", - "description" : "Query parameter enum test (double)", - "required" : false, - "type" : "number", - "format" : "double", - "enum" : [ 1.1, -1.2 ] - } ], - "responses" : { - "400" : { - "description" : "Invalid request" - }, - "404" : { - "description" : "Not found" - } - } - }, - "post" : { - "tags" : [ "fake" ], - "summary" : "Fake endpoint for testing various parameters\n假端點\n偽のエンドポイント\n가짜 엔드 포인트\n", - "description" : "Fake endpoint for testing various parameters\n假端點\n偽のエンドポイント\n가짜 엔드 포인트\n", - "operationId" : "testEndpointParameters", - "consumes" : [ "application/xml; charset=utf-8", "application/json; charset=utf-8" ], - "produces" : [ "application/xml; charset=utf-8", "application/json; charset=utf-8" ], - "parameters" : [ { - "name" : "integer", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "integer", - "maximum" : 100, - "minimum" : 10 - }, { - "name" : "int32", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "integer", - "maximum" : 200, - "minimum" : 20, - "format" : "int32" - }, { - "name" : "int64", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "integer", - "format" : "int64" - }, { - "name" : "number", - "in" : "formData", - "description" : "None", - "required" : true, - "type" : "number", - "maximum" : 543.2, - "minimum" : 32.1 - }, { - "name" : "float", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "number", - "maximum" : 987.6, - "format" : "float" - }, { - "name" : "double", - "in" : "formData", - "description" : "None", - "required" : true, - "type" : "number", - "maximum" : 123.4, - "minimum" : 67.8, - "format" : "double" - }, { - "name" : "string", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "pattern" : "/[a-z]/i" - }, { - "name" : "pattern_without_delimiter", - "in" : "formData", - "description" : "None", - "required" : true, - "type" : "string", - "pattern" : "^[A-Z].*" - }, { - "name" : "byte", - "in" : "formData", - "description" : "None", - "required" : true, - "type" : "string", - "format" : "byte" - }, { - "name" : "binary", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "format" : "binary" - }, { - "name" : "date", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "format" : "date" - }, { - "name" : "dateTime", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "format" : "date-time" - }, { - "name" : "password", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string", - "maxLength" : 64, - "minLength" : 10, - "format" : "password" - }, { - "name" : "callback", - "in" : "formData", - "description" : "None", - "required" : false, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "security" : [ { - "http_basic_test" : [ ] - } ] - }, - "patch" : { - "tags" : [ "fake" ], - "summary" : "To test \"client\" model", - "description" : "To test \"client\" model", - "operationId" : "testClientModel", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "client model", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Client" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Client" - } - } - } - } - }, - "/fake/outer/number" : { - "post" : { - "tags" : [ "fake" ], - "description" : "Test serialization of outer number types", - "operationId" : "fakeOuterNumberSerialize", - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Input number as post body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/OuterNumber" - } - } ], - "responses" : { - "200" : { - "description" : "Output number", - "schema" : { - "$ref" : "#/definitions/OuterNumber" - } - } - } - } - }, - "/fake/outer/string" : { - "post" : { - "tags" : [ "fake" ], - "description" : "Test serialization of outer string types", - "operationId" : "fakeOuterStringSerialize", - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Input string as post body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/OuterString" - } - } ], - "responses" : { - "200" : { - "description" : "Output string", - "schema" : { - "$ref" : "#/definitions/OuterString" - } - } - } - } - }, - "/fake/outer/boolean" : { - "post" : { - "tags" : [ "fake" ], - "description" : "Test serialization of outer boolean types", - "operationId" : "fakeOuterBooleanSerialize", - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Input boolean as post body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/OuterBoolean" - } - } ], - "responses" : { - "200" : { - "description" : "Output boolean", - "schema" : { - "$ref" : "#/definitions/OuterBoolean" - } - } - } - } - }, - "/fake/outer/composite" : { - "post" : { - "tags" : [ "fake" ], - "description" : "Test serialization of object with outer number type", - "operationId" : "fakeOuterCompositeSerialize", - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Input composite as post body", - "required" : false, - "schema" : { - "$ref" : "#/definitions/OuterComposite" - } - } ], - "responses" : { - "200" : { - "description" : "Output composite", - "schema" : { - "$ref" : "#/definitions/OuterComposite" - } - } - } - } - }, - "/fake/jsonFormData" : { - "get" : { - "tags" : [ "fake" ], - "summary" : "test json serialization of form data", - "description" : "", - "operationId" : "testJsonFormData", - "consumes" : [ "application/json" ], - "parameters" : [ { - "name" : "param", - "in" : "formData", - "description" : "field1", - "required" : true, - "type" : "string" - }, { - "name" : "param2", - "in" : "formData", - "description" : "field2", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation" - } - } - } - }, - "/another-fake/dummy" : { - "patch" : { - "tags" : [ "$another-fake?" ], - "summary" : "To test special tags", - "description" : "To test special tags", - "operationId" : "test_special_tags", - "consumes" : [ "application/json" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "client model", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Client" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Client" - } - } - } - } - } - }, - "securityDefinitions" : { - "petstore_auth" : { - "type" : "oauth2", - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "flow" : "implicit", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - }, - "api_key" : { - "type" : "apiKey", - "name" : "api_key", - "in" : "header" - }, - "api_key_query" : { - "type" : "apiKey", - "name" : "api_key_query", - "in" : "query" - }, - "http_basic_test" : { - "type" : "basic" - } - }, - "definitions" : { - "Order" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "petId" : { - "type" : "integer", - "format" : "int64" - }, - "quantity" : { - "type" : "integer", - "format" : "int32" - }, - "shipDate" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] - }, - "complete" : { - "type" : "boolean", - "default" : false - } - }, - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "xml" : { - "name" : "Category" - } - }, - "User" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64", - "x-is-unique" : true - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "type" : "integer", - "format" : "int32", - "description" : "User Status" - } - }, - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "type" : "object", - "required" : [ "name", "photoUrls" ], - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64", - "x-is-unique" : true - }, - "category" : { - "$ref" : "#/definitions/Category" - }, - "name" : { - "type" : "string", - "example" : "doggie" - }, - "photoUrls" : { - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - }, - "items" : { - "type" : "string" - } - }, - "tags" : { - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - }, - "items" : { - "$ref" : "#/definitions/Tag" - } - }, - "status" : { - "type" : "string", - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] - } - }, - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "integer", - "format" : "int32" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - } - }, - "$special[model.name]" : { - "properties" : { - "$special[property.name]" : { - "type" : "integer", - "format" : "int64" - } - }, - "xml" : { - "name" : "$special[model.name]" - } - }, - "Return" : { - "properties" : { - "return" : { - "type" : "integer", - "format" : "int32" - } - }, - "description" : "Model for testing reserved words", - "xml" : { - "name" : "Return" - } - }, - "Name" : { - "required" : [ "name" ], - "properties" : { - "name" : { - "type" : "integer", - "format" : "int32" - }, - "snake_case" : { - "type" : "integer", - "format" : "int32", - "readOnly" : true - }, - "property" : { - "type" : "string" - }, - "123Number" : { - "type" : "integer", - "readOnly" : true - } - }, - "description" : "Model for testing model name same as property name", - "xml" : { - "name" : "Name" - } - }, - "200_response" : { - "properties" : { - "name" : { - "type" : "integer", - "format" : "int32" - }, - "class" : { - "type" : "string" - } - }, - "description" : "Model for testing model name starting with number", - "xml" : { - "name" : "Name" - } - }, - "ClassModel" : { - "properties" : { - "_class" : { - "type" : "string" - } - }, - "description" : "Model for testing model with \"_class\" property" - }, - "Dog" : { - "allOf" : [ { - "$ref" : "#/definitions/Animal" - }, { - "type" : "object", - "properties" : { - "breed" : { - "type" : "string" - } - } - } ] - }, - "Cat" : { - "allOf" : [ { - "$ref" : "#/definitions/Animal" - }, { - "type" : "object", - "properties" : { - "declawed" : { - "type" : "boolean" - } - } - } ] - }, - "Animal" : { - "type" : "object", - "required" : [ "className" ], - "discriminator" : "className", - "properties" : { - "className" : { - "type" : "string" - }, - "color" : { - "type" : "string", - "default" : "red" - } - } - }, - "AnimalFarm" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Animal" - } - }, - "format_test" : { - "type" : "object", - "required" : [ "byte", "date", "number", "password" ], - "properties" : { - "integer" : { - "type" : "integer", - "minimum" : 10, - "maximum" : 100 - }, - "int32" : { - "type" : "integer", - "format" : "int32", - "minimum" : 20, - "maximum" : 200 - }, - "int64" : { - "type" : "integer", - "format" : "int64" - }, - "number" : { - "type" : "number", - "minimum" : 32.1, - "maximum" : 543.2 - }, - "float" : { - "type" : "number", - "format" : "float", - "minimum" : 54.3, - "maximum" : 987.6 - }, - "double" : { - "type" : "number", - "format" : "double", - "minimum" : 67.8, - "maximum" : 123.4 - }, - "string" : { - "type" : "string", - "pattern" : "/[a-z]/i" - }, - "byte" : { - "type" : "string", - "format" : "byte", - "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" - }, - "binary" : { - "type" : "string", - "format" : "binary" - }, - "date" : { - "type" : "string", - "format" : "date" - }, - "dateTime" : { - "type" : "string", - "format" : "date-time" - }, - "uuid" : { - "type" : "string", - "format" : "uuid" - }, - "password" : { - "type" : "string", - "format" : "password", - "minLength" : 10, - "maxLength" : 64 - } - } - }, - "EnumClass" : { - "type" : "string", - "enum" : [ "_abc", "-efg", "(xyz)" ], - "default" : "-efg" - }, - "Enum_Test" : { - "type" : "object", - "properties" : { - "enum_string" : { - "type" : "string", - "enum" : [ "UPPER", "lower", "" ] - }, - "enum_integer" : { - "type" : "integer", - "format" : "int32", - "enum" : [ 1, -1 ] - }, - "enum_number" : { - "type" : "number", - "format" : "double", - "enum" : [ 1.1, -1.2 ] - }, - "outerEnum" : { - "$ref" : "#/definitions/OuterEnum" - } - } - }, - "AdditionalPropertiesClass" : { - "type" : "object", - "properties" : { - "map_property" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - }, - "map_of_map_property" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - } - } - } - }, - "MixedPropertiesAndAdditionalPropertiesClass" : { - "type" : "object", - "properties" : { - "uuid" : { - "type" : "string", - "format" : "uuid" - }, - "dateTime" : { - "type" : "string", - "format" : "date-time" - }, - "map" : { - "type" : "object", - "additionalProperties" : { - "$ref" : "#/definitions/Animal" - } - } - } - }, - "List" : { - "type" : "object", - "properties" : { - "123-list" : { - "type" : "string" - } - } - }, - "Client" : { - "type" : "object", - "properties" : { - "client" : { - "type" : "string" - } - } - }, - "ReadOnlyFirst" : { - "type" : "object", - "properties" : { - "bar" : { - "type" : "string", - "readOnly" : true - }, - "baz" : { - "type" : "string" - } - } - }, - "hasOnlyReadOnly" : { - "type" : "object", - "properties" : { - "bar" : { - "type" : "string", - "readOnly" : true - }, - "foo" : { - "type" : "string", - "readOnly" : true - } - } - }, - "Capitalization" : { - "type" : "object", - "properties" : { - "smallCamel" : { - "type" : "string" - }, - "CapitalCamel" : { - "type" : "string" - }, - "small_Snake" : { - "type" : "string" - }, - "Capital_Snake" : { - "type" : "string" - }, - "SCA_ETH_Flow_Points" : { - "type" : "string" - }, - "ATT_NAME" : { - "type" : "string", - "description" : "Name of the pet\n" - } - } - }, - "MapTest" : { - "type" : "object", - "properties" : { - "map_map_of_string" : { - "type" : "object", - "additionalProperties" : { - "type" : "object", - "additionalProperties" : { - "type" : "string" - } - } - }, - "map_of_enum_string" : { - "type" : "object", - "additionalProperties" : { - "type" : "string", - "enum" : [ "UPPER", "lower" ] - } - } - } - }, - "ArrayTest" : { - "type" : "object", - "properties" : { - "array_of_string" : { - "type" : "array", - "items" : { - "type" : "string" - } - }, - "array_array_of_integer" : { - "type" : "array", - "items" : { - "type" : "array", - "items" : { - "type" : "integer", - "format" : "int64" - } - } - }, - "array_array_of_model" : { - "type" : "array", - "items" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/ReadOnlyFirst" - } - } - } - } - }, - "NumberOnly" : { - "type" : "object", - "properties" : { - "JustNumber" : { - "type" : "number" - } - } - }, - "ArrayOfNumberOnly" : { - "type" : "object", - "properties" : { - "ArrayNumber" : { - "type" : "array", - "items" : { - "type" : "number" - } - } - } - }, - "ArrayOfArrayOfNumberOnly" : { - "type" : "object", - "properties" : { - "ArrayArrayNumber" : { - "type" : "array", - "items" : { - "type" : "array", - "items" : { - "type" : "number" - } - } - } - } - }, - "EnumArrays" : { - "type" : "object", - "properties" : { - "just_symbol" : { - "type" : "string", - "enum" : [ ">=", "$" ] - }, - "array_enum" : { - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "fish", "crab" ] - } - } - } - }, - "OuterEnum" : { - "type" : "string", - "enum" : [ "placed", "approved", "delivered" ] - }, - "OuterComposite" : { - "type" : "object", - "properties" : { - "my_number" : { - "$ref" : "#/definitions/OuterNumber" - }, - "my_string" : { - "$ref" : "#/definitions/OuterString" - }, - "my_boolean" : { - "$ref" : "#/definitions/OuterBoolean" - } - } - }, - "OuterNumber" : { - "type" : "number" - }, - "OuterString" : { - "type" : "string" - }, - "OuterBoolean" : { - "type" : "boolean" - } - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - } +{ + "swagger" : "2.0", + "info" : { + "description" : "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\", + "version" : "1.0.0", + "title" : "Swagger Petstore", + "termsOfService" : "http://swagger.io/terms/", + "contact" : { + "email" : "apiteam@swagger.io" + }, + "license" : { + "name" : "Apache-2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "host" : "petstore.swagger.io:80", + "basePath" : "/v2", + "tags" : [ { + "name" : "pet", + "description" : "Everything about your Pets", + "externalDocs" : { + "description" : "Find out more", + "url" : "http://swagger.io" + } + }, { + "name" : "store", + "description" : "Access to Petstore orders" + }, { + "name" : "user", + "description" : "Operations about user", + "externalDocs" : { + "description" : "Find out more about our store", + "url" : "http://swagger.io" + } + } ], + "schemes" : [ "http" ], + "paths" : { + "/pet" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "Add a new pet to the store", + "description" : "", + "operationId" : "addPet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + }, + "put" : { + "tags" : [ "pet" ], + "summary" : "Update an existing pet", + "description" : "", + "operationId" : "updatePet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + }, + "405" : { + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + } + }, + "/pet/findByStatus" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by status", + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "status", + "in" : "query", + "description" : "Status values that need to be considered for filter", + "required" : true, + "type" : "array", + "items" : { + "type" : "string", + "default" : "available", + "enum" : [ "available", "pending", "sold" ] + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid status value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + } + }, + "/pet/findByTags" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by tags", + "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId" : "findPetsByTags", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "tags", + "in" : "query", + "description" : "Tags to filter by", + "required" : true, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid tag value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "deprecated" : true + } + }, + "/pet/{petId}" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Find pet by ID", + "description" : "Returns a single pet", + "operationId" : "getPetById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to return", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Pet" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ] + }, + "post" : { + "tags" : [ "pet" ], + "summary" : "Updates a pet in the store with form data", + "description" : "", + "operationId" : "updatePetWithForm", + "consumes" : [ "application/x-www-form-urlencoded" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet that needs to be updated", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "name", + "in" : "formData", + "description" : "Updated name of the pet", + "required" : false, + "type" : "string" + }, { + "name" : "status", + "in" : "formData", + "description" : "Updated status of the pet", + "required" : false, + "type" : "string" + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + }, + "delete" : { + "tags" : [ "pet" ], + "summary" : "Deletes a pet", + "description" : "", + "operationId" : "deletePet", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "api_key", + "in" : "header", + "required" : false, + "type" : "string" + }, { + "name" : "petId", + "in" : "path", + "description" : "Pet id to delete", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "400" : { + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + } + }, + "/pet/{petId}/uploadImage" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "description" : "", + "operationId" : "uploadFile", + "consumes" : [ "multipart/form-data" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "additionalMetadata", + "in" : "formData", + "description" : "Additional data to pass to server", + "required" : false, + "type" : "string" + }, { + "name" : "file", + "in" : "formData", + "description" : "file to upload", + "required" : false, + "type" : "file" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/ApiResponse" + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ] + } + }, + "/store/inventory" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Returns pet inventories by status", + "description" : "Returns a map of status codes to quantities", + "operationId" : "getInventory", + "produces" : [ "application/json" ], + "parameters" : [ ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int32" + } + } + } + }, + "security" : [ { + "api_key" : [ ] + } ] + } + }, + "/store/order" : { + "post" : { + "tags" : [ "store" ], + "summary" : "Place an order for a pet", + "description" : "", + "operationId" : "placeOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "order placed for purchasing the pet", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Order" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid Order" + } + } + } + }, + "/store/order/{order_id}" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Find purchase order by ID", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId" : "getOrderById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "order_id", + "in" : "path", + "description" : "ID of pet that needs to be fetched", + "required" : true, + "type" : "integer", + "maximum" : 5, + "minimum" : 1, + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + } + }, + "delete" : { + "tags" : [ "store" ], + "summary" : "Delete purchase order by ID", + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "order_id", + "in" : "path", + "description" : "ID of the order that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + } + } + }, + "/user" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Create user", + "description" : "This can only be done by the logged in user.", + "operationId" : "createUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Created user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + } + } + }, + "/user/createWithArray" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithArrayInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + } + } + }, + "/user/createWithList" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithListInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + } + } + }, + "/user/login" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs user into the system", + "description" : "", + "operationId" : "loginUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "query", + "description" : "The user name for login", + "required" : true, + "type" : "string" + }, { + "name" : "password", + "in" : "query", + "description" : "The password for login in clear text", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "string" + }, + "headers" : { + "X-Rate-Limit" : { + "type" : "integer", + "format" : "int32", + "description" : "calls per hour allowed by the user" + }, + "X-Expires-After" : { + "type" : "string", + "format" : "date-time", + "description" : "date in UTC when toekn expires" + } + } + }, + "400" : { + "description" : "Invalid username/password supplied" + } + } + } + }, + "/user/logout" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs out current logged in user session", + "description" : "", + "operationId" : "logoutUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ ], + "responses" : { + "default" : { + "description" : "successful operation" + } + } + } + }, + "/user/{username}" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Get user by user name", + "description" : "", + "operationId" : "getUserByName", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be fetched. Use user1 for testing. ", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/User" + } + }, + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + } + }, + "put" : { + "tags" : [ "user" ], + "summary" : "Updated user", + "description" : "This can only be done by the logged in user.", + "operationId" : "updateUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "name that need to be deleted", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Updated user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid user supplied" + }, + "404" : { + "description" : "User not found" + } + } + }, + "delete" : { + "tags" : [ "user" ], + "summary" : "Delete user", + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + } + } + }, + "/fake_classname_test" : { + "patch" : { + "tags" : [ "fake_classname_tags 123#$%^" ], + "summary" : "To test class name in snake case", + "operationId" : "testClassname", + "consumes" : [ "application/json" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "client model", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Client" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Client" + } + } + }, + "security" : [ { + "api_key_query" : [ ] + } ] + } + }, + "/fake" : { + "get" : { + "tags" : [ "fake" ], + "summary" : "To test enum parameters", + "description" : "To test enum parameters", + "operationId" : "testEnumParameters", + "consumes" : [ "*/*" ], + "produces" : [ "*/*" ], + "parameters" : [ { + "name" : "enum_form_string_array", + "in" : "formData", + "description" : "Form parameter enum test (string array)", + "required" : false, + "type" : "array", + "items" : { + "type" : "string", + "default" : "$", + "enum" : [ ">", "$" ] + } + }, { + "name" : "enum_form_string", + "in" : "formData", + "description" : "Form parameter enum test (string)", + "required" : false, + "type" : "string", + "default" : "-efg", + "enum" : [ "_abc", "-efg", "(xyz)" ] + }, { + "name" : "enum_header_string_array", + "in" : "header", + "description" : "Header parameter enum test (string array)", + "required" : false, + "type" : "array", + "items" : { + "type" : "string", + "default" : "$", + "enum" : [ ">", "$" ] + } + }, { + "name" : "enum_header_string", + "in" : "header", + "description" : "Header parameter enum test (string)", + "required" : false, + "type" : "string", + "default" : "-efg", + "enum" : [ "_abc", "-efg", "(xyz)" ] + }, { + "name" : "enum_query_string_array", + "in" : "query", + "description" : "Query parameter enum test (string array)", + "required" : false, + "type" : "array", + "items" : { + "type" : "string", + "default" : "$", + "enum" : [ ">", "$" ] + } + }, { + "name" : "enum_query_string", + "in" : "query", + "description" : "Query parameter enum test (string)", + "required" : false, + "type" : "string", + "default" : "-efg", + "enum" : [ "_abc", "-efg", "(xyz)" ] + }, { + "name" : "enum_query_integer", + "in" : "query", + "description" : "Query parameter enum test (double)", + "required" : false, + "type" : "integer", + "format" : "int32", + "enum" : [ 1, -2 ] + }, { + "name" : "enum_query_double", + "in" : "formData", + "description" : "Query parameter enum test (double)", + "required" : false, + "type" : "number", + "format" : "double", + "enum" : [ 1.1, -1.2 ] + } ], + "responses" : { + "400" : { + "description" : "Invalid request" + }, + "404" : { + "description" : "Not found" + } + } + }, + "post" : { + "tags" : [ "fake" ], + "summary" : "Fake endpoint for testing various parameters\n???\n?????????\n?? ?? ???\n", + "description" : "Fake endpoint for testing various parameters\n???\n?????????\n?? ?? ???\n", + "operationId" : "testEndpointParameters", + "consumes" : [ "application/xml; charset=utf-8", "application/json; charset=utf-8" ], + "produces" : [ "application/xml; charset=utf-8", "application/json; charset=utf-8" ], + "parameters" : [ { + "name" : "integer", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "integer", + "maximum" : 100, + "minimum" : 10 + }, { + "name" : "int32", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "integer", + "maximum" : 200, + "minimum" : 20, + "format" : "int32" + }, { + "name" : "int64", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "integer", + "format" : "int64" + }, { + "name" : "number", + "in" : "formData", + "description" : "None", + "required" : true, + "type" : "number", + "maximum" : 543.2, + "minimum" : 32.1 + }, { + "name" : "float", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "number", + "maximum" : 987.6, + "format" : "float" + }, { + "name" : "double", + "in" : "formData", + "description" : "None", + "required" : true, + "type" : "number", + "maximum" : 123.4, + "minimum" : 67.8, + "format" : "double" + }, { + "name" : "string", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "pattern" : "/[a-z]/i" + }, { + "name" : "pattern_without_delimiter", + "in" : "formData", + "description" : "None", + "required" : true, + "type" : "string", + "pattern" : "^[A-Z].*" + }, { + "name" : "byte", + "in" : "formData", + "description" : "None", + "required" : true, + "type" : "string", + "format" : "byte" + }, { + "name" : "binary", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "format" : "binary" + }, { + "name" : "date", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "format" : "date" + }, { + "name" : "dateTime", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "format" : "date-time" + }, { + "name" : "password", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string", + "maxLength" : 64, + "minLength" : 10, + "format" : "password" + }, { + "name" : "callback", + "in" : "formData", + "description" : "None", + "required" : false, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "security" : [ { + "http_basic_test" : [ ] + } ] + }, + "patch" : { + "tags" : [ "fake" ], + "summary" : "To test \"client\" model", + "description" : "To test \"client\" model", + "operationId" : "testClientModel", + "consumes" : [ "application/json" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "client model", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Client" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Client" + } + } + } + } + }, + "/fake/outer/number" : { + "post" : { + "tags" : [ "fake" ], + "description" : "Test serialization of outer number types", + "operationId" : "fakeOuterNumberSerialize", + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Input number as post body", + "required" : false, + "schema" : { + "$ref" : "#/definitions/OuterNumber" + } + } ], + "responses" : { + "200" : { + "description" : "Output number", + "schema" : { + "$ref" : "#/definitions/OuterNumber" + } + } + } + } + }, + "/fake/outer/string" : { + "post" : { + "tags" : [ "fake" ], + "description" : "Test serialization of outer string types", + "operationId" : "fakeOuterStringSerialize", + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Input string as post body", + "required" : false, + "schema" : { + "$ref" : "#/definitions/OuterString" + } + } ], + "responses" : { + "200" : { + "description" : "Output string", + "schema" : { + "$ref" : "#/definitions/OuterString" + } + } + } + } + }, + "/fake/outer/boolean" : { + "post" : { + "tags" : [ "fake" ], + "description" : "Test serialization of outer boolean types", + "operationId" : "fakeOuterBooleanSerialize", + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Input boolean as post body", + "required" : false, + "schema" : { + "$ref" : "#/definitions/OuterBoolean" + } + } ], + "responses" : { + "200" : { + "description" : "Output boolean", + "schema" : { + "$ref" : "#/definitions/OuterBoolean" + } + } + } + } + }, + "/fake/outer/composite" : { + "post" : { + "tags" : [ "fake" ], + "description" : "Test serialization of object with outer number type", + "operationId" : "fakeOuterCompositeSerialize", + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Input composite as post body", + "required" : false, + "schema" : { + "$ref" : "#/definitions/OuterComposite" + } + } ], + "responses" : { + "200" : { + "description" : "Output composite", + "schema" : { + "$ref" : "#/definitions/OuterComposite" + } + } + } + } + }, + "/fake/jsonFormData" : { + "get" : { + "tags" : [ "fake" ], + "summary" : "test json serialization of form data", + "description" : "", + "operationId" : "testJsonFormData", + "consumes" : [ "application/json" ], + "parameters" : [ { + "name" : "param", + "in" : "formData", + "description" : "field1", + "required" : true, + "type" : "string" + }, { + "name" : "param2", + "in" : "formData", + "description" : "field2", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation" + } + } + } + }, + "/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?" ], + "summary" : "To test special tags", + "description" : "To test special tags", + "operationId" : "test_special_tags", + "consumes" : [ "application/json" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "client model", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Client" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Client" + } + } + } + } + } + }, + "securityDefinitions" : { + "petstore_auth" : { + "type" : "oauth2", + "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", + "flow" : "implicit", + "scopes" : { + "write:pets" : "modify pets in your account", + "read:pets" : "read your pets" + } + }, + "api_key" : { + "type" : "apiKey", + "name" : "api_key", + "in" : "header" + }, + "api_key_query" : { + "type" : "apiKey", + "name" : "api_key_query", + "in" : "query" + }, + "http_basic_test" : { + "type" : "basic" + } + }, + "definitions" : { + "Order" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "petId" : { + "type" : "integer", + "format" : "int64" + }, + "quantity" : { + "type" : "integer", + "format" : "int32" + }, + "shipDate" : { + "type" : "string", + "format" : "date-time" + }, + "status" : { + "type" : "string", + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ] + }, + "complete" : { + "type" : "boolean", + "default" : false + } + }, + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "xml" : { + "name" : "Category" + } + }, + "User" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64", + "x-is-unique" : true + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string", + "x-obfuscated" : true + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "type" : "integer", + "format" : "int32", + "description" : "User Status" + } + }, + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "type" : "object", + "required" : [ "name", "photoUrls" ], + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64", + "x-is-unique" : true + }, + "category" : { + "$ref" : "#/definitions/Category" + }, + "name" : { + "type" : "string", + "example" : "doggie" + }, + "photoUrls" : { + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + }, + "items" : { + "type" : "string" + } + }, + "tags" : { + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + }, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "status" : { + "type" : "string", + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ] + } + }, + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + } + }, + "$special[model.name]" : { + "properties" : { + "$special[property.name]" : { + "type" : "integer", + "format" : "int64" + } + }, + "xml" : { + "name" : "$special[model.name]" + } + }, + "Return" : { + "properties" : { + "return" : { + "type" : "integer", + "format" : "int32" + } + }, + "description" : "Model for testing reserved words", + "xml" : { + "name" : "Return" + } + }, + "Name" : { + "required" : [ "name" ], + "properties" : { + "name" : { + "type" : "integer", + "format" : "int32" + }, + "snake_case" : { + "type" : "integer", + "format" : "int32", + "readOnly" : true + }, + "property" : { + "type" : "string" + }, + "123Number" : { + "type" : "integer", + "readOnly" : true + } + }, + "description" : "Model for testing model name same as property name", + "xml" : { + "name" : "Name" + } + }, + "200_response" : { + "properties" : { + "name" : { + "type" : "integer", + "format" : "int32" + }, + "class" : { + "type" : "string" + } + }, + "description" : "Model for testing model name starting with number", + "xml" : { + "name" : "Name" + } + }, + "ClassModel" : { + "properties" : { + "_class" : { + "type" : "string" + } + }, + "description" : "Model for testing model with \"_class\" property" + }, + "Dog" : { + "allOf" : [ { + "$ref" : "#/definitions/Animal" + }, { + "type" : "object", + "properties" : { + "breed" : { + "type" : "string" + } + } + } ] + }, + "Cat" : { + "allOf" : [ { + "$ref" : "#/definitions/Animal" + }, { + "type" : "object", + "properties" : { + "declawed" : { + "type" : "boolean" + } + } + } ] + }, + "Animal" : { + "type" : "object", + "required" : [ "className" ], + "discriminator" : "className", + "properties" : { + "className" : { + "type" : "string" + }, + "color" : { + "type" : "string", + "default" : "red" + } + } + }, + "AnimalFarm" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Animal" + } + }, + "format_test" : { + "type" : "object", + "required" : [ "byte", "date", "number", "password" ], + "properties" : { + "integer" : { + "type" : "integer", + "minimum" : 10, + "maximum" : 100 + }, + "int32" : { + "type" : "integer", + "format" : "int32", + "minimum" : 20, + "maximum" : 200 + }, + "int64" : { + "type" : "integer", + "format" : "int64" + }, + "number" : { + "type" : "number", + "minimum" : 32.1, + "maximum" : 543.2 + }, + "float" : { + "type" : "number", + "format" : "float", + "minimum" : 54.3, + "maximum" : 987.6 + }, + "double" : { + "type" : "number", + "format" : "double", + "minimum" : 67.8, + "maximum" : 123.4 + }, + "string" : { + "type" : "string", + "pattern" : "/[a-z]/i" + }, + "byte" : { + "type" : "string", + "format" : "byte", + "pattern" : "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" + }, + "binary" : { + "type" : "string", + "format" : "binary" + }, + "date" : { + "type" : "string", + "format" : "date" + }, + "dateTime" : { + "type" : "string", + "format" : "date-time" + }, + "uuid" : { + "type" : "string", + "format" : "uuid" + }, + "password" : { + "type" : "string", + "format" : "password", + "minLength" : 10, + "maxLength" : 64 + } + } + }, + "EnumClass" : { + "type" : "string", + "enum" : [ "_abc", "-efg", "(xyz)" ], + "default" : "-efg" + }, + "Enum_Test" : { + "type" : "object", + "properties" : { + "enum_string" : { + "type" : "string", + "enum" : [ "UPPER", "lower", "" ] + }, + "enum_integer" : { + "type" : "integer", + "format" : "int32", + "enum" : [ 1, -1 ] + }, + "enum_number" : { + "type" : "number", + "format" : "double", + "enum" : [ 1.1, -1.2 ] + }, + "outerEnum" : { + "$ref" : "#/definitions/OuterEnum" + } + } + }, + "AdditionalPropertiesClass" : { + "type" : "object", + "properties" : { + "map_property" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + }, + "map_of_map_property" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + } + } + }, + "MixedPropertiesAndAdditionalPropertiesClass" : { + "type" : "object", + "properties" : { + "uuid" : { + "type" : "string", + "format" : "uuid" + }, + "dateTime" : { + "type" : "string", + "format" : "date-time" + }, + "map" : { + "type" : "object", + "additionalProperties" : { + "$ref" : "#/definitions/Animal" + } + } + } + }, + "List" : { + "type" : "object", + "properties" : { + "123-list" : { + "type" : "string" + } + } + }, + "Client" : { + "type" : "object", + "properties" : { + "client" : { + "type" : "string" + } + } + }, + "ReadOnlyFirst" : { + "type" : "object", + "properties" : { + "bar" : { + "type" : "string", + "readOnly" : true + }, + "baz" : { + "type" : "string" + } + } + }, + "hasOnlyReadOnly" : { + "type" : "object", + "properties" : { + "bar" : { + "type" : "string", + "readOnly" : true + }, + "foo" : { + "type" : "string", + "readOnly" : true + } + } + }, + "Capitalization" : { + "type" : "object", + "properties" : { + "smallCamel" : { + "type" : "string" + }, + "CapitalCamel" : { + "type" : "string" + }, + "small_Snake" : { + "type" : "string" + }, + "Capital_Snake" : { + "type" : "string" + }, + "SCA_ETH_Flow_Points" : { + "type" : "string" + }, + "ATT_NAME" : { + "type" : "string", + "description" : "Name of the pet\n" + } + } + }, + "MapTest" : { + "type" : "object", + "properties" : { + "map_map_of_string" : { + "type" : "object", + "additionalProperties" : { + "type" : "object", + "additionalProperties" : { + "type" : "string" + } + } + }, + "map_of_enum_string" : { + "type" : "object", + "additionalProperties" : { + "type" : "string", + "enum" : [ "UPPER", "lower" ] + } + } + } + }, + "ArrayTest" : { + "type" : "object", + "properties" : { + "array_of_string" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + "array_array_of_integer" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "type" : "integer", + "format" : "int64" + } + } + }, + "array_array_of_model" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/ReadOnlyFirst" + } + } + } + } + }, + "NumberOnly" : { + "type" : "object", + "properties" : { + "JustNumber" : { + "type" : "number" + } + } + }, + "ArrayOfNumberOnly" : { + "type" : "object", + "properties" : { + "ArrayNumber" : { + "type" : "array", + "items" : { + "type" : "number" + } + } + } + }, + "ArrayOfArrayOfNumberOnly" : { + "type" : "object", + "properties" : { + "ArrayArrayNumber" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "type" : "number" + } + } + } + } + }, + "EnumArrays" : { + "type" : "object", + "properties" : { + "just_symbol" : { + "type" : "string", + "enum" : [ ">=", "$" ] + }, + "array_enum" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "fish", "crab" ] + } + } + } + }, + "OuterEnum" : { + "type" : "string", + "enum" : [ "placed", "approved", "delivered" ] + }, + "OuterComposite" : { + "type" : "object", + "properties" : { + "my_number" : { + "$ref" : "#/definitions/OuterNumber" + }, + "my_string" : { + "$ref" : "#/definitions/OuterString" + }, + "my_boolean" : { + "$ref" : "#/definitions/OuterBoolean" + } + } + }, + "OuterNumber" : { + "type" : "number" + }, + "OuterString" : { + "type" : "string" + }, + "OuterBoolean" : { + "type" : "boolean" + } + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + } } \ 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 a04f054727e..3cf2646a388 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 Response testEnumParameters( 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 e5c185eef8e..3c7b947ca72 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 Response testEndpointParameters(BigDecimal number,Double _double 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/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java index d2cbef7abb5..e0c995c6227 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java @@ -124,9 +124,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Animal.java index 8f1fdfd45bb..0ff0c67480b 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Animal.java @@ -108,9 +108,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/AnimalFarm.java index be5b217a5c0..9f6d43db502 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/AnimalFarm.java @@ -56,9 +56,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 7dcd2118293..579765d9ba0 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -92,9 +92,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java index 05331fa55e9..4b9ba086019 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java @@ -92,9 +92,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ArrayTest.java index 295a1ea1f14..20b680e6124 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ArrayTest.java @@ -156,9 +156,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Capitalization.java index 6ee896a961d..7562f7b6eee 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Capitalization.java @@ -201,9 +201,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Cat.java index b96cffbbd79..52c746a1999 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Cat.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Category.java index 0408b4d6acf..8ad6ed85fae 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Category.java @@ -105,9 +105,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ClassModel.java index e96a4ff4eb8..b4e4b051265 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ClassModel.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Client.java index 7bae1955cb3..3bc0a8ad369 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Client.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Client.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Dog.java index 94fd1071a92..32ba1ac199f 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Dog.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/EnumArrays.java index 8542c26fea8..29941fe6dee 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/EnumArrays.java @@ -178,9 +178,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/EnumTest.java index e233d15e2a9..6579561fe9f 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/EnumTest.java @@ -250,9 +250,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/FormatTest.java index bc552c619c3..d264c8297c2 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/FormatTest.java @@ -386,9 +386,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index 02480c10c65..7ffc93e2506 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -87,9 +87,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/MapTest.java index 73c04c4bd63..c7728f14666 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/MapTest.java @@ -156,9 +156,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5e1d96f5ecc..6a3ea1f922c 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -143,9 +143,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Model200Response.java index 954ef7ebed3..f54456d14d2 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Model200Response.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ModelApiResponse.java index 2a54b591b32..26a14bb64bc 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -129,9 +129,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ModelReturn.java index 12b213d6afb..1bab81e98da 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ModelReturn.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Name.java index 771531b30ab..11ea4ab9563 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Name.java @@ -137,9 +137,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/NumberOnly.java index 82604a5b9c7..6811f364cee 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/NumberOnly.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Order.java index 5147738768b..179954d26a8 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Order.java @@ -236,9 +236,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/OuterComposite.java index c144ee99521..c956dfc711e 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/OuterComposite.java @@ -130,9 +130,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Pet.java index 04480639f0f..b063f743692 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Pet.java @@ -254,9 +254,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ReadOnlyFirst.java index 5d26b4199f8..e22fb9de80a 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/SpecialModelName.java index df3182fbd80..fc8d4c27a4e 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/SpecialModelName.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Tag.java index a86f54144f8..47e64f46fc7 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/Tag.java @@ -105,9 +105,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/User.java index 0c1b67c0d5b..078512c87c3 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/io/swagger/model/User.java @@ -237,7 +237,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -249,9 +249,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } 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 54aa3577d52..4cae4c62be5 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 Response testEnumParameters(List enumFormStringArray, String enum 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-useTags/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..75c3e3986be --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..14db584c435 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..a9a9ecbb6e1 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..b39225f8548 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..95cb03e9c48 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..2a4e301de6f --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..554c36b9b3b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..7c3627bd1ef --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..41b57dcd59d --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..813e2c5e444 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..448daaa50a5 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..3cfcb81b084 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..e722c43d866 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..e7e1bdebe2b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,44 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..c22b8fac88d --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..9ab44ce86b6 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.Date; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..e450821458b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..c00010d38c5 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..93323475a73 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..27befd68de9 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..8b7f3a0fcf2 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..56e22907fc7 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..b8e28169335 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..29ac4d3d5a9 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..19e65d26ca0 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..dea469a8b83 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..0888205f352 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,44 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..2578cf7326b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..ee4b57b4890 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..1450f6a4912 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..8895ffc2036 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..07dc0448fe3 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..8014ad95bf6 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,88 @@ +/* + * 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.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ 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 2bbe7e14467..f93b18347c2 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 Response testEnumParameters( 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 e5c185eef8e..3c7b947ca72 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 Response testEndpointParameters(BigDecimal number,Double _double 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/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java index d2cbef7abb5..e0c995c6227 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java @@ -124,9 +124,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Animal.java index 8f1fdfd45bb..0ff0c67480b 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Animal.java @@ -108,9 +108,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/AnimalFarm.java index be5b217a5c0..9f6d43db502 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/AnimalFarm.java @@ -56,9 +56,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 7dcd2118293..579765d9ba0 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -92,9 +92,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java index 05331fa55e9..4b9ba086019 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java @@ -92,9 +92,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ArrayTest.java index 295a1ea1f14..20b680e6124 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ArrayTest.java @@ -156,9 +156,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Capitalization.java index 6ee896a961d..7562f7b6eee 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Capitalization.java @@ -201,9 +201,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Cat.java index b96cffbbd79..52c746a1999 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Cat.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Category.java index 0408b4d6acf..8ad6ed85fae 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Category.java @@ -105,9 +105,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ClassModel.java index e96a4ff4eb8..b4e4b051265 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ClassModel.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Client.java index 7bae1955cb3..3bc0a8ad369 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Client.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Client.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Dog.java index 94fd1071a92..32ba1ac199f 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Dog.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/EnumArrays.java index 8542c26fea8..29941fe6dee 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/EnumArrays.java @@ -178,9 +178,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/EnumTest.java index e233d15e2a9..6579561fe9f 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/EnumTest.java @@ -250,9 +250,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/FormatTest.java index bc552c619c3..d264c8297c2 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/FormatTest.java @@ -386,9 +386,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index 02480c10c65..7ffc93e2506 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -87,9 +87,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/MapTest.java index 73c04c4bd63..c7728f14666 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/MapTest.java @@ -156,9 +156,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5e1d96f5ecc..6a3ea1f922c 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -143,9 +143,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Model200Response.java index 954ef7ebed3..f54456d14d2 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Model200Response.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ModelApiResponse.java index 2a54b591b32..26a14bb64bc 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -129,9 +129,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ModelReturn.java index 12b213d6afb..1bab81e98da 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ModelReturn.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Name.java index 771531b30ab..11ea4ab9563 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Name.java @@ -137,9 +137,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/NumberOnly.java index 82604a5b9c7..6811f364cee 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/NumberOnly.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Order.java index 5147738768b..179954d26a8 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Order.java @@ -236,9 +236,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/OuterComposite.java index c144ee99521..c956dfc711e 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/OuterComposite.java @@ -130,9 +130,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Pet.java index 04480639f0f..b063f743692 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Pet.java @@ -254,9 +254,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ReadOnlyFirst.java index 5d26b4199f8..e22fb9de80a 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/SpecialModelName.java index df3182fbd80..fc8d4c27a4e 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/SpecialModelName.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Tag.java index a86f54144f8..47e64f46fc7 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/Tag.java @@ -105,9 +105,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/User.java index 0c1b67c0d5b..078512c87c3 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/io/swagger/model/User.java @@ -237,7 +237,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -249,9 +249,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } 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 54aa3577d52..4cae4c62be5 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 Response testEnumParameters(List enumFormStringArray, String enum 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/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..75c3e3986be --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..14db584c435 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..a9a9ecbb6e1 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..b39225f8548 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..95cb03e9c48 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..2a4e301de6f --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..554c36b9b3b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..7c3627bd1ef --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..41b57dcd59d --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..813e2c5e444 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..448daaa50a5 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..3cfcb81b084 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..e722c43d866 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..e7e1bdebe2b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,44 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..c22b8fac88d --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..9ab44ce86b6 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.Date; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..e450821458b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..c00010d38c5 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..93323475a73 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..27befd68de9 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..8b7f3a0fcf2 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..56e22907fc7 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..b8e28169335 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..29ac4d3d5a9 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..19e65d26ca0 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..dea469a8b83 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..0888205f352 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,44 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..2578cf7326b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..ee4b57b4890 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..1450f6a4912 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..8895ffc2036 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..07dc0448fe3 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..8014ad95bf6 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey1/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,88 @@ +/* + * 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.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml b/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml index e148200aaca..5bbf59d145a 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml +++ b/samples/server/petstore/jaxrs/jersey2-useTags/pom.xml @@ -15,7 +15,7 @@ - src/main/java + org.apache.maven.plugins diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/api/FakeApi.java index 06e1622f8b6..10f64aab82a 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/api/FakeApi.java @@ -167,6 +167,18 @@ public Response testEnumParameters(@ApiParam(value = "Form parameter enum test ( 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/jersey2-useTags/src/gen/java/io/swagger/api/FakeApiService.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/api/FakeApiService.java index 71148802573..16ef0a8dbfb 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/api/FakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/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-useTags/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java index d2cbef7abb5..e0c995c6227 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java @@ -124,9 +124,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Animal.java index 8f1fdfd45bb..0ff0c67480b 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Animal.java @@ -108,9 +108,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/AnimalFarm.java index be5b217a5c0..9f6d43db502 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/AnimalFarm.java @@ -56,9 +56,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 7dcd2118293..579765d9ba0 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -92,9 +92,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java index 05331fa55e9..4b9ba086019 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java @@ -92,9 +92,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ArrayTest.java index 295a1ea1f14..20b680e6124 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ArrayTest.java @@ -156,9 +156,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Capitalization.java index 6ee896a961d..7562f7b6eee 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Capitalization.java @@ -201,9 +201,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Cat.java index b96cffbbd79..52c746a1999 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Cat.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Category.java index 0408b4d6acf..8ad6ed85fae 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Category.java @@ -105,9 +105,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ClassModel.java index e96a4ff4eb8..b4e4b051265 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ClassModel.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Client.java index 7bae1955cb3..3bc0a8ad369 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Client.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Client.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Dog.java index 94fd1071a92..32ba1ac199f 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Dog.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/EnumArrays.java index 8542c26fea8..29941fe6dee 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/EnumArrays.java @@ -178,9 +178,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/EnumTest.java index e233d15e2a9..6579561fe9f 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/EnumTest.java @@ -250,9 +250,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/FormatTest.java index bc552c619c3..d264c8297c2 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/FormatTest.java @@ -386,9 +386,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index 02480c10c65..7ffc93e2506 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -87,9 +87,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/MapTest.java index 73c04c4bd63..c7728f14666 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/MapTest.java @@ -156,9 +156,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5e1d96f5ecc..6a3ea1f922c 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -143,9 +143,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Model200Response.java index 954ef7ebed3..f54456d14d2 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Model200Response.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ModelApiResponse.java index 2a54b591b32..26a14bb64bc 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -129,9 +129,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ModelReturn.java index 12b213d6afb..1bab81e98da 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ModelReturn.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Name.java index 771531b30ab..11ea4ab9563 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Name.java @@ -137,9 +137,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/NumberOnly.java index 82604a5b9c7..6811f364cee 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/NumberOnly.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Order.java index 5147738768b..179954d26a8 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Order.java @@ -236,9 +236,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/OuterComposite.java index c144ee99521..c956dfc711e 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/OuterComposite.java @@ -130,9 +130,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Pet.java index 04480639f0f..b063f743692 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Pet.java @@ -254,9 +254,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ReadOnlyFirst.java index 5d26b4199f8..e22fb9de80a 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/SpecialModelName.java index df3182fbd80..fc8d4c27a4e 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/SpecialModelName.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Tag.java index a86f54144f8..47e64f46fc7 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/Tag.java @@ -105,9 +105,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/User.java index 0c1b67c0d5b..078512c87c3 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/io/swagger/model/User.java @@ -237,7 +237,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -249,9 +249,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java index 529420f7f70..bd8eb54209c 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/io/swagger/api/impl/FakeApiServiceImpl.java @@ -56,6 +56,11 @@ public Response testEnumParameters(List enumFormStringArray, String enum 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/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..75c3e3986be --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..14db584c435 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..a9a9ecbb6e1 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..b39225f8548 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..95cb03e9c48 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..2a4e301de6f --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..554c36b9b3b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..7c3627bd1ef --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..41b57dcd59d --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..813e2c5e444 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..448daaa50a5 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..3cfcb81b084 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..e722c43d866 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..e7e1bdebe2b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,44 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..c22b8fac88d --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..9ab44ce86b6 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.Date; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..e450821458b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..c00010d38c5 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..93323475a73 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..27befd68de9 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..8b7f3a0fcf2 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..56e22907fc7 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..b8e28169335 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..29ac4d3d5a9 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..19e65d26ca0 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..dea469a8b83 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..0888205f352 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,44 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..2578cf7326b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..ee4b57b4890 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..1450f6a4912 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..8895ffc2036 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..07dc0448fe3 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..8014ad95bf6 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,88 @@ +/* + * 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.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/jaxrs/jersey2/pom.xml b/samples/server/petstore/jaxrs/jersey2/pom.xml index 03d596436fd..333393c8d9b 100644 --- a/samples/server/petstore/jaxrs/jersey2/pom.xml +++ b/samples/server/petstore/jaxrs/jersey2/pom.xml @@ -15,7 +15,7 @@ - src/main/java + org.apache.maven.plugins 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 7e933d3d0c0..d16817cce9b 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 Response testEnumParameters(@ApiParam(value = "Form parameter enum test ( 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 71148802573..16ef0a8dbfb 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/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java index d2cbef7abb5..e0c995c6227 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java @@ -124,9 +124,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Animal.java index 8f1fdfd45bb..0ff0c67480b 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Animal.java @@ -108,9 +108,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/AnimalFarm.java index be5b217a5c0..9f6d43db502 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/AnimalFarm.java @@ -56,9 +56,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 7dcd2118293..579765d9ba0 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -92,9 +92,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java index 05331fa55e9..4b9ba086019 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java @@ -92,9 +92,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ArrayTest.java index 295a1ea1f14..20b680e6124 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ArrayTest.java @@ -156,9 +156,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Capitalization.java index 6ee896a961d..7562f7b6eee 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Capitalization.java @@ -201,9 +201,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Cat.java index b96cffbbd79..52c746a1999 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Cat.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Category.java index 0408b4d6acf..8ad6ed85fae 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Category.java @@ -105,9 +105,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ClassModel.java index e96a4ff4eb8..b4e4b051265 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ClassModel.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Client.java index 7bae1955cb3..3bc0a8ad369 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Client.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Client.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Dog.java index 94fd1071a92..32ba1ac199f 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Dog.java @@ -83,9 +83,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/EnumArrays.java index 8542c26fea8..29941fe6dee 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/EnumArrays.java @@ -178,9 +178,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/EnumTest.java index e233d15e2a9..6579561fe9f 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/EnumTest.java @@ -250,9 +250,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/FormatTest.java index bc552c619c3..d264c8297c2 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/FormatTest.java @@ -386,9 +386,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index 02480c10c65..7ffc93e2506 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -87,9 +87,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/MapTest.java index 73c04c4bd63..c7728f14666 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/MapTest.java @@ -156,9 +156,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 5e1d96f5ecc..6a3ea1f922c 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -143,9 +143,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Model200Response.java index 954ef7ebed3..f54456d14d2 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Model200Response.java @@ -106,9 +106,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ModelApiResponse.java index 2a54b591b32..26a14bb64bc 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -129,9 +129,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ModelReturn.java index 12b213d6afb..1bab81e98da 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ModelReturn.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Name.java index 771531b30ab..11ea4ab9563 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Name.java @@ -137,9 +137,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/NumberOnly.java index 82604a5b9c7..6811f364cee 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/NumberOnly.java @@ -82,9 +82,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Order.java index 5147738768b..179954d26a8 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Order.java @@ -236,9 +236,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/OuterComposite.java index c144ee99521..c956dfc711e 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/OuterComposite.java @@ -130,9 +130,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Pet.java index 04480639f0f..b063f743692 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Pet.java @@ -254,9 +254,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ReadOnlyFirst.java index 5d26b4199f8..e22fb9de80a 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/SpecialModelName.java index df3182fbd80..fc8d4c27a4e 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/SpecialModelName.java @@ -81,9 +81,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Tag.java index a86f54144f8..47e64f46fc7 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/Tag.java @@ -105,9 +105,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/User.java index 0c1b67c0d5b..078512c87c3 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/io/swagger/model/User.java @@ -237,7 +237,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -249,9 +249,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } 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 529420f7f70..bd8eb54209c 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 Response testEnumParameters(List enumFormStringArray, String enum 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/jaxrs/jersey2/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..75c3e3986be --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..14db584c435 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..a9a9ecbb6e1 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..b39225f8548 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..95cb03e9c48 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..2a4e301de6f --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..554c36b9b3b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..7c3627bd1ef --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..41b57dcd59d --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..813e2c5e444 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..448daaa50a5 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..3cfcb81b084 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..e722c43d866 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..e7e1bdebe2b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,44 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..c22b8fac88d --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..9ab44ce86b6 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.Date; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..e450821458b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..c00010d38c5 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..93323475a73 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..27befd68de9 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..8b7f3a0fcf2 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..56e22907fc7 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..b8e28169335 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..29ac4d3d5a9 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..19e65d26ca0 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..dea469a8b83 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..0888205f352 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,44 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..2578cf7326b --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..ee4b57b4890 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..1450f6a4912 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..8895ffc2036 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,52 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..07dc0448fe3 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,62 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..8014ad95bf6 --- /dev/null +++ b/samples/server/petstore/jaxrs/jersey2/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,88 @@ +/* + * 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.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/AdditionalPropertiesClass.java index 338c4575058..95a570100a2 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/AdditionalPropertiesClass.java @@ -118,9 +118,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Animal.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Animal.java index c044d494a42..33952eb2215 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Animal.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/AnimalFarm.java index be9c113dd57..66dbc3de5d9 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/AnimalFarm.java @@ -45,9 +45,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index a861c01791a..1b5ab3b7454 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ArrayOfNumberOnly.java index a6155b044fd..6c46aeebe27 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ArrayOfNumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ArrayTest.java index e5797376d2e..d755a02785c 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ArrayTest.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Capitalization.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Capitalization.java index d2451af8b9f..fddcfffdf60 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Capitalization.java @@ -196,9 +196,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Cat.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Cat.java index 154c1aaeb0a..2755c930869 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Cat.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Category.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Category.java index a7cfd551750..59721e64600 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Category.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Category.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ClassModel.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ClassModel.java index 86029cf9bdd..c56f6c3c114 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ClassModel.java @@ -72,9 +72,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Client.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Client.java index 82e3f9f1116..6f9ab5f1def 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Client.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Client.java @@ -71,9 +71,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Dog.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Dog.java index 17f1d070eba..955da362e7d 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Dog.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/EnumArrays.java index de785c05d59..ac3bca7961c 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/EnumArrays.java @@ -170,9 +170,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/EnumTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/EnumTest.java index 4f64f4562f3..55bc292aa99 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/EnumTest.java @@ -244,9 +244,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/FormatTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/FormatTest.java index d79c5833f6b..be84fae507e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/FormatTest.java @@ -393,9 +393,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/HasOnlyReadOnly.java index 23bc93bfdce..98b90d72553 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/HasOnlyReadOnly.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/MapTest.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/MapTest.java index 1d08a0cdadb..8dcead5aede 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/MapTest.java @@ -150,9 +150,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 642840cf48d..fcb34d0d179 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -139,9 +139,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Model200Response.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Model200Response.java index a8b496debb4..f13c19e5266 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Model200Response.java @@ -97,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ModelApiResponse.java index bb4d933a852..0e93ffad1d3 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ModelApiResponse.java @@ -121,9 +121,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ModelReturn.java index 2f85fcb8a07..e5d4510346a 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ModelReturn.java @@ -72,9 +72,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Name.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Name.java index 26361ad7cb0..78d37a85927 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Name.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Name.java @@ -148,9 +148,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/NumberOnly.java index 23120f3d823..511c87a2051 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/NumberOnly.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Order.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Order.java index d629712d8e6..9ecb505cffa 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Order.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Order.java @@ -232,9 +232,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/OuterComposite.java index 6786a2eac48..7a4f818e5d7 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/OuterComposite.java @@ -123,9 +123,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Pet.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Pet.java index e645da24811..1d79f09dcb7 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Pet.java @@ -253,9 +253,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ReadOnlyFirst.java index 475f63e8731..98fd9714f7e 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/ReadOnlyFirst.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/SpecialModelName.java index 1a4f1acd512..f20ddc08162 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/SpecialModelName.java @@ -71,9 +71,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Tag.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Tag.java index 73a7d36cf4d..fb271c4fc41 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/Tag.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/User.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/User.java index 658e823c5a5..54e3613f6d5 100644 --- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/User.java +++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/io/swagger/model/User.java @@ -234,7 +234,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -246,9 +246,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..ff7874c1d73 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..aee9fe973b6 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..e00a6bde74c --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..679fb1cbdee --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..2b6e9cde513 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..d3488846a05 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..14d9897e29f --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..bdd8d76c7de --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..dd679268994 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..96031a128a4 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..9cac9139de5 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..88f387ad069 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..23fe5b30fbd --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..999760cfe79 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,47 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..5588d809dd5 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..bae3f9dc89a --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..e8af9038202 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..234d0fbe82f --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..63834febb8c --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,61 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..fbc8718416f --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..636187b5989 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..8c9a9463ee1 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..ffd6a080997 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..bbdd2cec600 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..87a0eb78b71 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..a3d1315c6af --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..0d33f08a576 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,47 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..a24e45f8697 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..f6f41d9a258 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..315c45cab9d --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..1efdc95a385 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..58151ab1970 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,65 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..6bba224c449 --- /dev/null +++ b/samples/server/petstore/spring-mvc-j8-async/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,100 @@ +/* + * 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.model.util; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.LocalDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (clazz.isAssignableFrom(LocalDateTime.class)) { + return (T) LocalDateTime.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/AdditionalPropertiesClass.java index 05680ef71de..343beff472b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/AdditionalPropertiesClass.java @@ -118,9 +118,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Animal.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Animal.java index c044d494a42..33952eb2215 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Animal.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/AnimalFarm.java index be9c113dd57..66dbc3de5d9 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/AnimalFarm.java @@ -45,9 +45,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 814fb690acd..e22bf427646 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ArrayOfNumberOnly.java index 99c91d44a01..2e74d5393de 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ArrayOfNumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ArrayTest.java index 753132b708b..51f3f40c0bf 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ArrayTest.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Capitalization.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Capitalization.java index d2451af8b9f..fddcfffdf60 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Capitalization.java @@ -196,9 +196,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Cat.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Cat.java index 154c1aaeb0a..2755c930869 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Cat.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Category.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Category.java index a7cfd551750..59721e64600 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Category.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Category.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ClassModel.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ClassModel.java index 86029cf9bdd..c56f6c3c114 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ClassModel.java @@ -72,9 +72,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Client.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Client.java index 82e3f9f1116..6f9ab5f1def 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Client.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Client.java @@ -71,9 +71,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Dog.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Dog.java index 17f1d070eba..955da362e7d 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Dog.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/EnumArrays.java index d0ab7afca56..66617f31f9e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/EnumArrays.java @@ -170,9 +170,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/EnumTest.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/EnumTest.java index 4f64f4562f3..55bc292aa99 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/EnumTest.java @@ -244,9 +244,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/FormatTest.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/FormatTest.java index 99ad7deb9cf..97318ae1b54 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/FormatTest.java @@ -393,9 +393,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/HasOnlyReadOnly.java index 23bc93bfdce..98b90d72553 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/HasOnlyReadOnly.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/MapTest.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/MapTest.java index 556cb7c33c5..876c21623a3 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/MapTest.java @@ -150,9 +150,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 50330e80d5c..f8af2a2829b 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -139,9 +139,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Model200Response.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Model200Response.java index a8b496debb4..f13c19e5266 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Model200Response.java @@ -97,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ModelApiResponse.java index bb4d933a852..0e93ffad1d3 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ModelApiResponse.java @@ -121,9 +121,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ModelReturn.java index 2f85fcb8a07..e5d4510346a 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ModelReturn.java @@ -72,9 +72,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Name.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Name.java index 26361ad7cb0..78d37a85927 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Name.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Name.java @@ -148,9 +148,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/NumberOnly.java index 23120f3d823..511c87a2051 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/NumberOnly.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Order.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Order.java index b8a2a2c46e4..b1c940616d6 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Order.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Order.java @@ -232,9 +232,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/OuterComposite.java index 6786a2eac48..7a4f818e5d7 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/OuterComposite.java @@ -123,9 +123,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Pet.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Pet.java index 1c769b0939e..c3e20cd158f 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Pet.java @@ -253,9 +253,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ReadOnlyFirst.java index 475f63e8731..98fd9714f7e 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/ReadOnlyFirst.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/SpecialModelName.java index 1a4f1acd512..f20ddc08162 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/SpecialModelName.java @@ -71,9 +71,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Tag.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Tag.java index 73a7d36cf4d..fb271c4fc41 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/Tag.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/User.java b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/User.java index 658e823c5a5..54e3613f6d5 100644 --- a/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/User.java +++ b/samples/server/petstore/spring-mvc/src/main/java/io/swagger/model/User.java @@ -234,7 +234,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -246,9 +246,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..f70df75ca06 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..c3118acf47f --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..ebf8f3163c1 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..72e896fb1e8 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..14ff29d7b76 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..6b1cccd8891 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..872e22072eb --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..bc9942fbccb --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..c9acfd3eee1 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..bb092840929 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..cc7e8b028a5 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..1fd067523a0 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..af7ec4cca28 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..7c9617c917b --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..4cc9ea0bc96 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..d0327327bfd --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..027333ecf80 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..26ad27a48c8 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..292dee31757 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..6cd97d59eca --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..e08cb759ece --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..c40deb1f25e --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..0a3ba719ef5 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..515e80a3ea8 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..a19a50547f3 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..09f78fe6092 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..6a1e97ae85e --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..6238a58cfd2 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..70f9452ed8c --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..a93d5aa1a8a --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..f9759a6fa90 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..009fef0cc49 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,64 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..5eadc70fb26 --- /dev/null +++ b/samples/server/petstore/spring-mvc/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-beanvalidation/pom.xml b/samples/server/petstore/springboot-beanvalidation/pom.xml index 66f69aa8bf9..2d776c3c17e 100644 --- a/samples/server/petstore/springboot-beanvalidation/pom.xml +++ b/samples/server/petstore/springboot-beanvalidation/pom.xml @@ -10,6 +10,7 @@ ${java.version} ${java.version} 2.7.0 + 4.12 org.springframework.boot @@ -59,9 +60,15 @@ 2.6.4 - - javax.validation - validation-api - + + javax.validation + validation-api + + + junit + junit + ${junit-version} + test + diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/AdditionalPropertiesClass.java index 05680ef71de..343beff472b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/AdditionalPropertiesClass.java @@ -118,9 +118,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Animal.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Animal.java index c044d494a42..33952eb2215 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Animal.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/AnimalFarm.java index be9c113dd57..66dbc3de5d9 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/AnimalFarm.java @@ -45,9 +45,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 814fb690acd..e22bf427646 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ArrayOfNumberOnly.java index 99c91d44a01..2e74d5393de 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ArrayOfNumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ArrayTest.java index 753132b708b..51f3f40c0bf 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ArrayTest.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Capitalization.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Capitalization.java index d2451af8b9f..fddcfffdf60 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Capitalization.java @@ -196,9 +196,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Cat.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Cat.java index 154c1aaeb0a..2755c930869 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Cat.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Category.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Category.java index a7cfd551750..59721e64600 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Category.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Category.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ClassModel.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ClassModel.java index 86029cf9bdd..c56f6c3c114 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ClassModel.java @@ -72,9 +72,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Client.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Client.java index 82e3f9f1116..6f9ab5f1def 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Client.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Client.java @@ -71,9 +71,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Dog.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Dog.java index 17f1d070eba..955da362e7d 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Dog.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/EnumArrays.java index d0ab7afca56..66617f31f9e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/EnumArrays.java @@ -170,9 +170,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/EnumTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/EnumTest.java index 4f64f4562f3..55bc292aa99 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/EnumTest.java @@ -244,9 +244,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/FormatTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/FormatTest.java index 99ad7deb9cf..97318ae1b54 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/FormatTest.java @@ -393,9 +393,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/HasOnlyReadOnly.java index 23bc93bfdce..98b90d72553 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/HasOnlyReadOnly.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/MapTest.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/MapTest.java index 556cb7c33c5..876c21623a3 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/MapTest.java @@ -150,9 +150,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 50330e80d5c..f8af2a2829b 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -139,9 +139,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Model200Response.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Model200Response.java index a8b496debb4..f13c19e5266 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Model200Response.java @@ -97,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ModelApiResponse.java index bb4d933a852..0e93ffad1d3 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ModelApiResponse.java @@ -121,9 +121,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ModelReturn.java index 2f85fcb8a07..e5d4510346a 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ModelReturn.java @@ -72,9 +72,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Name.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Name.java index 26361ad7cb0..78d37a85927 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Name.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Name.java @@ -148,9 +148,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/NumberOnly.java index 23120f3d823..511c87a2051 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/NumberOnly.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Order.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Order.java index b8a2a2c46e4..b1c940616d6 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Order.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Order.java @@ -232,9 +232,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/OuterComposite.java index 6786a2eac48..7a4f818e5d7 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/OuterComposite.java @@ -123,9 +123,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Pet.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Pet.java index 1c769b0939e..c3e20cd158f 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Pet.java @@ -253,9 +253,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ReadOnlyFirst.java index 475f63e8731..98fd9714f7e 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/ReadOnlyFirst.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/SpecialModelName.java index 1a4f1acd512..f20ddc08162 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/SpecialModelName.java @@ -71,9 +71,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Tag.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Tag.java index 73a7d36cf4d..fb271c4fc41 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/Tag.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/User.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/User.java index 658e823c5a5..54e3613f6d5 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/User.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/io/swagger/model/User.java @@ -234,7 +234,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -246,9 +246,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..f70df75ca06 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..c3118acf47f --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..ebf8f3163c1 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..72e896fb1e8 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..14ff29d7b76 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..6b1cccd8891 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..872e22072eb --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..bc9942fbccb --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..c9acfd3eee1 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..bb092840929 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..cc7e8b028a5 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..1fd067523a0 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..af7ec4cca28 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..7c9617c917b --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..4cc9ea0bc96 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..d0327327bfd --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..027333ecf80 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..26ad27a48c8 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..292dee31757 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..6cd97d59eca --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..e08cb759ece --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..c40deb1f25e --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..0a3ba719ef5 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..515e80a3ea8 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..a19a50547f3 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..09f78fe6092 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..6a1e97ae85e --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..6238a58cfd2 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..70f9452ed8c --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..a93d5aa1a8a --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..f9759a6fa90 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..009fef0cc49 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,64 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..5eadc70fb26 --- /dev/null +++ b/samples/server/petstore/springboot-beanvalidation/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-implicitHeaders/pom.xml b/samples/server/petstore/springboot-implicitHeaders/pom.xml index c2792f4bdae..013b2089007 100644 --- a/samples/server/petstore/springboot-implicitHeaders/pom.xml +++ b/samples/server/petstore/springboot-implicitHeaders/pom.xml @@ -10,6 +10,7 @@ ${java.version} ${java.version} 2.7.0 + 4.12 org.springframework.boot @@ -59,9 +60,15 @@ 2.6.4 - - javax.validation - validation-api - + + javax.validation + validation-api + + + junit + junit + ${junit-version} + test + diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/AdditionalPropertiesClass.java index 05680ef71de..343beff472b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/AdditionalPropertiesClass.java @@ -118,9 +118,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Animal.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Animal.java index c044d494a42..33952eb2215 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Animal.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/AnimalFarm.java index be9c113dd57..66dbc3de5d9 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/AnimalFarm.java @@ -45,9 +45,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 814fb690acd..e22bf427646 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ArrayOfNumberOnly.java index 99c91d44a01..2e74d5393de 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ArrayOfNumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ArrayTest.java index 753132b708b..51f3f40c0bf 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ArrayTest.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Capitalization.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Capitalization.java index d2451af8b9f..fddcfffdf60 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Capitalization.java @@ -196,9 +196,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Cat.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Cat.java index 154c1aaeb0a..2755c930869 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Cat.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Category.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Category.java index a7cfd551750..59721e64600 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Category.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Category.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ClassModel.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ClassModel.java index 86029cf9bdd..c56f6c3c114 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ClassModel.java @@ -72,9 +72,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Client.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Client.java index 82e3f9f1116..6f9ab5f1def 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Client.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Client.java @@ -71,9 +71,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Dog.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Dog.java index 17f1d070eba..955da362e7d 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Dog.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/EnumArrays.java index d0ab7afca56..66617f31f9e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/EnumArrays.java @@ -170,9 +170,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/EnumTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/EnumTest.java index 4f64f4562f3..55bc292aa99 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/EnumTest.java @@ -244,9 +244,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/FormatTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/FormatTest.java index 99ad7deb9cf..97318ae1b54 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/FormatTest.java @@ -393,9 +393,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/HasOnlyReadOnly.java index 23bc93bfdce..98b90d72553 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/HasOnlyReadOnly.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/MapTest.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/MapTest.java index 556cb7c33c5..876c21623a3 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/MapTest.java @@ -150,9 +150,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 50330e80d5c..f8af2a2829b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -139,9 +139,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Model200Response.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Model200Response.java index a8b496debb4..f13c19e5266 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Model200Response.java @@ -97,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ModelApiResponse.java index bb4d933a852..0e93ffad1d3 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ModelApiResponse.java @@ -121,9 +121,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ModelReturn.java index 2f85fcb8a07..e5d4510346a 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ModelReturn.java @@ -72,9 +72,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Name.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Name.java index 26361ad7cb0..78d37a85927 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Name.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Name.java @@ -148,9 +148,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/NumberOnly.java index 23120f3d823..511c87a2051 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/NumberOnly.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Order.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Order.java index b8a2a2c46e4..b1c940616d6 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Order.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Order.java @@ -232,9 +232,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/OuterComposite.java index 6786a2eac48..7a4f818e5d7 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/OuterComposite.java @@ -123,9 +123,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Pet.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Pet.java index 1c769b0939e..c3e20cd158f 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Pet.java @@ -253,9 +253,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ReadOnlyFirst.java index 475f63e8731..98fd9714f7e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/ReadOnlyFirst.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/SpecialModelName.java index 1a4f1acd512..f20ddc08162 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/SpecialModelName.java @@ -71,9 +71,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Tag.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Tag.java index 73a7d36cf4d..fb271c4fc41 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/Tag.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/User.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/User.java index 658e823c5a5..54e3613f6d5 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/User.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/io/swagger/model/User.java @@ -234,7 +234,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -246,9 +246,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..f70df75ca06 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..c3118acf47f --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..ebf8f3163c1 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..72e896fb1e8 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..14ff29d7b76 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..6b1cccd8891 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..872e22072eb --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..bc9942fbccb --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..c9acfd3eee1 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..bb092840929 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..cc7e8b028a5 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..1fd067523a0 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..af7ec4cca28 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..7c9617c917b --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..4cc9ea0bc96 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..d0327327bfd --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..027333ecf80 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..26ad27a48c8 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..292dee31757 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..6cd97d59eca --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..e08cb759ece --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..c40deb1f25e --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..0a3ba719ef5 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..515e80a3ea8 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..a19a50547f3 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..09f78fe6092 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..6a1e97ae85e --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..6238a58cfd2 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..70f9452ed8c --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..a93d5aa1a8a --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..f9759a6fa90 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..009fef0cc49 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,64 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..5eadc70fb26 --- /dev/null +++ b/samples/server/petstore/springboot-implicitHeaders/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/springboot-useoptional/pom.xml b/samples/server/petstore/springboot-useoptional/pom.xml index 12f0b236bf1..d278478216a 100644 --- a/samples/server/petstore/springboot-useoptional/pom.xml +++ b/samples/server/petstore/springboot-useoptional/pom.xml @@ -10,6 +10,7 @@ ${java.version} ${java.version} 2.7.0 + 4.12 org.springframework.boot @@ -59,9 +60,15 @@ 2.6.4 - - javax.validation - validation-api - + + javax.validation + validation-api + + + junit + junit + ${junit-version} + test + diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/AdditionalPropertiesClass.java index 05680ef71de..343beff472b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/AdditionalPropertiesClass.java @@ -118,9 +118,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Animal.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Animal.java index c044d494a42..33952eb2215 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Animal.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/AnimalFarm.java index be9c113dd57..66dbc3de5d9 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/AnimalFarm.java @@ -45,9 +45,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 814fb690acd..e22bf427646 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ArrayOfNumberOnly.java index 99c91d44a01..2e74d5393de 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ArrayOfNumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ArrayTest.java index 753132b708b..51f3f40c0bf 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ArrayTest.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Capitalization.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Capitalization.java index d2451af8b9f..fddcfffdf60 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Capitalization.java @@ -196,9 +196,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Cat.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Cat.java index 154c1aaeb0a..2755c930869 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Cat.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Category.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Category.java index a7cfd551750..59721e64600 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Category.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Category.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ClassModel.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ClassModel.java index 86029cf9bdd..c56f6c3c114 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ClassModel.java @@ -72,9 +72,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Client.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Client.java index 82e3f9f1116..6f9ab5f1def 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Client.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Client.java @@ -71,9 +71,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Dog.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Dog.java index 17f1d070eba..955da362e7d 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Dog.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/EnumArrays.java index d0ab7afca56..66617f31f9e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/EnumArrays.java @@ -170,9 +170,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/EnumTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/EnumTest.java index 4f64f4562f3..55bc292aa99 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/EnumTest.java @@ -244,9 +244,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/FormatTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/FormatTest.java index 99ad7deb9cf..97318ae1b54 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/FormatTest.java @@ -393,9 +393,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/HasOnlyReadOnly.java index 23bc93bfdce..98b90d72553 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/HasOnlyReadOnly.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/MapTest.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/MapTest.java index 556cb7c33c5..876c21623a3 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/MapTest.java @@ -150,9 +150,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 50330e80d5c..f8af2a2829b 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -139,9 +139,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Model200Response.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Model200Response.java index a8b496debb4..f13c19e5266 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Model200Response.java @@ -97,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ModelApiResponse.java index bb4d933a852..0e93ffad1d3 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ModelApiResponse.java @@ -121,9 +121,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ModelReturn.java index 2f85fcb8a07..e5d4510346a 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ModelReturn.java @@ -72,9 +72,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Name.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Name.java index 26361ad7cb0..78d37a85927 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Name.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Name.java @@ -148,9 +148,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/NumberOnly.java index 23120f3d823..511c87a2051 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/NumberOnly.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Order.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Order.java index b8a2a2c46e4..b1c940616d6 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Order.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Order.java @@ -232,9 +232,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/OuterComposite.java index 6786a2eac48..7a4f818e5d7 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/OuterComposite.java @@ -123,9 +123,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Pet.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Pet.java index 1c769b0939e..c3e20cd158f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Pet.java @@ -253,9 +253,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ReadOnlyFirst.java index 475f63e8731..98fd9714f7e 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/ReadOnlyFirst.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/SpecialModelName.java index 1a4f1acd512..f20ddc08162 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/SpecialModelName.java @@ -71,9 +71,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Tag.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Tag.java index 73a7d36cf4d..fb271c4fc41 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/Tag.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/User.java b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/User.java index 658e823c5a5..54e3613f6d5 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/User.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/io/swagger/model/User.java @@ -234,7 +234,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -246,9 +246,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..f70df75ca06 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..c3118acf47f --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..ebf8f3163c1 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..72e896fb1e8 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..14ff29d7b76 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..6b1cccd8891 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..872e22072eb --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..bc9942fbccb --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..c9acfd3eee1 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..bb092840929 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..cc7e8b028a5 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..1fd067523a0 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..af7ec4cca28 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..7c9617c917b --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..4cc9ea0bc96 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..d0327327bfd --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..027333ecf80 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..26ad27a48c8 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..292dee31757 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..6cd97d59eca --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..e08cb759ece --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..c40deb1f25e --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..0a3ba719ef5 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..515e80a3ea8 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..a19a50547f3 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..09f78fe6092 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..6a1e97ae85e --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..6238a58cfd2 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..70f9452ed8c --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..a93d5aa1a8a --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..f9759a6fa90 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..009fef0cc49 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,64 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..5eadc70fb26 --- /dev/null +++ b/samples/server/petstore/springboot-useoptional/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/springboot/pom.xml b/samples/server/petstore/springboot/pom.xml index c2792f4bdae..013b2089007 100644 --- a/samples/server/petstore/springboot/pom.xml +++ b/samples/server/petstore/springboot/pom.xml @@ -10,6 +10,7 @@ ${java.version} ${java.version} 2.7.0 + 4.12 org.springframework.boot @@ -59,9 +60,15 @@ 2.6.4 - - javax.validation - validation-api - + + javax.validation + validation-api + + + junit + junit + ${junit-version} + test + diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/AdditionalPropertiesClass.java index 05680ef71de..343beff472b 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/AdditionalPropertiesClass.java @@ -118,9 +118,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Animal.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Animal.java index c044d494a42..33952eb2215 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Animal.java @@ -104,9 +104,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/AnimalFarm.java index be9c113dd57..66dbc3de5d9 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/AnimalFarm.java @@ -45,9 +45,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 814fb690acd..e22bf427646 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/ArrayOfNumberOnly.java index 99c91d44a01..2e74d5393de 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/ArrayOfNumberOnly.java @@ -84,9 +84,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/ArrayTest.java index 753132b708b..51f3f40c0bf 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/ArrayTest.java @@ -153,9 +153,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Capitalization.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Capitalization.java index d2451af8b9f..fddcfffdf60 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Capitalization.java @@ -196,9 +196,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Cat.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Cat.java index 154c1aaeb0a..2755c930869 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Cat.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Category.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Category.java index a7cfd551750..59721e64600 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Category.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Category.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/ClassModel.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/ClassModel.java index 86029cf9bdd..c56f6c3c114 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/ClassModel.java @@ -72,9 +72,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Client.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Client.java index 82e3f9f1116..6f9ab5f1def 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Client.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Client.java @@ -71,9 +71,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Dog.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Dog.java index 17f1d070eba..955da362e7d 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Dog.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/EnumArrays.java index d0ab7afca56..66617f31f9e 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/EnumArrays.java @@ -170,9 +170,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/EnumTest.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/EnumTest.java index 4f64f4562f3..55bc292aa99 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/EnumTest.java @@ -244,9 +244,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/FormatTest.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/FormatTest.java index 99ad7deb9cf..97318ae1b54 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/FormatTest.java @@ -393,9 +393,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/HasOnlyReadOnly.java index 23bc93bfdce..98b90d72553 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/HasOnlyReadOnly.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/MapTest.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/MapTest.java index 556cb7c33c5..876c21623a3 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/MapTest.java @@ -150,9 +150,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 50330e80d5c..f8af2a2829b 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -139,9 +139,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Model200Response.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Model200Response.java index a8b496debb4..f13c19e5266 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Model200Response.java @@ -97,9 +97,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/ModelApiResponse.java index bb4d933a852..0e93ffad1d3 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/ModelApiResponse.java @@ -121,9 +121,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/ModelReturn.java index 2f85fcb8a07..e5d4510346a 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/ModelReturn.java @@ -72,9 +72,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Name.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Name.java index 26361ad7cb0..78d37a85927 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Name.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Name.java @@ -148,9 +148,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/NumberOnly.java index 23120f3d823..511c87a2051 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/NumberOnly.java @@ -73,9 +73,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Order.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Order.java index b8a2a2c46e4..b1c940616d6 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Order.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Order.java @@ -232,9 +232,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/OuterComposite.java index 6786a2eac48..7a4f818e5d7 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/OuterComposite.java @@ -123,9 +123,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Pet.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Pet.java index 1c769b0939e..c3e20cd158f 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Pet.java @@ -253,9 +253,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/ReadOnlyFirst.java index 475f63e8731..98fd9714f7e 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/ReadOnlyFirst.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/SpecialModelName.java index 1a4f1acd512..f20ddc08162 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/SpecialModelName.java @@ -71,9 +71,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Tag.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Tag.java index 73a7d36cf4d..fb271c4fc41 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/Tag.java @@ -96,9 +96,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/main/java/io/swagger/model/User.java b/samples/server/petstore/springboot/src/main/java/io/swagger/model/User.java index 658e823c5a5..54e3613f6d5 100644 --- a/samples/server/petstore/springboot/src/main/java/io/swagger/model/User.java +++ b/samples/server/petstore/springboot/src/main/java/io/swagger/model/User.java @@ -234,7 +234,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -246,9 +246,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..f70df75ca06 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/AdditionalPropertiesClassTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AdditionalPropertiesClass + */ +// @Ignore +public class AdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new AdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/AnimalFarmTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/AnimalFarmTest.java new file mode 100644 index 00000000000..c3118acf47f --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/AnimalFarmTest.java @@ -0,0 +1,53 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import io.swagger.model.Animal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity AnimalFarm + */ +// @Ignore +public class AnimalFarmTest { + + @Test + public void testInstance() { + new AnimalFarm(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/AnimalTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/AnimalTest.java new file mode 100644 index 00000000000..ebf8f3163c1 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/AnimalTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Animal + */ +// @Ignore +public class AnimalTest { + + @Test + public void testInstance() { + new Animal(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..72e896fb1e8 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ArrayOfArrayOfNumberOnlyTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java new file mode 100644 index 00000000000..14ff29d7b76 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ArrayOfNumberOnlyTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayOfNumberOnly + */ +// @Ignore +public class ArrayOfNumberOnlyTest { + + @Test + public void testInstance() { + new ArrayOfNumberOnly(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/ArrayTestTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ArrayTestTest.java new file mode 100644 index 00000000000..6b1cccd8891 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ArrayTestTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.ReadOnlyFirst; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ArrayTest + */ +// @Ignore +public class ArrayTestTest { + + @Test + public void testInstance() { + new ArrayTest(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/CapitalizationTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/CapitalizationTest.java new file mode 100644 index 00000000000..872e22072eb --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/CapitalizationTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Capitalization + */ +// @Ignore +public class CapitalizationTest { + + @Test + public void testInstance() { + new Capitalization(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/CatTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/CatTest.java new file mode 100644 index 00000000000..bc9942fbccb --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/CatTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Cat + */ +// @Ignore +public class CatTest { + + @Test + public void testInstance() { + new Cat(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..c9acfd3eee1 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/ClassModelTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ClassModelTest.java new file mode 100644 index 00000000000..bb092840929 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ClassModelTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ClassModel + */ +// @Ignore +public class ClassModelTest { + + @Test + public void testInstance() { + new ClassModel(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/ClientTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ClientTest.java new file mode 100644 index 00000000000..cc7e8b028a5 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ClientTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Client + */ +// @Ignore +public class ClientTest { + + @Test + public void testInstance() { + new Client(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/DogTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/DogTest.java new file mode 100644 index 00000000000..1fd067523a0 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/DogTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Dog + */ +// @Ignore +public class DogTest { + + @Test + public void testInstance() { + new Dog(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/EnumArraysTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/EnumArraysTest.java new file mode 100644 index 00000000000..af7ec4cca28 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/EnumArraysTest.java @@ -0,0 +1,57 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumArrays + */ +// @Ignore +public class EnumArraysTest { + + @Test + public void testInstance() { + new EnumArrays(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/EnumClassTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/EnumClassTest.java new file mode 100644 index 00000000000..7c9617c917b --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/EnumClassTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumClass + */ +// @Ignore +public class EnumClassTest { + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/EnumTestTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/EnumTestTest.java new file mode 100644 index 00000000000..4cc9ea0bc96 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/EnumTestTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.OuterEnum; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity EnumTest + */ +// @Ignore +public class EnumTestTest { + + @Test + public void testInstance() { + new EnumTest(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/FormatTestTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/FormatTestTest.java new file mode 100644 index 00000000000..d0327327bfd --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/FormatTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; +import java.util.UUID; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity FormatTest + */ +// @Ignore +public class FormatTestTest { + + @Test + public void testInstance() { + new FormatTest(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java new file mode 100644 index 00000000000..027333ecf80 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/HasOnlyReadOnlyTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity HasOnlyReadOnly + */ +// @Ignore +public class HasOnlyReadOnlyTest { + + @Test + public void testInstance() { + new HasOnlyReadOnly(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/MapTestTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/MapTestTest.java new file mode 100644 index 00000000000..26ad27a48c8 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/MapTestTest.java @@ -0,0 +1,58 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MapTest + */ +// @Ignore +public class MapTestTest { + + @Test + public void testInstance() { + new MapTest(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java new file mode 100644 index 00000000000..292dee31757 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClassTest.java @@ -0,0 +1,60 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Animal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity MixedPropertiesAndAdditionalPropertiesClass + */ +// @Ignore +public class MixedPropertiesAndAdditionalPropertiesClassTest { + + @Test + public void testInstance() { + new MixedPropertiesAndAdditionalPropertiesClass(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/Model200ResponseTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/Model200ResponseTest.java new file mode 100644 index 00000000000..6cd97d59eca --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/Model200ResponseTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Model200Response + */ +// @Ignore +public class Model200ResponseTest { + + @Test + public void testInstance() { + new Model200Response(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..e08cb759ece --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/ModelReturnTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ModelReturnTest.java new file mode 100644 index 00000000000..c40deb1f25e --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ModelReturnTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelReturn + */ +// @Ignore +public class ModelReturnTest { + + @Test + public void testInstance() { + new ModelReturn(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/NameTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/NameTest.java new file mode 100644 index 00000000000..0a3ba719ef5 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/NameTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Name + */ +// @Ignore +public class NameTest { + + @Test + public void testInstance() { + new Name(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/NumberOnlyTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/NumberOnlyTest.java new file mode 100644 index 00000000000..515e80a3ea8 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/NumberOnlyTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity NumberOnly + */ +// @Ignore +public class NumberOnlyTest { + + @Test + public void testInstance() { + new NumberOnly(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..a19a50547f3 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,56 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/OuterCompositeTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/OuterCompositeTest.java new file mode 100644 index 00000000000..09f78fe6092 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/OuterCompositeTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterComposite + */ +// @Ignore +public class OuterCompositeTest { + + @Test + public void testInstance() { + new OuterComposite(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/OuterEnumTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/OuterEnumTest.java new file mode 100644 index 00000000000..6a1e97ae85e --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/OuterEnumTest.java @@ -0,0 +1,46 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonValue; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity OuterEnum + */ +// @Ignore +public class OuterEnumTest { + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..6238a58cfd2 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/ReadOnlyFirstTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ReadOnlyFirstTest.java new file mode 100644 index 00000000000..70f9452ed8c --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/ReadOnlyFirstTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ReadOnlyFirst + */ +// @Ignore +public class ReadOnlyFirstTest { + + @Test + public void testInstance() { + new ReadOnlyFirst(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/SpecialModelNameTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/SpecialModelNameTest.java new file mode 100644 index 00000000000..a93d5aa1a8a --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/SpecialModelNameTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity SpecialModelName + */ +// @Ignore +public class SpecialModelNameTest { + + @Test + public void testInstance() { + new SpecialModelName(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..f9759a6fa90 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..009fef0cc49 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,64 @@ +/* + * 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.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/springboot/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/springboot/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..5eadc70fb26 --- /dev/null +++ b/samples/server/petstore/springboot/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,96 @@ +/* + * 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.model.util; + +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (clazz.isAssignableFrom(OffsetDateTime.class)) { + return (T) OffsetDateTime.now(); + } + if (clazz.isAssignableFrom(LocalDate.class)) { + return (T) LocalDate.now(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file diff --git a/samples/server/petstore/undertow/README.md b/samples/server/petstore/undertow/README.md index 9f1e36dd163..a983dba343c 100644 --- a/samples/server/petstore/undertow/README.md +++ b/samples/server/petstore/undertow/README.md @@ -20,9 +20,5 @@ oauth2 server [undertow-server-oauth2](https://github.com/networknt/undertow-ser Bearer eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ1cm46Y29tOm5ldHdvcmtudDpvYXV0aDI6djEiLCJhdWQiOiJ1cm46Y29tLm5ldHdvcmtudCIsImV4cCI6MTc4ODEzMjczNSwianRpIjoiNWtyM2ZWOHJaelBZNEJrSnNYZzFpQSIsImlhdCI6MTQ3Mjc3MjczNSwibmJmIjoxNDcyNzcyNjE1LCJ2ZXJzaW9uIjoiMS4wIiwidXNlcl9pZCI6InN0ZXZlIiwidXNlcl90eXBlIjoiRU1QTE9ZRUUiLCJjbGllbnRfaWQiOiJkZGNhZjBiYS0xMTMxLTIyMzItMzMxMy1kNmYyNzUzZjI1ZGMiLCJzY29wZSI6WyJhcGkuciIsImFwaS53Il19.gteJiy1uao8HLeWRljpZxHWUgQfofwmnFP-zv3EPUyXjyCOy3xclnfeTnTE39j8PgBwdFASPcDLLk1YfZJbsU6pLlmYXLtdpHDBsVmIRuch6LFPCVQ3JdqSQVci59OhSK0bBThGWqCD3UzDI_OnX4IVCAahcT9Bu94m5u_H_JNmwDf1XaP3Lt4I34buYMuRD9stchsnZi-tuIRkL13FARm1XA9aPZUMUXFdedBWDXo1zMREQ_qCJXOpaZDJM9Im0rIkq9wTEVU00pbRp_Vcdya3dfkFteBMHiwFVt6VNQaco5BXURDAIzXidwQxNEbX1ek03wra8AIani65ZK7fy_w ``` -Postman is the best tool to test REST APIs - Add "Authorization" header with value as above token and a dummy message will return from the generated stub. - - diff --git a/samples/server/petstore/undertow/pom.xml b/samples/server/petstore/undertow/pom.xml index f5e8cc42f31..3f86986ed2b 100644 --- a/samples/server/petstore/undertow/pom.xml +++ b/samples/server/petstore/undertow/pom.xml @@ -1,4 +1,5 @@ - + org.sonatype.oss oss-parent @@ -10,9 +11,6 @@ jar swagger-undertow-server 1.0.0 - - 2.2.0 - 1.8 @@ -132,6 +130,26 @@ target ${project.artifactId}-${project.version} + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + org.apache.maven.plugins maven-shade-plugin @@ -144,7 +162,8 @@ - + @@ -186,4 +205,4 @@ - \ No newline at end of file + diff --git a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Category.java b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Category.java index cd893630bb0..d16dcf9a4ab 100644 --- a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Category.java +++ b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Category.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -88,9 +101,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/undertow/src/main/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/undertow/src/main/java/io/swagger/model/ModelApiResponse.java index 379cd81e56d..fe9b4b0eca9 100644 --- a/samples/server/petstore/undertow/src/main/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/undertow/src/main/java/io/swagger/model/ModelApiResponse.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -108,9 +121,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Order.java b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Order.java index fab631a5da6..0c08eac485d 100644 --- a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Order.java +++ b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Order.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -191,9 +204,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Pet.java b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Pet.java index ba8ffc821aa..23591bf8b4f 100644 --- a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Pet.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -194,9 +207,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Tag.java b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Tag.java index 0296e57b864..c96379a455c 100644 --- a/samples/server/petstore/undertow/src/main/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/undertow/src/main/java/io/swagger/model/Tag.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -88,9 +101,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } diff --git a/samples/server/petstore/undertow/src/main/java/io/swagger/model/User.java b/samples/server/petstore/undertow/src/main/java/io/swagger/model/User.java index 64e6021282a..187a52b78f8 100644 --- a/samples/server/petstore/undertow/src/main/java/io/swagger/model/User.java +++ b/samples/server/petstore/undertow/src/main/java/io/swagger/model/User.java @@ -1,3 +1,16 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + package io.swagger.model; import java.util.Objects; @@ -197,7 +210,7 @@ public String toString() { sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" password: ").append(toIndentedString(password, true)).append("\n"); sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); sb.append("}"); @@ -209,9 +222,20 @@ public String toString() { * (except the first line). */ private String toIndentedString(java.lang.Object o) { + return toIndentedString(o, false); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). Obfuscate the value, if required. + */ + private String toIndentedString(java.lang.Object o, boolean isObfuscated) { if (o == null) { return "null"; } + if (isObfuscated) { + return "***"; + } return o.toString().replace("\n", "\n "); } } 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 c54baaa89cf..325cc97e76a 100644 --- a/samples/server/petstore/undertow/src/main/resources/config/swagger.json +++ b/samples/server/petstore/undertow/src/main/resources/config/swagger.json @@ -1,919 +1,909 @@ -{ - "swagger" : "2.0", - "info" : { - "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", - "version" : "1.0.0", - "title" : "Swagger Petstore", - "termsOfService" : "http://swagger.io/terms/", - "contact" : { - "email" : "apiteam@swagger.io" - }, - "license" : { - "name" : "Apache-2.0", - "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" - } - }, - "host" : "petstore.swagger.io", - "basePath" : "/v2", - "tags" : [ { - "name" : "pet", - "description" : "Everything about your Pets", - "externalDocs" : { - "description" : "Find out more", - "url" : "http://swagger.io" - } - }, { - "name" : "store", - "description" : "Access to Petstore orders" - }, { - "name" : "user", - "description" : "Operations about user", - "externalDocs" : { - "description" : "Find out more about our store", - "url" : "http://swagger.io" - } - } ], - "schemes" : [ "http" ], - "paths" : { - "/pet" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "Add a new pet to the store", - "description" : "", - "operationId" : "addPet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "pet" ], - "summary" : "Update an existing pet", - "description" : "", - "operationId" : "updatePet", - "consumes" : [ "application/json", "application/xml" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Pet object that needs to be added to the store", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Pet" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - }, - "405" : { - "description" : "Validation exception" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByStatus" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by status", - "description" : "Multiple status values can be provided with comma separated strings", - "operationId" : "findPetsByStatus", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "status", - "in" : "query", - "description" : "Status values that need to be considered for filter", - "required" : true, - "type" : "array", - "items" : { - "type" : "string", - "enum" : [ "available", "pending", "sold" ], - "default" : "available" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid status value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/findByTags" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Finds Pets by tags", - "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", - "operationId" : "findPetsByTags", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "tags", - "in" : "query", - "description" : "Tags to filter by", - "required" : true, - "type" : "array", - "items" : { - "type" : "string" - }, - "collectionFormat" : "csv" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/Pet" - } - } - }, - "400" : { - "description" : "Invalid tag value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "deprecated" : true, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}" : { - "get" : { - "tags" : [ "pet" ], - "summary" : "Find pet by ID", - "description" : "Returns a single pet", - "operationId" : "getPetById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to return", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Pet" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Pet not found" - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "post" : { - "tags" : [ "pet" ], - "summary" : "Updates a pet in the store with form data", - "description" : "", - "operationId" : "updatePetWithForm", - "consumes" : [ "application/x-www-form-urlencoded" ], - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet that needs to be updated", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "name", - "in" : "formData", - "description" : "Updated name of the pet", - "required" : false, - "type" : "string" - }, { - "name" : "status", - "in" : "formData", - "description" : "Updated status of the pet", - "required" : false, - "type" : "string" - } ], - "responses" : { - "405" : { - "description" : "Invalid input" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/x-www-form-urlencoded", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "pet" ], - "summary" : "Deletes a pet", - "description" : "", - "operationId" : "deletePet", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "api_key", - "in" : "header", - "required" : false, - "type" : "string" - }, { - "name" : "petId", - "in" : "path", - "description" : "Pet id to delete", - "required" : true, - "type" : "integer", - "format" : "int64" - } ], - "responses" : { - "400" : { - "description" : "Invalid pet value" - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/pet/{petId}/uploadImage" : { - "post" : { - "tags" : [ "pet" ], - "summary" : "uploads an image", - "description" : "", - "operationId" : "uploadFile", - "consumes" : [ "multipart/form-data" ], - "produces" : [ "application/json" ], - "parameters" : [ { - "name" : "petId", - "in" : "path", - "description" : "ID of pet to update", - "required" : true, - "type" : "integer", - "format" : "int64" - }, { - "name" : "additionalMetadata", - "in" : "formData", - "description" : "Additional data to pass to server", - "required" : false, - "type" : "string" - }, { - "name" : "file", - "in" : "formData", - "description" : "file to upload", - "required" : false, - "type" : "file" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/ApiResponse" - } - } - }, - "security" : [ { - "petstore_auth" : [ "write:pets", "read:pets" ] - } ], - "x-contentType" : "multipart/form-data", - "x-accepts" : "application/json" - } - }, - "/store/inventory" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Returns pet inventories by status", - "description" : "Returns a map of status codes to quantities", - "operationId" : "getInventory", - "produces" : [ "application/json" ], - "parameters" : [ ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "object", - "additionalProperties" : { - "type" : "integer", - "format" : "int32" - } - } - } - }, - "security" : [ { - "api_key" : [ ] - } ], - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order" : { - "post" : { - "tags" : [ "store" ], - "summary" : "Place an order for a pet", - "description" : "", - "operationId" : "placeOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "order placed for purchasing the pet", - "required" : true, - "schema" : { - "$ref" : "#/definitions/Order" - } - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid Order" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/store/order/{orderId}" : { - "get" : { - "tags" : [ "store" ], - "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", - "operationId" : "getOrderById", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of pet that needs to be fetched", - "required" : true, - "type" : "integer", - "maximum" : 5, - "minimum" : 1, - "format" : "int64" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/Order" - } - }, - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "store" ], - "summary" : "Delete purchase order by ID", - "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", - "operationId" : "deleteOrder", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "orderId", - "in" : "path", - "description" : "ID of the order that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid ID supplied" - }, - "404" : { - "description" : "Order not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Create user", - "description" : "This can only be done by the logged in user.", - "operationId" : "createUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "Created user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithArray" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithArrayInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/createWithList" : { - "post" : { - "tags" : [ "user" ], - "summary" : "Creates list of users with given input array", - "description" : "", - "operationId" : "createUsersWithListInput", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "in" : "body", - "name" : "body", - "description" : "List of user object", - "required" : true, - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/User" - } - } - } ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/login" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs user into the system", - "description" : "", - "operationId" : "loginUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "query", - "description" : "The user name for login", - "required" : true, - "type" : "string" - }, { - "name" : "password", - "in" : "query", - "description" : "The password for login in clear text", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "type" : "string" - }, - "headers" : { - "X-Rate-Limit" : { - "type" : "integer", - "format" : "int32", - "description" : "calls per hour allowed by the user" - }, - "X-Expires-After" : { - "type" : "string", - "format" : "date-time", - "description" : "date in UTC when toekn expires" - } - } - }, - "400" : { - "description" : "Invalid username/password supplied" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/logout" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Logs out current logged in user session", - "description" : "", - "operationId" : "logoutUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ ], - "responses" : { - "default" : { - "description" : "successful operation" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - }, - "/user/{username}" : { - "get" : { - "tags" : [ "user" ], - "summary" : "Get user by user name", - "description" : "", - "operationId" : "getUserByName", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be fetched. Use user1 for testing. ", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "successful operation", - "schema" : { - "$ref" : "#/definitions/User" - } - }, - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "put" : { - "tags" : [ "user" ], - "summary" : "Updated user", - "description" : "This can only be done by the logged in user.", - "operationId" : "updateUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "name that need to be deleted", - "required" : true, - "type" : "string" - }, { - "in" : "body", - "name" : "body", - "description" : "Updated user object", - "required" : true, - "schema" : { - "$ref" : "#/definitions/User" - } - } ], - "responses" : { - "400" : { - "description" : "Invalid user supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - }, - "delete" : { - "tags" : [ "user" ], - "summary" : "Delete user", - "description" : "This can only be done by the logged in user.", - "operationId" : "deleteUser", - "produces" : [ "application/xml", "application/json" ], - "parameters" : [ { - "name" : "username", - "in" : "path", - "description" : "The name that needs to be deleted", - "required" : true, - "type" : "string" - } ], - "responses" : { - "400" : { - "description" : "Invalid username supplied" - }, - "404" : { - "description" : "User not found" - } - }, - "x-contentType" : "application/json", - "x-accepts" : "application/json" - } - } - }, - "securityDefinitions" : { - "petstore_auth" : { - "type" : "oauth2", - "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", - "flow" : "implicit", - "scopes" : { - "write:pets" : "modify pets in your account", - "read:pets" : "read your pets" - } - }, - "api_key" : { - "type" : "apiKey", - "name" : "api_key", - "in" : "header" - } - }, - "definitions" : { - "Order" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "petId" : { - "type" : "integer", - "format" : "int64" - }, - "quantity" : { - "type" : "integer", - "format" : "int32" - }, - "shipDate" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "description" : "Order Status", - "enum" : [ "placed", "approved", "delivered" ] - }, - "complete" : { - "type" : "boolean", - "default" : false - } - }, - "title" : "Pet Order", - "description" : "An order for a pets from the pet store", - "example" : { - "petId" : 6, - "quantity" : 1, - "id" : 0, - "shipDate" : "2000-01-23T04:56:07.000+00:00", - "complete" : false, - "status" : "placed" - }, - "xml" : { - "name" : "Order" - } - }, - "Category" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet catehgry", - "description" : "A category for a pet", - "example" : { - "name" : "name", - "id" : 6 - }, - "xml" : { - "name" : "Category" - } - }, - "User" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "username" : { - "type" : "string" - }, - "firstName" : { - "type" : "string" - }, - "lastName" : { - "type" : "string" - }, - "email" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "phone" : { - "type" : "string" - }, - "userStatus" : { - "type" : "integer", - "format" : "int32", - "description" : "User Status" - } - }, - "title" : "a User", - "description" : "A User who is purchasing from the pet store", - "example" : { - "firstName" : "firstName", - "lastName" : "lastName", - "password" : "password", - "userStatus" : 6, - "phone" : "phone", - "id" : 0, - "email" : "email", - "username" : "username" - }, - "xml" : { - "name" : "User" - } - }, - "Tag" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "name" : { - "type" : "string" - } - }, - "title" : "Pet Tag", - "description" : "A tag for a pet", - "example" : { - "name" : "name", - "id" : 1 - }, - "xml" : { - "name" : "Tag" - } - }, - "Pet" : { - "type" : "object", - "required" : [ "name", "photoUrls" ], - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64" - }, - "category" : { - "$ref" : "#/definitions/Category" - }, - "name" : { - "type" : "string", - "example" : "doggie" - }, - "photoUrls" : { - "type" : "array", - "xml" : { - "name" : "photoUrl", - "wrapped" : true - }, - "items" : { - "type" : "string" - } - }, - "tags" : { - "type" : "array", - "xml" : { - "name" : "tag", - "wrapped" : true - }, - "items" : { - "$ref" : "#/definitions/Tag" - } - }, - "status" : { - "type" : "string", - "description" : "pet status in the store", - "enum" : [ "available", "pending", "sold" ] - } - }, - "title" : "a Pet", - "description" : "A pet for sale in the pet store", - "example" : { - "photoUrls" : [ "photoUrls", "photoUrls" ], - "name" : "doggie", - "id" : 0, - "category" : { - "name" : "name", - "id" : 6 - }, - "tags" : [ { - "name" : "name", - "id" : 1 - }, { - "name" : "name", - "id" : 1 - } ], - "status" : "available" - }, - "xml" : { - "name" : "Pet" - } - }, - "ApiResponse" : { - "type" : "object", - "properties" : { - "code" : { - "type" : "integer", - "format" : "int32" - }, - "type" : { - "type" : "string" - }, - "message" : { - "type" : "string" - } - }, - "title" : "An uploaded response", - "description" : "Describes the result of uploading an image resource", - "example" : { - "code" : 0, - "type" : "type", - "message" : "message" - } - } - }, - "externalDocs" : { - "description" : "Find out more about Swagger", - "url" : "http://swagger.io" - } +{ + "swagger" : "2.0", + "info" : { + "description" : "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "version" : "1.0.0", + "title" : "Swagger Petstore", + "termsOfService" : "http://swagger.io/terms/", + "contact" : { + "email" : "apiteam@swagger.io" + }, + "license" : { + "name" : "Apache-2.0", + "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" + } + }, + "host" : "petstore.swagger.io", + "basePath" : "/v2", + "tags" : [ { + "name" : "pet", + "description" : "Everything about your Pets", + "externalDocs" : { + "description" : "Find out more", + "url" : "http://swagger.io" + } + }, { + "name" : "store", + "description" : "Access to Petstore orders" + }, { + "name" : "user", + "description" : "Operations about user", + "externalDocs" : { + "description" : "Find out more about our store", + "url" : "http://swagger.io" + } + } ], + "schemes" : [ "http" ], + "paths" : { + "/pet" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "Add a new pet to the store", + "description" : "", + "operationId" : "addPet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "pet" ], + "summary" : "Update an existing pet", + "description" : "", + "operationId" : "updatePet", + "consumes" : [ "application/json", "application/xml" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Pet object that needs to be added to the store", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Pet" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + }, + "405" : { + "description" : "Validation exception" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/pet/findByStatus" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by status", + "description" : "Multiple status values can be provided with comma separated strings", + "operationId" : "findPetsByStatus", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "status", + "in" : "query", + "description" : "Status values that need to be considered for filter", + "required" : true, + "type" : "array", + "items" : { + "type" : "string", + "default" : "available", + "enum" : [ "available", "pending", "sold" ] + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid status value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/findByTags" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Finds Pets by tags", + "description" : "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", + "operationId" : "findPetsByTags", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "tags", + "in" : "query", + "description" : "Tags to filter by", + "required" : true, + "type" : "array", + "items" : { + "type" : "string" + }, + "collectionFormat" : "csv" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/Pet" + } + } + }, + "400" : { + "description" : "Invalid tag value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "deprecated" : true, + "x-accepts" : "application/json" + } + }, + "/pet/{petId}" : { + "get" : { + "tags" : [ "pet" ], + "summary" : "Find pet by ID", + "description" : "Returns a single pet", + "operationId" : "getPetById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to return", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Pet" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Pet not found" + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + }, + "post" : { + "tags" : [ "pet" ], + "summary" : "Updates a pet in the store with form data", + "description" : "", + "operationId" : "updatePetWithForm", + "consumes" : [ "application/x-www-form-urlencoded" ], + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet that needs to be updated", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "name", + "in" : "formData", + "description" : "Updated name of the pet", + "required" : false, + "type" : "string" + }, { + "name" : "status", + "in" : "formData", + "description" : "Updated status of the pet", + "required" : false, + "type" : "string" + } ], + "responses" : { + "405" : { + "description" : "Invalid input" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "application/x-www-form-urlencoded", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "pet" ], + "summary" : "Deletes a pet", + "description" : "", + "operationId" : "deletePet", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "api_key", + "in" : "header", + "required" : false, + "type" : "string" + }, { + "name" : "petId", + "in" : "path", + "description" : "Pet id to delete", + "required" : true, + "type" : "integer", + "format" : "int64" + } ], + "responses" : { + "400" : { + "description" : "Invalid pet value" + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-accepts" : "application/json" + } + }, + "/pet/{petId}/uploadImage" : { + "post" : { + "tags" : [ "pet" ], + "summary" : "uploads an image", + "description" : "", + "operationId" : "uploadFile", + "consumes" : [ "multipart/form-data" ], + "produces" : [ "application/json" ], + "parameters" : [ { + "name" : "petId", + "in" : "path", + "description" : "ID of pet to update", + "required" : true, + "type" : "integer", + "format" : "int64" + }, { + "name" : "additionalMetadata", + "in" : "formData", + "description" : "Additional data to pass to server", + "required" : false, + "type" : "string" + }, { + "name" : "file", + "in" : "formData", + "description" : "file to upload", + "required" : false, + "type" : "file" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/ApiResponse" + } + } + }, + "security" : [ { + "petstore_auth" : [ "write:pets", "read:pets" ] + } ], + "x-contentType" : "multipart/form-data", + "x-accepts" : "application/json" + } + }, + "/store/inventory" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Returns pet inventories by status", + "description" : "Returns a map of status codes to quantities", + "operationId" : "getInventory", + "produces" : [ "application/json" ], + "parameters" : [ ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "object", + "additionalProperties" : { + "type" : "integer", + "format" : "int32" + } + } + } + }, + "security" : [ { + "api_key" : [ ] + } ], + "x-accepts" : "application/json" + } + }, + "/store/order" : { + "post" : { + "tags" : [ "store" ], + "summary" : "Place an order for a pet", + "description" : "", + "operationId" : "placeOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "order placed for purchasing the pet", + "required" : true, + "schema" : { + "$ref" : "#/definitions/Order" + } + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid Order" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/store/order/{orderId}" : { + "get" : { + "tags" : [ "store" ], + "summary" : "Find purchase order by ID", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "operationId" : "getOrderById", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of pet that needs to be fetched", + "required" : true, + "type" : "integer", + "maximum" : 5, + "minimum" : 1, + "format" : "int64" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/Order" + } + }, + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "store" ], + "summary" : "Delete purchase order by ID", + "description" : "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", + "operationId" : "deleteOrder", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "orderId", + "in" : "path", + "description" : "ID of the order that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid ID supplied" + }, + "404" : { + "description" : "Order not found" + } + }, + "x-accepts" : "application/json" + } + }, + "/user" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Create user", + "description" : "This can only be done by the logged in user.", + "operationId" : "createUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "Created user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithArray" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithArrayInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/createWithList" : { + "post" : { + "tags" : [ "user" ], + "summary" : "Creates list of users with given input array", + "description" : "", + "operationId" : "createUsersWithListInput", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "in" : "body", + "name" : "body", + "description" : "List of user object", + "required" : true, + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/User" + } + } + } ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + } + }, + "/user/login" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs user into the system", + "description" : "", + "operationId" : "loginUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "query", + "description" : "The user name for login", + "required" : true, + "type" : "string" + }, { + "name" : "password", + "in" : "query", + "description" : "The password for login in clear text", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "type" : "string" + }, + "headers" : { + "X-Rate-Limit" : { + "type" : "integer", + "format" : "int32", + "description" : "calls per hour allowed by the user" + }, + "X-Expires-After" : { + "type" : "string", + "format" : "date-time", + "description" : "date in UTC when toekn expires" + } + } + }, + "400" : { + "description" : "Invalid username/password supplied" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/logout" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Logs out current logged in user session", + "description" : "", + "operationId" : "logoutUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ ], + "responses" : { + "default" : { + "description" : "successful operation" + } + }, + "x-accepts" : "application/json" + } + }, + "/user/{username}" : { + "get" : { + "tags" : [ "user" ], + "summary" : "Get user by user name", + "description" : "", + "operationId" : "getUserByName", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be fetched. Use user1 for testing. ", + "required" : true, + "type" : "string" + } ], + "responses" : { + "200" : { + "description" : "successful operation", + "schema" : { + "$ref" : "#/definitions/User" + } + }, + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + }, + "put" : { + "tags" : [ "user" ], + "summary" : "Updated user", + "description" : "This can only be done by the logged in user.", + "operationId" : "updateUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "name that need to be deleted", + "required" : true, + "type" : "string" + }, { + "in" : "body", + "name" : "body", + "description" : "Updated user object", + "required" : true, + "schema" : { + "$ref" : "#/definitions/User" + } + } ], + "responses" : { + "400" : { + "description" : "Invalid user supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-contentType" : "application/json", + "x-accepts" : "application/json" + }, + "delete" : { + "tags" : [ "user" ], + "summary" : "Delete user", + "description" : "This can only be done by the logged in user.", + "operationId" : "deleteUser", + "produces" : [ "application/xml", "application/json" ], + "parameters" : [ { + "name" : "username", + "in" : "path", + "description" : "The name that needs to be deleted", + "required" : true, + "type" : "string" + } ], + "responses" : { + "400" : { + "description" : "Invalid username supplied" + }, + "404" : { + "description" : "User not found" + } + }, + "x-accepts" : "application/json" + } + } + }, + "securityDefinitions" : { + "petstore_auth" : { + "type" : "oauth2", + "authorizationUrl" : "http://petstore.swagger.io/api/oauth/dialog", + "flow" : "implicit", + "scopes" : { + "write:pets" : "modify pets in your account", + "read:pets" : "read your pets" + } + }, + "api_key" : { + "type" : "apiKey", + "name" : "api_key", + "in" : "header" + } + }, + "definitions" : { + "Order" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "petId" : { + "type" : "integer", + "format" : "int64" + }, + "quantity" : { + "type" : "integer", + "format" : "int32" + }, + "shipDate" : { + "type" : "string", + "format" : "date-time" + }, + "status" : { + "type" : "string", + "description" : "Order Status", + "enum" : [ "placed", "approved", "delivered" ] + }, + "complete" : { + "type" : "boolean", + "default" : false + } + }, + "title" : "Pet Order", + "description" : "An order for a pets from the pet store", + "example" : { + "petId" : 6, + "quantity" : 1, + "id" : 0, + "shipDate" : "2000-01-23T04:56:07.000+00:00", + "complete" : false, + "status" : "placed" + }, + "xml" : { + "name" : "Order" + } + }, + "Category" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet catehgry", + "description" : "A category for a pet", + "example" : { + "name" : "name", + "id" : 6 + }, + "xml" : { + "name" : "Category" + } + }, + "User" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "username" : { + "type" : "string" + }, + "firstName" : { + "type" : "string" + }, + "lastName" : { + "type" : "string" + }, + "email" : { + "type" : "string" + }, + "password" : { + "type" : "string", + "x-obfuscated" : true + }, + "phone" : { + "type" : "string" + }, + "userStatus" : { + "type" : "integer", + "format" : "int32", + "description" : "User Status" + } + }, + "title" : "a User", + "description" : "A User who is purchasing from the pet store", + "example" : { + "firstName" : "firstName", + "lastName" : "lastName", + "password" : "password", + "userStatus" : 6, + "phone" : "phone", + "id" : 0, + "email" : "email", + "username" : "username" + }, + "xml" : { + "name" : "User" + } + }, + "Tag" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "name" : { + "type" : "string" + } + }, + "title" : "Pet Tag", + "description" : "A tag for a pet", + "example" : { + "name" : "name", + "id" : 1 + }, + "xml" : { + "name" : "Tag" + } + }, + "Pet" : { + "type" : "object", + "required" : [ "name", "photoUrls" ], + "properties" : { + "id" : { + "type" : "integer", + "format" : "int64" + }, + "category" : { + "$ref" : "#/definitions/Category" + }, + "name" : { + "type" : "string", + "example" : "doggie" + }, + "photoUrls" : { + "type" : "array", + "xml" : { + "name" : "photoUrl", + "wrapped" : true + }, + "items" : { + "type" : "string" + } + }, + "tags" : { + "type" : "array", + "xml" : { + "name" : "tag", + "wrapped" : true + }, + "items" : { + "$ref" : "#/definitions/Tag" + } + }, + "status" : { + "type" : "string", + "description" : "pet status in the store", + "enum" : [ "available", "pending", "sold" ] + } + }, + "title" : "a Pet", + "description" : "A pet for sale in the pet store", + "example" : { + "photoUrls" : [ "photoUrls", "photoUrls" ], + "name" : "doggie", + "id" : 0, + "category" : { + "name" : "name", + "id" : 6 + }, + "tags" : [ { + "name" : "name", + "id" : 1 + }, { + "name" : "name", + "id" : 1 + } ], + "status" : "available" + }, + "xml" : { + "name" : "Pet" + } + }, + "ApiResponse" : { + "type" : "object", + "properties" : { + "code" : { + "type" : "integer", + "format" : "int32" + }, + "type" : { + "type" : "string" + }, + "message" : { + "type" : "string" + } + }, + "title" : "An uploaded response", + "description" : "Describes the result of uploading an image resource", + "example" : { + "code" : 0, + "type" : "type", + "message" : "message" + } + } + }, + "externalDocs" : { + "description" : "Find out more about Swagger", + "url" : "http://swagger.io" + } } \ No newline at end of file diff --git a/samples/server/petstore/undertow/src/test/java/io/swagger/model/CategoryTest.java b/samples/server/petstore/undertow/src/test/java/io/swagger/model/CategoryTest.java new file mode 100644 index 00000000000..aa77acb6ac3 --- /dev/null +++ b/samples/server/petstore/undertow/src/test/java/io/swagger/model/CategoryTest.java @@ -0,0 +1,52 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Category + */ +// @Ignore +public class CategoryTest { + + @Test + public void testInstance() { + new Category(); + } + +} diff --git a/samples/server/petstore/undertow/src/test/java/io/swagger/model/ModelApiResponseTest.java b/samples/server/petstore/undertow/src/test/java/io/swagger/model/ModelApiResponseTest.java new file mode 100644 index 00000000000..af4e173b1ce --- /dev/null +++ b/samples/server/petstore/undertow/src/test/java/io/swagger/model/ModelApiResponseTest.java @@ -0,0 +1,52 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity ModelApiResponse + */ +// @Ignore +public class ModelApiResponseTest { + + @Test + public void testInstance() { + new ModelApiResponse(); + } + +} diff --git a/samples/server/petstore/undertow/src/test/java/io/swagger/model/OrderTest.java b/samples/server/petstore/undertow/src/test/java/io/swagger/model/OrderTest.java new file mode 100644 index 00000000000..86e643cea7f --- /dev/null +++ b/samples/server/petstore/undertow/src/test/java/io/swagger/model/OrderTest.java @@ -0,0 +1,54 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.Date; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Order + */ +// @Ignore +public class OrderTest { + + @Test + public void testInstance() { + new Order(); + } + +} diff --git a/samples/server/petstore/undertow/src/test/java/io/swagger/model/PetTest.java b/samples/server/petstore/undertow/src/test/java/io/swagger/model/PetTest.java new file mode 100644 index 00000000000..ba316bc8769 --- /dev/null +++ b/samples/server/petstore/undertow/src/test/java/io/swagger/model/PetTest.java @@ -0,0 +1,57 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.model.Category; +import io.swagger.model.Tag; +import java.util.ArrayList; +import java.util.List; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Pet + */ +// @Ignore +public class PetTest { + + @Test + public void testInstance() { + new Pet(); + } + +} diff --git a/samples/server/petstore/undertow/src/test/java/io/swagger/model/TagTest.java b/samples/server/petstore/undertow/src/test/java/io/swagger/model/TagTest.java new file mode 100644 index 00000000000..bfe7a58df19 --- /dev/null +++ b/samples/server/petstore/undertow/src/test/java/io/swagger/model/TagTest.java @@ -0,0 +1,52 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity Tag + */ +// @Ignore +public class TagTest { + + @Test + public void testInstance() { + new Tag(); + } + +} diff --git a/samples/server/petstore/undertow/src/test/java/io/swagger/model/UserTest.java b/samples/server/petstore/undertow/src/test/java/io/swagger/model/UserTest.java new file mode 100644 index 00000000000..c8157cf4931 --- /dev/null +++ b/samples/server/petstore/undertow/src/test/java/io/swagger/model/UserTest.java @@ -0,0 +1,62 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.swagger.model; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.Ignore; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import io.swagger.model.util.ModelTestUtils; + +/** + * Model tests for entity User + */ +// @Ignore +public class UserTest { + + @Test + public void testInstance() { + new User(); + } + + @Test + public void testObfuscation_password() { + User model = new User(); + assertTrue("Unexpected toString() for null obfuscated property: " + model.toString(), model.toString().contains("password: null")); + String value = ModelTestUtils.getInstanceOf(String.class); + model.setPassword(value); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), model.toString().contains("password: ***")); + assertTrue("Unexpected toString() for non-null obfuscated property: " + model.toString(), !model.toString().contains(Objects.toString(value))); + } + +} diff --git a/samples/server/petstore/undertow/src/test/java/io/swagger/model/util/ModelTestUtils.java b/samples/server/petstore/undertow/src/test/java/io/swagger/model/util/ModelTestUtils.java new file mode 100644 index 00000000000..58c0478b89b --- /dev/null +++ b/samples/server/petstore/undertow/src/test/java/io/swagger/model/util/ModelTestUtils.java @@ -0,0 +1,88 @@ +/* + * Swagger Petstore + * This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. + * + * OpenAPI spec version: 1.0.0 + * Contact: apiteam@swagger.io + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.model.util; + + +import java.io.File; + +import java.util.Objects; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +/** + * Model test utils. + */ +public class ModelTestUtils { + + /** + * Creates an instance of required class. + */ + public static T getInstanceOf(Class clazz) { + if (clazz.isAssignableFrom(Boolean.class)) { + return (T) Boolean.TRUE; + } + if (clazz.isAssignableFrom(String.class)) { + return (T) "Test value."; + } + if (Integer.class.isAssignableFrom(clazz)) { + return (T) Integer.valueOf(1); + } + if (Number.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12); + } + if (Long.class.isAssignableFrom(clazz)) { + return (T) Long.valueOf(123); + } + if (Float.class.isAssignableFrom(clazz)) { + return (T) Float.valueOf(1234); + } + if (Double.class.isAssignableFrom(clazz)) { + return (T) Double.valueOf(12345); + } + if (List.class.isAssignableFrom(clazz)) { + return (T) new ArrayList(); + } + if (Map.class.isAssignableFrom(clazz)) { + return (T) new HashMap(); + } + if (Set.class.isAssignableFrom(clazz)) { + return (T) new HashSet(); + } + if (File.class.isAssignableFrom(clazz)) { + return (T) new File("."); + } + if (byte[].class.isAssignableFrom(clazz)) { + return (T) new byte[1]; + } + if (UUID.class.isAssignableFrom(clazz)) { + return (T) UUID.randomUUID(); + } + if (Enum.class.isAssignableFrom(clazz)) { + // throw new RuntimeException("Enum not implemented."); + return null; + } + try { + return clazz.newInstance(); + } catch (InstantiationException e) { + throw new RuntimeException(e); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} \ No newline at end of file