forked from loafle/openapi-generator-original
Merge branch '3.3.x' into 4.0.x
This commit is contained in:
commit
aed8e38584
@ -83,11 +83,12 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
|
|||||||
OpenAPI Generator Version | Release Date | OpenAPI Spec compatibility | Notes
|
OpenAPI Generator Version | Release Date | OpenAPI Spec compatibility | Notes
|
||||||
---------------------------- | ------------ | -------------------------- | -----
|
---------------------------- | ------------ | -------------------------- | -----
|
||||||
4.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes (no fallback)
|
4.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes (no fallback)
|
||||||
3.2.1 (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.2.1-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
|
3.3.0 (upcoming minor release)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release (breaking changes with fallbacks)
|
||||||
|
3.2.1 (current master, upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.2.1-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
||||||
[3.2.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.2.0) | 06.08.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
[3.2.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.2.0) | 06.08.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
||||||
[3.1.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.2) | 25.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
[3.1.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.2) | 25.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
||||||
[3.1.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.1) | 18.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
[3.1.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.1) | 18.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
||||||
[3.1.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.0) | 06.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks)
|
[3.1.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.1.0) | 06.07.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release (breaking changes with fallbacks)
|
||||||
[3.0.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.3) | 27.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
[3.0.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.3) | 27.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
||||||
[3.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.2) | 18.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
[3.0.2](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.2) | 18.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
||||||
[3.0.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.1) | 11.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
[3.0.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v3.0.1) | 11.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | Bugfix release
|
||||||
|
@ -168,7 +168,7 @@ abstract public class AbstractCppCodegen extends DefaultCodegen implements Codeg
|
|||||||
return sanitizeName(name);
|
return sanitizeName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isReservedWord(name)) {
|
if (isReservedWord(name) || name.matches("^\\d.*")) {
|
||||||
return escapeReservedWord(name);
|
return escapeReservedWord(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,6 +205,10 @@ abstract public class AbstractCppCodegen extends DefaultCodegen implements Codeg
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toParamName(String name) {
|
public String toParamName(String name) {
|
||||||
|
if (isReservedWord(name) || name.matches("^\\d.*")) {
|
||||||
|
return escapeReservedWord(name);
|
||||||
|
}
|
||||||
|
|
||||||
return sanitizeName(super.toParamName(name));
|
return sanitizeName(super.toParamName(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,6 +221,9 @@ abstract public class AbstractCppCodegen extends DefaultCodegen implements Codeg
|
|||||||
} else {
|
} else {
|
||||||
nameInCamelCase = sanitizeName(nameInCamelCase);
|
nameInCamelCase = sanitizeName(nameInCamelCase);
|
||||||
}
|
}
|
||||||
|
if (isReservedWord(nameInCamelCase) || nameInCamelCase.matches("^\\d.*")) {
|
||||||
|
nameInCamelCase = escapeReservedWord(nameInCamelCase);
|
||||||
|
}
|
||||||
property.nameInCamelCase = nameInCamelCase;
|
property.nameInCamelCase = nameInCamelCase;
|
||||||
return property;
|
return property;
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,8 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
|||||||
protected boolean isAddExternalLibs = true;
|
protected boolean isAddExternalLibs = true;
|
||||||
public static final String OPTIONAL_EXTERNAL_LIB = "addExternalLibs";
|
public static final String OPTIONAL_EXTERNAL_LIB = "addExternalLibs";
|
||||||
public static final String OPTIONAL_EXTERNAL_LIB_DESC = "Add the Possibility to fetch and compile external Libraries needed by this Framework.";
|
public static final String OPTIONAL_EXTERNAL_LIB_DESC = "Add the Possibility to fetch and compile external Libraries needed by this Framework.";
|
||||||
|
protected final String PREFIX = "";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CodegenType getTag() {
|
public CodegenType getTag() {
|
||||||
return CodegenType.SERVER;
|
return CodegenType.SERVER;
|
||||||
@ -63,6 +65,9 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
|||||||
|
|
||||||
public CppPistacheServerCodegen() {
|
public CppPistacheServerCodegen() {
|
||||||
super();
|
super();
|
||||||
|
if (StringUtils.isEmpty(modelNamePrefix)) {
|
||||||
|
modelNamePrefix = PREFIX;
|
||||||
|
}
|
||||||
|
|
||||||
apiPackage = "org.openapitools.server.api";
|
apiPackage = "org.openapitools.server.api";
|
||||||
modelPackage = "org.openapitools.server.model";
|
modelPackage = "org.openapitools.server.model";
|
||||||
@ -83,8 +88,8 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
|||||||
|
|
||||||
reservedWords = new HashSet<>();
|
reservedWords = new HashSet<>();
|
||||||
|
|
||||||
supportingFiles.add(new SupportingFile("modelbase-header.mustache", "model", "ModelBase.h"));
|
supportingFiles.add(new SupportingFile("modelbase-header.mustache", "model", modelNamePrefix + "ModelBase.h"));
|
||||||
supportingFiles.add(new SupportingFile("modelbase-source.mustache", "model", "ModelBase.cpp"));
|
supportingFiles.add(new SupportingFile("modelbase-source.mustache", "model", modelNamePrefix + "ModelBase.cpp"));
|
||||||
supportingFiles.add(new SupportingFile("cmake.mustache", "", "CMakeLists.txt"));
|
supportingFiles.add(new SupportingFile("cmake.mustache", "", "CMakeLists.txt"));
|
||||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||||
|
|
||||||
@ -117,7 +122,14 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
|||||||
@Override
|
@Override
|
||||||
public void processOpts() {
|
public void processOpts() {
|
||||||
super.processOpts();
|
super.processOpts();
|
||||||
|
if (additionalProperties.containsKey("modelNamePrefix")) {
|
||||||
|
additionalProperties().put("prefix", modelNamePrefix);
|
||||||
|
supportingFiles.clear();
|
||||||
|
supportingFiles.add(new SupportingFile("modelbase-header.mustache", "model", modelNamePrefix + "ModelBase.h"));
|
||||||
|
supportingFiles.add(new SupportingFile("modelbase-source.mustache", "model", modelNamePrefix + "ModelBase.cpp"));
|
||||||
|
supportingFiles.add(new SupportingFile("cmake.mustache", "", "CMakeLists.txt"));
|
||||||
|
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||||
|
}
|
||||||
additionalProperties.put("modelNamespaceDeclarations", modelPackage.split("\\."));
|
additionalProperties.put("modelNamespaceDeclarations", modelPackage.split("\\."));
|
||||||
additionalProperties.put("modelNamespace", modelPackage.replaceAll("\\.", "::"));
|
additionalProperties.put("modelNamespace", modelPackage.replaceAll("\\.", "::"));
|
||||||
additionalProperties.put("apiNamespaceDeclarations", apiPackage.split("\\."));
|
additionalProperties.put("apiNamespaceDeclarations", apiPackage.split("\\."));
|
||||||
@ -138,6 +150,7 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CodegenModel fromModel(String name, Schema model, Map<String, Schema> allDefinitions) {
|
public CodegenModel fromModel(String name, Schema model, Map<String, Schema> allDefinitions) {
|
||||||
CodegenModel codegenModel = super.fromModel(name, model, allDefinitions);
|
CodegenModel codegenModel = super.fromModel(name, model, allDefinitions);
|
||||||
@ -233,6 +246,12 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
|||||||
}
|
}
|
||||||
op.vendorExtensions.put("x-codegen-pistache-consumesJson", consumeJson);
|
op.vendorExtensions.put("x-codegen-pistache-consumesJson", consumeJson);
|
||||||
op.vendorExtensions.put("x-codegen-pistache-isParsingSupported", isParsingSupported);
|
op.vendorExtensions.put("x-codegen-pistache-isParsingSupported", isParsingSupported);
|
||||||
|
for(String hdr : op.imports) {
|
||||||
|
if(importMapping.containsKey(hdr)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
additionalProperties.put("hasModelImport", true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return objs;
|
return objs;
|
||||||
@ -240,7 +259,7 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toModelFilename(String name) {
|
public String toModelFilename(String name) {
|
||||||
return initialCaps(name);
|
return initialCaps(toModelName(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -265,7 +284,7 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toApiFilename(String name) {
|
public String toApiFilename(String name) {
|
||||||
return initialCaps(name) + "Api";
|
return modelNamePrefix + initialCaps(name) + "Api";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -322,7 +341,7 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen {
|
|||||||
return "0";
|
return "0";
|
||||||
}
|
}
|
||||||
else if (ModelUtils.isByteArraySchema(p)) {
|
else if (ModelUtils.isByteArraySchema(p)) {
|
||||||
return "";
|
return "\"\"";
|
||||||
} else if (ModelUtils.isMapSchema(p)) {
|
} else if (ModelUtils.isMapSchema(p)) {
|
||||||
String inner = getSchemaType((Schema) p.getAdditionalProperties());
|
String inner = getSchemaType((Schema) p.getAdditionalProperties());
|
||||||
return "std::map<std::string, " + inner + ">()";
|
return "std::map<std::string, " + inner + ">()";
|
||||||
|
@ -90,6 +90,7 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen {
|
|||||||
typeMapping.put("binary", "restbed::Bytes");
|
typeMapping.put("binary", "restbed::Bytes");
|
||||||
typeMapping.put("number", "double");
|
typeMapping.put("number", "double");
|
||||||
typeMapping.put("UUID", "std::string");
|
typeMapping.put("UUID", "std::string");
|
||||||
|
typeMapping.put("ByteArray", "std::string");
|
||||||
|
|
||||||
super.importMapping = new HashMap<String, String>();
|
super.importMapping = new HashMap<String, String>();
|
||||||
importMapping.put("std::vector", "#include <vector>");
|
importMapping.put("std::vector", "#include <vector>");
|
||||||
@ -271,6 +272,8 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen {
|
|||||||
} else if (ModelUtils.isMapSchema(p)) {
|
} else if (ModelUtils.isMapSchema(p)) {
|
||||||
Schema inner = (Schema) p.getAdditionalProperties();
|
Schema inner = (Schema) p.getAdditionalProperties();
|
||||||
return getSchemaType(p) + "<std::string, " + getTypeDeclaration(inner) + ">";
|
return getSchemaType(p) + "<std::string, " + getTypeDeclaration(inner) + ">";
|
||||||
|
} else if (ModelUtils.isByteArraySchema(p)) {
|
||||||
|
return "std::string";
|
||||||
} else if (ModelUtils.isStringSchema(p)
|
} else if (ModelUtils.isStringSchema(p)
|
||||||
|| ModelUtils.isDateSchema(p)
|
|| ModelUtils.isDateSchema(p)
|
||||||
|| ModelUtils.isDateTimeSchema(p) || ModelUtils.isFileSchema(p)
|
|| ModelUtils.isDateTimeSchema(p) || ModelUtils.isFileSchema(p)
|
||||||
@ -301,6 +304,8 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen {
|
|||||||
return "0L";
|
return "0L";
|
||||||
}
|
}
|
||||||
return "0";
|
return "0";
|
||||||
|
} else if (ModelUtils.isByteArraySchema(p)) {
|
||||||
|
return "\"\"";
|
||||||
} else if (ModelUtils.isMapSchema(p)) {
|
} else if (ModelUtils.isMapSchema(p)) {
|
||||||
String inner = getSchemaType((Schema) p.getAdditionalProperties());
|
String inner = getSchemaType((Schema) p.getAdditionalProperties());
|
||||||
return "std::map<std::string, " + inner + ">()";
|
return "std::map<std::string, " + inner + ">()";
|
||||||
|
@ -8,6 +8,7 @@ import javax.ws.rs.core.Response;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
{{#useBeanValidation}}import javax.validation.constraints.*;
|
{{#useBeanValidation}}import javax.validation.constraints.*;
|
||||||
|
@ -11,7 +11,7 @@ public enum {{datatypeWithEnum}} {
|
|||||||
value = v;
|
value = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String value() {
|
public {{dataType}} value() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,2 +1 @@
|
|||||||
{{#isFormParam}}{{^isFile}}@FormParam(value = "{{baseName}}") {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} @FormParam(value = "{{baseName}}") InputStream {{paramName}}InputStream,
|
{{#isFormParam}}{{^isFile}}@FormParam(value = "{{baseName}}") {{{dataType}}} {{paramName}}{{/isFile}}{{#isFile}} @FormParam(value = "{{baseName}}") InputStream {{paramName}}InputStream{{/isFile}}{{/isFormParam}}
|
||||||
@FormParam(value = "{{baseName}}") Attachment {{paramName}}Detail{{/isFile}}{{/isFormParam}}
|
|
@ -11,10 +11,7 @@ import javax.validation.Valid;
|
|||||||
{{/useBeanValidation}}
|
{{/useBeanValidation}}
|
||||||
|
|
||||||
{{#models}}
|
{{#models}}
|
||||||
{{#model}}{{#description}}
|
{{#model}}
|
||||||
/**
|
|
||||||
* {{description}}
|
|
||||||
**/{{/description}}
|
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
{{>enumOuterClass}}
|
{{>enumOuterClass}}
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
{{#description}}@ApiModel(description = "{{{description}}}"){{/description}}
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
{{#description}}
|
||||||
|
/**
|
||||||
|
* {{description}}
|
||||||
|
**/{{/description}}
|
||||||
|
{{#description}}@ApiModel(description = "{{{description}}}"){{/description}}
|
||||||
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
|
public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#serializableModel}}implements Serializable{{/serializableModel}} {
|
||||||
{{#vars}}{{#isEnum}}{{^isContainer}}
|
{{#vars}}{{#isEnum}}{{^isContainer}}
|
||||||
|
|
||||||
|
@ -23,7 +23,8 @@
|
|||||||
namespace {{this}} {
|
namespace {{this}} {
|
||||||
{{/apiNamespaceDeclarations}}
|
{{/apiNamespaceDeclarations}}
|
||||||
|
|
||||||
using namespace {{modelNamespace}};
|
{{#hasModelImport}}
|
||||||
|
using namespace {{modelNamespace}};{{/hasModelImport}}
|
||||||
|
|
||||||
class {{declspec}} {{classname}} {
|
class {{declspec}} {{classname}} {
|
||||||
public:
|
public:
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
namespace {{this}} {
|
namespace {{this}} {
|
||||||
{{/apiNamespaceDeclarations}}
|
{{/apiNamespaceDeclarations}}
|
||||||
|
|
||||||
using namespace {{modelNamespace}};
|
{{#hasModelImport}}
|
||||||
|
using namespace {{modelNamespace}};{{/hasModelImport}}
|
||||||
|
|
||||||
class {{classname}}Impl : public {{apiNamespace}}::{{classname}} {
|
class {{classname}}Impl : public {{apiNamespace}}::{{classname}} {
|
||||||
public:
|
public:
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
namespace {{this}} {
|
namespace {{this}} {
|
||||||
{{/apiNamespaceDeclarations}}
|
{{/apiNamespaceDeclarations}}
|
||||||
|
|
||||||
using namespace {{modelNamespace}};
|
{{#hasModelImport}}
|
||||||
|
using namespace {{modelNamespace}};{{/hasModelImport}}
|
||||||
|
|
||||||
{{classname}}Impl::{{classname}}Impl(Pistache::Address addr)
|
{{classname}}Impl::{{classname}}Impl(Pistache::Address addr)
|
||||||
: {{classname}}(addr)
|
: {{classname}}(addr)
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
namespace {{this}} {
|
namespace {{this}} {
|
||||||
{{/apiNamespaceDeclarations}}
|
{{/apiNamespaceDeclarations}}
|
||||||
|
|
||||||
using namespace {{modelNamespace}};
|
{{#hasModelImport}}
|
||||||
|
using namespace {{modelNamespace}};{{/hasModelImport}}
|
||||||
|
|
||||||
{{classname}}::{{classname}}(Pistache::Address addr)
|
{{classname}}::{{classname}}(Pistache::Address addr)
|
||||||
: httpEndpoint(addr)
|
: httpEndpoint(addr)
|
||||||
@ -76,7 +77,7 @@ void {{classname}}::{{operationIdSnakeCase}}_handler(const Pistache::Rest::Reque
|
|||||||
nlohmann::json request_body = nlohmann::json::parse(request.body());
|
nlohmann::json request_body = nlohmann::json::parse(request.body());
|
||||||
{{^isPrimitiveType}}{{^isContainer}}
|
{{^isPrimitiveType}}{{^isContainer}}
|
||||||
{{paramName}}.fromJson(request_body);
|
{{paramName}}.fromJson(request_body);
|
||||||
{{/isContainer}}{{/isPrimitiveType}}{{#isContainer}} {{paramName}} = {{#isListContainer}} ModelArrayHelper{{/isListContainer}}{{#isMapContainer}} ModelMapHelper{{/isMapContainer}}::fromJson<{{items.baseType}}>(request_body);{{/isContainer}}
|
{{/isContainer}}{{/isPrimitiveType}}{{#isContainer}} {{paramName}} = {{#isListContainer}} {{prefix}}ModelArrayHelper{{/isListContainer}}{{#isMapContainer}} {{prefix}}ModelMapHelper{{/isMapContainer}}::fromJson<{{items.baseType}}>(request_body);{{/isContainer}}
|
||||||
{{#isPrimitiveType}}
|
{{#isPrimitiveType}}
|
||||||
// The conversion is done automatically by the json library
|
// The conversion is done automatically by the json library
|
||||||
{{paramName}} = request_body;
|
{{paramName}} = request_body;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#define {{classname}}_H_
|
#define {{classname}}_H_
|
||||||
|
|
||||||
{{{defaultInclude}}}
|
{{{defaultInclude}}}
|
||||||
#include "ModelBase.h"
|
#include "{{prefix}}ModelBase.h"
|
||||||
|
|
||||||
{{#imports}}{{{this}}}
|
{{#imports}}{{{this}}}
|
||||||
{{/imports}}
|
{{/imports}}
|
||||||
@ -22,14 +22,14 @@ namespace {{this}} {
|
|||||||
/// {{description}}
|
/// {{description}}
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class {{declspec}} {{classname}}
|
class {{declspec}} {{classname}}
|
||||||
: public ModelBase
|
: public {{prefix}}ModelBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
{{classname}}();
|
{{classname}}();
|
||||||
virtual ~{{classname}}();
|
virtual ~{{classname}}();
|
||||||
|
|
||||||
/////////////////////////////////////////////
|
/////////////////////////////////////////////
|
||||||
/// ModelBase overrides
|
/// {{prefix}}ModelBase overrides
|
||||||
|
|
||||||
void validate() override;
|
void validate() override;
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ nlohmann::json {{classname}}::toJson() const
|
|||||||
nlohmann::json jsonArray;
|
nlohmann::json jsonArray;
|
||||||
for( auto& item : m_{{name}} )
|
for( auto& item : m_{{name}} )
|
||||||
{
|
{
|
||||||
jsonArray.push_back(ModelBase::toJson(item));
|
jsonArray.push_back({{prefix}}ModelBase::toJson(item));
|
||||||
}
|
}
|
||||||
{{#required}}val["{{baseName}}"] = jsonArray;
|
{{#required}}val["{{baseName}}"] = jsonArray;
|
||||||
{{/required}}{{^required}}
|
{{/required}}{{^required}}
|
||||||
@ -50,9 +50,9 @@ nlohmann::json {{classname}}::toJson() const
|
|||||||
}
|
}
|
||||||
{{/isListContainer}}{{^isListContainer}}{{^isPrimitiveType}}{{^required}}if(m_{{name}}IsSet)
|
{{/isListContainer}}{{^isListContainer}}{{^isPrimitiveType}}{{^required}}if(m_{{name}}IsSet)
|
||||||
{
|
{
|
||||||
val["{{baseName}}"] = ModelBase::toJson(m_{{name}});
|
val["{{baseName}}"] = {{prefix}}ModelBase::toJson(m_{{name}});
|
||||||
}
|
}
|
||||||
{{/required}}{{#required}}val["{{baseName}}"] = ModelBase::toJson(m_{{name}});
|
{{/required}}{{#required}}val["{{baseName}}"] = {{prefix}}ModelBase::toJson(m_{{name}});
|
||||||
{{/required}}{{/isPrimitiveType}}{{/isListContainer}}{{/vars}}
|
{{/required}}{{/isPrimitiveType}}{{/isListContainer}}{{/vars}}
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
{{>licenseInfo}}
|
{{>licenseInfo}}
|
||||||
/*
|
/*
|
||||||
* ModelBase.h
|
* {{prefix}}ModelBase.h
|
||||||
*
|
*
|
||||||
* This is the base class for all model classes
|
* This is the base class for all model classes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ModelBase_H_
|
#ifndef {{prefix}}ModelBase_H_
|
||||||
#define ModelBase_H_
|
#define {{prefix}}ModelBase_H_
|
||||||
|
|
||||||
{{{defaultInclude}}}
|
{{{defaultInclude}}}
|
||||||
#include "json.hpp"
|
#include "json.hpp"
|
||||||
@ -19,11 +19,11 @@
|
|||||||
namespace {{this}} {
|
namespace {{this}} {
|
||||||
{{/modelNamespaceDeclarations}}
|
{{/modelNamespaceDeclarations}}
|
||||||
|
|
||||||
class {{declspec}} ModelBase
|
class {{declspec}} {{prefix}}ModelBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ModelBase();
|
{{prefix}}ModelBase();
|
||||||
virtual ~ModelBase();
|
virtual ~{{prefix}}ModelBase();
|
||||||
|
|
||||||
virtual void validate() = 0;
|
virtual void validate() = 0;
|
||||||
|
|
||||||
@ -36,16 +36,16 @@ public:
|
|||||||
static int64_t toJson( int64_t const value );
|
static int64_t toJson( int64_t const value );
|
||||||
static double toJson( double const value );
|
static double toJson( double const value );
|
||||||
static bool toJson( bool const value );
|
static bool toJson( bool const value );
|
||||||
static nlohmann::json toJson(ModelBase const& content );
|
static nlohmann::json toJson({{prefix}}ModelBase const& content );
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModelArrayHelper {
|
class {{prefix}}ModelArrayHelper {
|
||||||
public:
|
public:
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static std::vector<T> fromJson(nlohmann::json& json) {
|
static std::vector<T> fromJson(nlohmann::json& json) {
|
||||||
T *ptrTest;
|
T *ptrTest;
|
||||||
std::vector<T> val;
|
std::vector<T> val;
|
||||||
if (dynamic_cast<ModelBase*>(ptrTest) != nullptr) {
|
if (dynamic_cast<{{prefix}}ModelBase*>(ptrTest) != nullptr) {
|
||||||
if (!json.empty()) {
|
if (!json.empty()) {
|
||||||
for (auto &item : json.items()) {
|
for (auto &item : json.items()) {
|
||||||
T entry;
|
T entry;
|
||||||
@ -66,7 +66,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ArrayHelper {
|
class {{prefix}}ArrayHelper {
|
||||||
public:
|
public:
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static std::vector<T> fromJson(nlohmann::json& json) {
|
static std::vector<T> fromJson(nlohmann::json& json) {
|
||||||
@ -82,13 +82,13 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModelMapHelper {
|
class {{prefix}}ModelMapHelper {
|
||||||
public:
|
public:
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static std::map<std::string, T> & fromJson(nlohmann::json& json) {
|
static std::map<std::string, T> & fromJson(nlohmann::json& json) {
|
||||||
T *ptrTest;
|
T *ptrTest;
|
||||||
std::map<std::string, T> val;
|
std::map<std::string, T> val;
|
||||||
if (dynamic_cast<ModelBase*>(ptrTest) != nullptr) {
|
if (dynamic_cast<{{prefix}}ModelBase*>(ptrTest) != nullptr) {
|
||||||
if (!json.empty()) {
|
if (!json.empty()) {
|
||||||
for (auto &item : json.items()) {
|
for (auto &item : json.items()) {
|
||||||
T entry;
|
T entry;
|
||||||
@ -110,7 +110,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class MapHelper {
|
class {{prefix}}MapHelper {
|
||||||
public:
|
public:
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static std::map<std::string, T> & fromJson(nlohmann::json& json) {
|
static std::map<std::string, T> & fromJson(nlohmann::json& json) {
|
||||||
@ -139,4 +139,4 @@ public:
|
|||||||
}
|
}
|
||||||
{{/modelNamespaceDeclarations}}
|
{{/modelNamespaceDeclarations}}
|
||||||
|
|
||||||
#endif /* ModelBase_H_ */
|
#endif /* {{prefix}}ModelBase_H_ */
|
||||||
|
@ -1,50 +1,50 @@
|
|||||||
{{>licenseInfo}}
|
{{>licenseInfo}}
|
||||||
#include "ModelBase.h"
|
#include "{{prefix}}ModelBase.h"
|
||||||
|
|
||||||
{{#modelNamespaceDeclarations}}
|
{{#modelNamespaceDeclarations}}
|
||||||
namespace {{this}} {
|
namespace {{this}} {
|
||||||
{{/modelNamespaceDeclarations}}
|
{{/modelNamespaceDeclarations}}
|
||||||
|
|
||||||
ModelBase::ModelBase()
|
{{prefix}}ModelBase::{{prefix}}ModelBase()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
ModelBase::~ModelBase()
|
{{prefix}}ModelBase::~{{prefix}}ModelBase()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ModelBase::toJson( std::string const& value )
|
std::string {{prefix}}ModelBase::toJson( std::string const& value )
|
||||||
{
|
{
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ModelBase::toJson( std::time_t const& value )
|
std::string {{prefix}}ModelBase::toJson( std::time_t const& value )
|
||||||
{
|
{
|
||||||
char buf[sizeof "2011-10-08T07:07:09Z"];
|
char buf[sizeof "2011-10-08T07:07:09Z"];
|
||||||
strftime(buf, sizeof buf, "%FT%TZ", gmtime(&value));
|
strftime(buf, sizeof buf, "%FT%TZ", gmtime(&value));
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t ModelBase::toJson( int32_t const value )
|
int32_t {{prefix}}ModelBase::toJson( int32_t const value )
|
||||||
{
|
{
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t ModelBase::toJson( int64_t const value )
|
int64_t {{prefix}}ModelBase::toJson( int64_t const value )
|
||||||
{
|
{
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
double ModelBase::toJson( double const value )
|
double {{prefix}}ModelBase::toJson( double const value )
|
||||||
{
|
{
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ModelBase::toJson( bool const value )
|
bool {{prefix}}ModelBase::toJson( bool const value )
|
||||||
{
|
{
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
nlohmann::json ModelBase::toJson(ModelBase const& content )
|
nlohmann::json {{prefix}}ModelBase::toJson({{prefix}}ModelBase const& content )
|
||||||
{
|
{
|
||||||
return content.toJson();
|
return content.toJson();
|
||||||
}
|
}
|
||||||
|
36
pom.xml
36
pom.xml
@ -715,6 +715,42 @@
|
|||||||
<module>samples/server/petstore/jaxrs/jersey1</module>
|
<module>samples/server/petstore/jaxrs/jersey1</module>
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>jaxrs-spec</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env</name>
|
||||||
|
<value>java</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>jaxrs-spec-interface</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env</name>
|
||||||
|
<value>java</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec-interface</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>jaxrs-spec-interface-response</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env</name>
|
||||||
|
<value>java</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
|
<module>samples/server/petstore/jaxrs-spec-interface-response</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
<id>typescript-fetch-client-tests-default</id>
|
<id>typescript-fetch-client-tests-default</id>
|
||||||
<activation>
|
<activation>
|
||||||
|
@ -1 +1 @@
|
|||||||
3.0.0-SNAPSHOT
|
3.2.1-SNAPSHOT
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
|
* NOTE: This class is auto generated by OpenAPI-Generator 3.2.1-SNAPSHOT.
|
||||||
* https://openapi-generator.tech
|
* https://openapi-generator.tech
|
||||||
* Do not edit the class manually.
|
* Do not edit the class manually.
|
||||||
*/
|
*/
|
||||||
|
@ -1 +1 @@
|
|||||||
3.0.1-SNAPSHOT
|
3.2.0-SNAPSHOT
|
@ -13,13 +13,32 @@
|
|||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>2.2</version>
|
<version>2.2</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>1.9.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>add-source</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>add-source</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sources>
|
||||||
|
<source>src/gen/java</source>
|
||||||
|
</sources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.ws.rs</groupId>
|
<groupId>javax.ws.rs</groupId>
|
||||||
<artifactId>javax.ws.rs-api</artifactId>
|
<artifactId>javax.ws.rs-api</artifactId>
|
||||||
<version>2.0</version>
|
<version>2.1</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -28,6 +47,18 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<version>1.5.3</version>
|
<version>1.5.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-annotations</artifactId>
|
||||||
|
<version>${jackson-version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>joda-time</groupId>
|
||||||
|
<artifactId>joda-time</artifactId>
|
||||||
|
<version>${jodatime-version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
@ -44,5 +75,7 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
<properties>
|
<properties>
|
||||||
<junit-version>4.8.1</junit-version>
|
<junit-version>4.8.1</junit-version>
|
||||||
|
<jackson-version>2.8.9</jackson-version>
|
||||||
|
<jodatime-version>2.9.9</jodatime-version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
@ -7,6 +7,7 @@ import javax.ws.rs.core.Response;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@ -20,8 +21,8 @@ public interface AnotherFakeApi {
|
|||||||
@Path("/dummy")
|
@Path("/dummy")
|
||||||
@Consumes({ "application/json" })
|
@Consumes({ "application/json" })
|
||||||
@Produces({ "application/json" })
|
@Produces({ "application/json" })
|
||||||
@ApiOperation(value = "To test special tags", notes = "To test special tags", tags={ "$another-fake?" })
|
@ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", tags={ "$another-fake?" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
||||||
Response testSpecialTags(@Valid Client client);
|
Response call123testSpecialTags(@Valid Client client);
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,10 @@ import java.math.BigDecimal;
|
|||||||
import org.openapitools.model.Client;
|
import org.openapitools.model.Client;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import org.openapitools.model.FileSchemaTestClass;
|
||||||
import org.joda.time.LocalDate;
|
import org.joda.time.LocalDate;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.openapitools.model.ModelApiResponse;
|
||||||
import org.openapitools.model.OuterComposite;
|
import org.openapitools.model.OuterComposite;
|
||||||
import org.openapitools.model.User;
|
import org.openapitools.model.User;
|
||||||
|
|
||||||
@ -14,6 +16,7 @@ import javax.ws.rs.core.Response;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@ -55,6 +58,14 @@ public interface FakeApi {
|
|||||||
@ApiResponse(code = 200, message = "Output string", response = String.class) })
|
@ApiResponse(code = 200, message = "Output string", response = String.class) })
|
||||||
Response fakeOuterStringSerialize(@Valid String body);
|
Response fakeOuterStringSerialize(@Valid String body);
|
||||||
|
|
||||||
|
@PUT
|
||||||
|
@Path("/body-with-file-schema")
|
||||||
|
@Consumes({ "application/json" })
|
||||||
|
@ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "Success", response = Void.class) })
|
||||||
|
Response testBodyWithFileSchema(@Valid FileSchemaTestClass fileSchemaTestClass);
|
||||||
|
|
||||||
@PUT
|
@PUT
|
||||||
@Path("/body-with-query-params")
|
@Path("/body-with-query-params")
|
||||||
@Consumes({ "application/json" })
|
@Consumes({ "application/json" })
|
||||||
@ -79,8 +90,7 @@ public interface FakeApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
||||||
Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string, @FormParam(value = "binary") InputStream binaryInputStream,
|
Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string, @FormParam(value = "binary") InputStream binaryInputStream,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") Date dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback);
|
||||||
@FormParam(value = "binary") Attachment binaryDetail,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") Date dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback);
|
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Consumes({ "application/x-www-form-urlencoded" })
|
@Consumes({ "application/x-www-form-urlencoded" })
|
||||||
@ -101,8 +111,22 @@ public interface FakeApi {
|
|||||||
@GET
|
@GET
|
||||||
@Path("/jsonFormData")
|
@Path("/jsonFormData")
|
||||||
@Consumes({ "application/x-www-form-urlencoded" })
|
@Consumes({ "application/x-www-form-urlencoded" })
|
||||||
@ApiOperation(value = "test json serialization of form data", notes = "", tags={ "fake" })
|
@ApiOperation(value = "test json serialization of form data", notes = "", tags={ "fake", })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
Response testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2);
|
Response testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2);
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/{petId}/uploadImageWithRequiredFile")
|
||||||
|
@Consumes({ "multipart/form-data" })
|
||||||
|
@Produces({ "application/json" })
|
||||||
|
@ApiOperation(value = "uploads an image (required)", notes = "", authorizations = {
|
||||||
|
@Authorization(value = "petstore_auth", scopes = {
|
||||||
|
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
|
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||||
|
})
|
||||||
|
}, tags={ "pet" })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||||
|
Response uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata);
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import javax.ws.rs.core.Response;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
@ -9,6 +9,7 @@ import javax.ws.rs.core.Response;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@ -121,6 +122,5 @@ public interface PetApi {
|
|||||||
}, tags={ "pet" })
|
}, tags={ "pet" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||||
Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream fileInputStream,
|
Response uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream fileInputStream);
|
||||||
@FormParam(value = "file") Attachment fileDetail);
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import javax.ws.rs.core.Response;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
@ -8,6 +8,7 @@ import javax.ws.rs.core.Response;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
@ -7,10 +7,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class AdditionalPropertiesClass implements Serializable {
|
public class AdditionalPropertiesClass implements Serializable {
|
||||||
|
@ -6,10 +6,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Animal implements Serializable {
|
public class Animal implements Serializable {
|
||||||
|
@ -7,10 +7,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class AnimalFarm extends ArrayList<Animal> implements Serializable {
|
public class AnimalFarm extends ArrayList<Animal> implements Serializable {
|
||||||
|
@ -7,10 +7,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class ArrayOfArrayOfNumberOnly implements Serializable {
|
public class ArrayOfArrayOfNumberOnly implements Serializable {
|
||||||
|
@ -7,10 +7,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class ArrayOfNumberOnly implements Serializable {
|
public class ArrayOfNumberOnly implements Serializable {
|
||||||
|
@ -7,10 +7,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class ArrayTest implements Serializable {
|
public class ArrayTest implements Serializable {
|
||||||
|
@ -4,10 +4,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Capitalization implements Serializable {
|
public class Capitalization implements Serializable {
|
||||||
|
@ -5,10 +5,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Cat extends Animal implements Serializable {
|
public class Cat extends Animal implements Serializable {
|
||||||
@ -25,7 +27,7 @@ public class Cat extends Animal implements Serializable {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@JsonProperty("declawed")
|
@JsonProperty("declawed")
|
||||||
public Boolean isDeclawed() {
|
public Boolean getDeclawed() {
|
||||||
return declawed;
|
return declawed;
|
||||||
}
|
}
|
||||||
public void setDeclawed(Boolean declawed) {
|
public void setDeclawed(Boolean declawed) {
|
||||||
|
@ -4,10 +4,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Category implements Serializable {
|
public class Category implements Serializable {
|
||||||
|
@ -5,15 +5,16 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing model with \"_class\" property
|
* Model for testing model with \"_class\" property
|
||||||
**/
|
**/
|
||||||
import io.swagger.annotations.*;
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
@ApiModel(description = "Model for testing model with \"_class\" property")
|
@ApiModel(description = "Model for testing model with \"_class\" property")
|
||||||
|
|
||||||
public class ClassModel implements Serializable {
|
public class ClassModel implements Serializable {
|
||||||
|
|
||||||
private @Valid String propertyClass = null;
|
private @Valid String propertyClass = null;
|
||||||
|
@ -4,10 +4,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Client implements Serializable {
|
public class Client implements Serializable {
|
||||||
|
@ -5,10 +5,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Dog extends Animal implements Serializable {
|
public class Dog extends Animal implements Serializable {
|
||||||
|
@ -6,10 +6,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class EnumArrays implements Serializable {
|
public class EnumArrays implements Serializable {
|
||||||
@ -43,7 +45,7 @@ public enum JustSymbolEnum {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
throw new IllegalArgumentException("Unexpected value '" + v + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +79,7 @@ public enum ArrayEnumEnum {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
throw new IllegalArgumentException("Unexpected value '" + v + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
@ -38,7 +37,7 @@ public enum EnumClass {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,10 +5,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class EnumTest implements Serializable {
|
public class EnumTest implements Serializable {
|
||||||
@ -42,7 +44,7 @@ public enum EnumStringEnum {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
throw new IllegalArgumentException("Unexpected value '" + v + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +78,7 @@ public enum EnumStringRequiredEnum {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
throw new IllegalArgumentException("Unexpected value '" + v + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +95,7 @@ public enum EnumIntegerEnum {
|
|||||||
value = v;
|
value = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String value() {
|
public Integer value() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +112,7 @@ public enum EnumIntegerEnum {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
throw new IllegalArgumentException("Unexpected value '" + v + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,7 +129,7 @@ public enum EnumNumberEnum {
|
|||||||
value = v;
|
value = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String value() {
|
public Double value() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,7 +146,7 @@ public enum EnumNumberEnum {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
throw new IllegalArgumentException("Unexpected value '" + v + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,97 @@
|
|||||||
|
package org.openapitools.model;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class FileSchemaTestClass implements Serializable {
|
||||||
|
|
||||||
|
private @Valid java.io.File file = null;
|
||||||
|
private @Valid List<java.io.File> files = new ArrayList<java.io.File>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
public FileSchemaTestClass file(java.io.File file) {
|
||||||
|
this.file = file;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
@JsonProperty("file")
|
||||||
|
public java.io.File getFile() {
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
public void setFile(java.io.File file) {
|
||||||
|
this.file = file;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
public FileSchemaTestClass files(List<java.io.File> files) {
|
||||||
|
this.files = files;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
@JsonProperty("files")
|
||||||
|
public List<java.io.File> getFiles() {
|
||||||
|
return files;
|
||||||
|
}
|
||||||
|
public void setFiles(List<java.io.File> files) {
|
||||||
|
this.files = files;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o;
|
||||||
|
return Objects.equals(file, fileSchemaTestClass.file) &&
|
||||||
|
Objects.equals(files, fileSchemaTestClass.files);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(file, files);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class FileSchemaTestClass {\n");
|
||||||
|
|
||||||
|
sb.append(" file: ").append(toIndentedString(file)).append("\n");
|
||||||
|
sb.append(" files: ").append(toIndentedString(files)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9,10 +9,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class FormatTest implements Serializable {
|
public class FormatTest implements Serializable {
|
||||||
|
@ -4,10 +4,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class HasOnlyReadOnly implements Serializable {
|
public class HasOnlyReadOnly implements Serializable {
|
||||||
|
@ -3,14 +3,17 @@ package org.openapitools.model;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import org.openapitools.model.StringBooleanMap;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class MapTest implements Serializable {
|
public class MapTest implements Serializable {
|
||||||
@ -45,11 +48,13 @@ public enum InnerEnum {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
throw new IllegalArgumentException("Unexpected value '" + v + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private @Valid Map<String, InnerEnum> mapOfEnumString = new HashMap<String, InnerEnum>();
|
private @Valid Map<String, InnerEnum> mapOfEnumString = new HashMap<String, InnerEnum>();
|
||||||
|
private @Valid Map<String, Boolean> directMap = new HashMap<String, Boolean>();
|
||||||
|
private @Valid StringBooleanMap indirectMap = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ -85,6 +90,40 @@ public enum InnerEnum {
|
|||||||
this.mapOfEnumString = mapOfEnumString;
|
this.mapOfEnumString = mapOfEnumString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
public MapTest directMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
@JsonProperty("direct_map")
|
||||||
|
public Map<String, Boolean> getDirectMap() {
|
||||||
|
return directMap;
|
||||||
|
}
|
||||||
|
public void setDirectMap(Map<String, Boolean> directMap) {
|
||||||
|
this.directMap = directMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
public MapTest indirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
@JsonProperty("indirect_map")
|
||||||
|
public StringBooleanMap getIndirectMap() {
|
||||||
|
return indirectMap;
|
||||||
|
}
|
||||||
|
public void setIndirectMap(StringBooleanMap indirectMap) {
|
||||||
|
this.indirectMap = indirectMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -96,12 +135,14 @@ public enum InnerEnum {
|
|||||||
}
|
}
|
||||||
MapTest mapTest = (MapTest) o;
|
MapTest mapTest = (MapTest) o;
|
||||||
return Objects.equals(mapMapOfString, mapTest.mapMapOfString) &&
|
return Objects.equals(mapMapOfString, mapTest.mapMapOfString) &&
|
||||||
Objects.equals(mapOfEnumString, mapTest.mapOfEnumString);
|
Objects.equals(mapOfEnumString, mapTest.mapOfEnumString) &&
|
||||||
|
Objects.equals(directMap, mapTest.directMap) &&
|
||||||
|
Objects.equals(indirectMap, mapTest.indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(mapMapOfString, mapOfEnumString);
|
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -111,6 +152,8 @@ public enum InnerEnum {
|
|||||||
|
|
||||||
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
|
||||||
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n");
|
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n");
|
||||||
|
sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n");
|
||||||
|
sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -10,10 +10,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable {
|
public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable {
|
||||||
|
@ -5,15 +5,16 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing model name starting with number
|
* Model for testing model name starting with number
|
||||||
**/
|
**/
|
||||||
import io.swagger.annotations.*;
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
@ApiModel(description = "Model for testing model name starting with number")
|
@ApiModel(description = "Model for testing model name starting with number")
|
||||||
|
|
||||||
public class Model200Response implements Serializable {
|
public class Model200Response implements Serializable {
|
||||||
|
|
||||||
private @Valid Integer name = null;
|
private @Valid Integer name = null;
|
||||||
|
@ -4,10 +4,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class ModelApiResponse implements Serializable {
|
public class ModelApiResponse implements Serializable {
|
||||||
|
@ -5,15 +5,16 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing reserved words
|
* Model for testing reserved words
|
||||||
**/
|
**/
|
||||||
import io.swagger.annotations.*;
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
@ApiModel(description = "Model for testing reserved words")
|
@ApiModel(description = "Model for testing reserved words")
|
||||||
|
|
||||||
public class ModelReturn implements Serializable {
|
public class ModelReturn implements Serializable {
|
||||||
|
|
||||||
private @Valid Integer _return = null;
|
private @Valid Integer _return = null;
|
||||||
|
@ -5,15 +5,16 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing model name same as property name
|
* Model for testing model name same as property name
|
||||||
**/
|
**/
|
||||||
import io.swagger.annotations.*;
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
@ApiModel(description = "Model for testing model name same as property name")
|
@ApiModel(description = "Model for testing model name same as property name")
|
||||||
|
|
||||||
public class Name implements Serializable {
|
public class Name implements Serializable {
|
||||||
|
|
||||||
private @Valid Integer name = null;
|
private @Valid Integer name = null;
|
||||||
|
@ -5,10 +5,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class NumberOnly implements Serializable {
|
public class NumberOnly implements Serializable {
|
||||||
|
@ -5,10 +5,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Order implements Serializable {
|
public class Order implements Serializable {
|
||||||
@ -46,7 +48,7 @@ public enum StatusEnum {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
throw new IllegalArgumentException("Unexpected value '" + v + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,7 +151,7 @@ public enum StatusEnum {
|
|||||||
|
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@JsonProperty("complete")
|
@JsonProperty("complete")
|
||||||
public Boolean isComplete() {
|
public Boolean getComplete() {
|
||||||
return complete;
|
return complete;
|
||||||
}
|
}
|
||||||
public void setComplete(Boolean complete) {
|
public void setComplete(Boolean complete) {
|
||||||
|
@ -5,10 +5,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class OuterComposite implements Serializable {
|
public class OuterComposite implements Serializable {
|
||||||
|
@ -4,7 +4,6 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
@ -38,7 +37,7 @@ public enum OuterEnum {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,10 +8,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Pet implements Serializable {
|
public class Pet implements Serializable {
|
||||||
@ -50,7 +52,7 @@ public enum StatusEnum {
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
throw new IllegalArgumentException("Unexpected value '" + v + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,10 +4,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class ReadOnlyFirst implements Serializable {
|
public class ReadOnlyFirst implements Serializable {
|
||||||
|
@ -4,10 +4,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class SpecialModelName implements Serializable {
|
public class SpecialModelName implements Serializable {
|
||||||
|
@ -0,0 +1,58 @@
|
|||||||
|
package org.openapitools.model;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class StringBooleanMap extends HashMap<String, Boolean> implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
StringBooleanMap stringBooleanMap = (StringBooleanMap) o;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class StringBooleanMap {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,10 +4,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Tag implements Serializable {
|
public class Tag implements Serializable {
|
||||||
|
@ -4,10 +4,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class User implements Serializable {
|
public class User implements Serializable {
|
||||||
|
@ -1016,8 +1016,8 @@ paths:
|
|||||||
- tag: fake
|
- tag: fake
|
||||||
/another-fake/dummy:
|
/another-fake/dummy:
|
||||||
patch:
|
patch:
|
||||||
description: To test special tags
|
description: To test special tags and operation ID starting with number
|
||||||
operationId: test_special_tags
|
operationId: 123_test_@#$%_special_tags
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -1037,6 +1037,66 @@ paths:
|
|||||||
- $another-fake?
|
- $another-fake?
|
||||||
x-tags:
|
x-tags:
|
||||||
- tag: $another-fake?
|
- tag: $another-fake?
|
||||||
|
/fake/body-with-file-schema:
|
||||||
|
put:
|
||||||
|
description: For this test, the body for this request much reference a schema named `File`.
|
||||||
|
operationId: testBodyWithFileSchema
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/FileSchemaTestClass'
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
content: {}
|
||||||
|
description: Success
|
||||||
|
tags:
|
||||||
|
- fake
|
||||||
|
x-tags:
|
||||||
|
- tag: fake
|
||||||
|
/fake/{petId}/uploadImageWithRequiredFile:
|
||||||
|
post:
|
||||||
|
operationId: uploadFileWithRequiredFile
|
||||||
|
parameters:
|
||||||
|
- description: ID of pet to update
|
||||||
|
in: path
|
||||||
|
name: petId
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
multipart/form-data:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
additionalMetadata:
|
||||||
|
description: Additional data to pass to server
|
||||||
|
type: string
|
||||||
|
requiredFile:
|
||||||
|
description: file to upload
|
||||||
|
format: binary
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- requiredFile
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ApiResponse'
|
||||||
|
description: successful operation
|
||||||
|
security:
|
||||||
|
- petstore_auth:
|
||||||
|
- write:pets
|
||||||
|
- read:pets
|
||||||
|
summary: uploads an image (required)
|
||||||
|
tags:
|
||||||
|
- pet
|
||||||
|
x-tags:
|
||||||
|
- tag: pet
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
Category:
|
Category:
|
||||||
@ -1342,14 +1402,18 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
type: object
|
type: object
|
||||||
OuterComposite:
|
OuterComposite:
|
||||||
example: {}
|
example:
|
||||||
|
my_string: my_string
|
||||||
|
my_number: 0.80082819046101150206595775671303272247314453125
|
||||||
|
my_boolean: true
|
||||||
properties:
|
properties:
|
||||||
my_number:
|
my_number:
|
||||||
$ref: '#/components/schemas/OuterNumber'
|
type: number
|
||||||
my_string:
|
my_string:
|
||||||
$ref: '#/components/schemas/OuterString'
|
type: string
|
||||||
my_boolean:
|
my_boolean:
|
||||||
$ref: '#/components/schemas/OuterBoolean'
|
type: boolean
|
||||||
|
x-codegen-body-parameter-name: boolean_post_body
|
||||||
type: object
|
type: object
|
||||||
format_test:
|
format_test:
|
||||||
properties:
|
properties:
|
||||||
@ -1435,6 +1499,21 @@ components:
|
|||||||
OuterBoolean:
|
OuterBoolean:
|
||||||
type: boolean
|
type: boolean
|
||||||
x-codegen-body-parameter-name: boolean_post_body
|
x-codegen-body-parameter-name: boolean_post_body
|
||||||
|
FileSchemaTestClass:
|
||||||
|
example:
|
||||||
|
file:
|
||||||
|
sourceURI: sourceURI
|
||||||
|
files:
|
||||||
|
- sourceURI: sourceURI
|
||||||
|
- sourceURI: sourceURI
|
||||||
|
properties:
|
||||||
|
file:
|
||||||
|
$ref: '#/components/schemas/File'
|
||||||
|
files:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/File'
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
Animal:
|
Animal:
|
||||||
discriminator:
|
discriminator:
|
||||||
propertyName: className
|
propertyName: className
|
||||||
@ -1447,6 +1526,10 @@ components:
|
|||||||
required:
|
required:
|
||||||
- className
|
- className
|
||||||
type: object
|
type: object
|
||||||
|
StringBooleanMap:
|
||||||
|
additionalProperties:
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
Cat:
|
Cat:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/Animal'
|
- $ref: '#/components/schemas/Animal'
|
||||||
@ -1469,6 +1552,12 @@ components:
|
|||||||
- lower
|
- lower
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
direct_map:
|
||||||
|
additionalProperties:
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
indirect_map:
|
||||||
|
$ref: '#/components/schemas/StringBooleanMap'
|
||||||
type: object
|
type: object
|
||||||
Tag:
|
Tag:
|
||||||
example:
|
example:
|
||||||
@ -1487,6 +1576,15 @@ components:
|
|||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/Animal'
|
$ref: '#/components/schemas/Animal'
|
||||||
type: array
|
type: array
|
||||||
|
File:
|
||||||
|
description: Must be named `File` for test.
|
||||||
|
example:
|
||||||
|
sourceURI: sourceURI
|
||||||
|
properties:
|
||||||
|
sourceURI:
|
||||||
|
description: Test capitalization
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
Pet:
|
Pet:
|
||||||
example:
|
example:
|
||||||
photoUrls:
|
photoUrls:
|
||||||
|
@ -13,13 +13,32 @@
|
|||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>2.2</version>
|
<version>2.2</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>1.9.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>add-source</id>
|
||||||
|
<phase>generate-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>add-source</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<sources>
|
||||||
|
<source>src/gen/java</source>
|
||||||
|
</sources>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.ws.rs</groupId>
|
<groupId>javax.ws.rs</groupId>
|
||||||
<artifactId>javax.ws.rs-api</artifactId>
|
<artifactId>javax.ws.rs-api</artifactId>
|
||||||
<version>2.0</version>
|
<version>2.1</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -28,6 +47,18 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<version>1.5.3</version>
|
<version>1.5.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-annotations</artifactId>
|
||||||
|
<version>${jackson-version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>joda-time</groupId>
|
||||||
|
<artifactId>joda-time</artifactId>
|
||||||
|
<version>${jodatime-version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
@ -44,5 +75,7 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
<properties>
|
<properties>
|
||||||
<junit-version>4.8.1</junit-version>
|
<junit-version>4.8.1</junit-version>
|
||||||
|
<jackson-version>2.8.9</jackson-version>
|
||||||
|
<jodatime-version>2.9.9</jodatime-version>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
@ -7,6 +7,7 @@ import javax.ws.rs.core.Response;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
@ -16,6 +16,7 @@ import javax.ws.rs.core.Response;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@ -89,8 +90,7 @@ public interface FakeApi {
|
|||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
||||||
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
||||||
void testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string, @FormParam(value = "binary") InputStream binaryInputStream,
|
void testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string, @FormParam(value = "binary") InputStream binaryInputStream,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") Date dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback);
|
||||||
@FormParam(value = "binary") Attachment binaryDetail,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") Date dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback);
|
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Consumes({ "application/x-www-form-urlencoded" })
|
@Consumes({ "application/x-www-form-urlencoded" })
|
||||||
@ -128,6 +128,5 @@ public interface FakeApi {
|
|||||||
}, tags={ "pet" })
|
}, tags={ "pet" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||||
ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,
|
ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,@FormParam(value = "additionalMetadata") String additionalMetadata);
|
||||||
@FormParam(value = "requiredFile") Attachment requiredFileDetail,@FormParam(value = "additionalMetadata") String additionalMetadata);
|
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import javax.ws.rs.core.Response;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
@ -9,6 +9,7 @@ import javax.ws.rs.core.Response;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
@ -121,6 +122,5 @@ public interface PetApi {
|
|||||||
}, tags={ "pet" })
|
}, tags={ "pet" })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||||
ModelApiResponse uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream fileInputStream,
|
ModelApiResponse uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream fileInputStream);
|
||||||
@FormParam(value = "file") Attachment fileDetail);
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import javax.ws.rs.core.Response;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
@ -8,6 +8,7 @@ import javax.ws.rs.core.Response;
|
|||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
@ -7,10 +7,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class AdditionalPropertiesClass implements Serializable {
|
public class AdditionalPropertiesClass implements Serializable {
|
||||||
|
@ -6,10 +6,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Animal implements Serializable {
|
public class Animal implements Serializable {
|
||||||
|
@ -7,10 +7,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class AnimalFarm extends ArrayList<Animal> implements Serializable {
|
public class AnimalFarm extends ArrayList<Animal> implements Serializable {
|
||||||
|
@ -7,10 +7,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class ArrayOfArrayOfNumberOnly implements Serializable {
|
public class ArrayOfArrayOfNumberOnly implements Serializable {
|
||||||
|
@ -7,10 +7,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class ArrayOfNumberOnly implements Serializable {
|
public class ArrayOfNumberOnly implements Serializable {
|
||||||
|
@ -7,10 +7,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class ArrayTest implements Serializable {
|
public class ArrayTest implements Serializable {
|
||||||
|
@ -4,10 +4,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Capitalization implements Serializable {
|
public class Capitalization implements Serializable {
|
||||||
|
@ -5,10 +5,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Cat extends Animal implements Serializable {
|
public class Cat extends Animal implements Serializable {
|
||||||
|
@ -4,10 +4,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Category implements Serializable {
|
public class Category implements Serializable {
|
||||||
|
@ -5,15 +5,16 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for testing model with \"_class\" property
|
* Model for testing model with \"_class\" property
|
||||||
**/
|
**/
|
||||||
import io.swagger.annotations.*;
|
|
||||||
import java.util.Objects;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
@ApiModel(description = "Model for testing model with \"_class\" property")
|
@ApiModel(description = "Model for testing model with \"_class\" property")
|
||||||
|
|
||||||
public class ClassModel implements Serializable {
|
public class ClassModel implements Serializable {
|
||||||
|
|
||||||
private @Valid String propertyClass = null;
|
private @Valid String propertyClass = null;
|
||||||
|
@ -4,10 +4,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Client implements Serializable {
|
public class Client implements Serializable {
|
||||||
|
@ -5,10 +5,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class Dog extends Animal implements Serializable {
|
public class Dog extends Animal implements Serializable {
|
||||||
|
@ -6,10 +6,12 @@ import java.io.Serializable;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class EnumArrays implements Serializable {
|
public class EnumArrays implements Serializable {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user