forked from loafle/openapi-generator-original
Merge branch 'feature/inline-models'
This commit is contained in:
@@ -127,6 +127,10 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
String basePath = hostBuilder.toString();
|
||||
|
||||
|
||||
// resolve inline models
|
||||
InlineModelResolver inlineModelResolver = new InlineModelResolver();
|
||||
inlineModelResolver.flatten(swagger);
|
||||
|
||||
List<Object> allOperations = new ArrayList<Object>();
|
||||
List<Object> allModels = new ArrayList<Object>();
|
||||
|
||||
|
||||
@@ -0,0 +1,326 @@
|
||||
package io.swagger.codegen;
|
||||
|
||||
import com.sun.org.apache.xpath.internal.operations.Mod;
|
||||
import io.swagger.models.*;
|
||||
import io.swagger.models.parameters.BodyParameter;
|
||||
import io.swagger.models.parameters.Parameter;
|
||||
import io.swagger.models.parameters.RefParameter;
|
||||
import io.swagger.models.properties.*;
|
||||
import io.swagger.util.Json;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class InlineModelResolver {
|
||||
private Swagger swagger = null;
|
||||
private boolean skipMatches = false;
|
||||
|
||||
Map<String, Model> addedModels = new HashMap<String, Model>();
|
||||
Map<String, String> generatedSignature = new HashMap<String, String>();
|
||||
|
||||
public void flatten(Swagger swagger) {
|
||||
this.swagger = swagger;
|
||||
|
||||
if (swagger.getDefinitions() == null) {
|
||||
swagger.setDefinitions(new HashMap<String, Model>());
|
||||
}
|
||||
|
||||
// operations
|
||||
Map<String, Path> paths = swagger.getPaths();
|
||||
Map<String, Model> models = swagger.getDefinitions();
|
||||
|
||||
if (paths != null) {
|
||||
for (String pathname : paths.keySet()) {
|
||||
Path path = paths.get(pathname);
|
||||
|
||||
for (Operation operation : path.getOperations()) {
|
||||
List<Parameter> parameters = operation.getParameters();
|
||||
|
||||
if (parameters != null) {
|
||||
for (Parameter parameter : parameters) {
|
||||
if (parameter instanceof BodyParameter) {
|
||||
BodyParameter bp = (BodyParameter) parameter;
|
||||
if (bp.getSchema() != null) {
|
||||
Model model = bp.getSchema();
|
||||
if(model instanceof ModelImpl) {
|
||||
String modelName = uniqueName(bp.getName());
|
||||
ModelImpl obj = (ModelImpl) model;
|
||||
flattenProperties(obj.getProperties(), pathname);
|
||||
|
||||
bp.setSchema(new RefModel(modelName));
|
||||
addGenerated(modelName, model);
|
||||
swagger.addDefinition(modelName, model);
|
||||
}
|
||||
else if (model instanceof ArrayModel) {
|
||||
ArrayModel am = (ArrayModel) model;
|
||||
Property inner = am.getItems();
|
||||
|
||||
if(inner instanceof ObjectProperty) {
|
||||
ObjectProperty op = (ObjectProperty) inner;
|
||||
flattenProperties(op.getProperties(), pathname);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Map<String, Response> responses = operation.getResponses();
|
||||
if (responses != null) {
|
||||
for (String key : responses.keySet()) {
|
||||
Response response = responses.get(key);
|
||||
if (response.getSchema() != null) {
|
||||
Property property = response.getSchema();
|
||||
if (property instanceof ObjectProperty) {
|
||||
String modelName = uniqueName("inline_response_" + key);
|
||||
ObjectProperty op = (ObjectProperty) property;
|
||||
Model model = modelFromProperty(op, modelName);
|
||||
String existing = matchGenerated(model);
|
||||
if (existing != null) {
|
||||
response.setSchema(new RefProperty(existing));
|
||||
} else {
|
||||
response.setSchema(new RefProperty(modelName));
|
||||
addGenerated(modelName, model);
|
||||
swagger.addDefinition(modelName, model);
|
||||
}
|
||||
} else if (property instanceof ArrayProperty) {
|
||||
ArrayProperty ap = (ArrayProperty) property;
|
||||
if(ap.getItems() instanceof ObjectProperty) {
|
||||
ObjectProperty op = (ObjectProperty) ap.getItems();
|
||||
Map<String, Property> props = op.getProperties();
|
||||
flattenProperties(props, "path");
|
||||
}
|
||||
} else if (property instanceof MapProperty) {
|
||||
MapProperty op = (MapProperty) property;
|
||||
|
||||
Property innerProperty = op.getAdditionalProperties();
|
||||
if(innerProperty instanceof ObjectProperty) {
|
||||
ModelImpl innerModel = new ModelImpl();
|
||||
// TODO: model props
|
||||
innerModel.setTitle(property.getTitle());
|
||||
property.getVendorExtensions();
|
||||
property.getRequired();
|
||||
property.getReadOnly();
|
||||
property.getAccess();
|
||||
innerModel.setDescription(property.getDescription());
|
||||
innerModel.setExample(property.getExample());
|
||||
innerModel.setName(property.getName());
|
||||
innerModel.setXml(property.getXml());
|
||||
|
||||
innerModel.setAdditionalProperties(innerProperty);
|
||||
|
||||
String modelName = uniqueName("inline_response_" + key);
|
||||
String existing = matchGenerated(innerModel);
|
||||
if (existing != null) {
|
||||
response.setSchema(new RefProperty(existing));
|
||||
} else {
|
||||
response.setSchema(new RefProperty(modelName));
|
||||
addGenerated(modelName, innerModel);
|
||||
swagger.addDefinition(modelName, innerModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// definitions
|
||||
if (models != null) {
|
||||
List<String> modelNames = new ArrayList<String>(models.keySet());
|
||||
for (String modelName : modelNames) {
|
||||
Model model = models.get(modelName);
|
||||
if (model instanceof ModelImpl) {
|
||||
ModelImpl m = (ModelImpl) model;
|
||||
|
||||
Map<String, Property> properties = m.getProperties();
|
||||
flattenProperties(properties, modelName);
|
||||
|
||||
} else if (model instanceof ArrayModel) {
|
||||
ArrayModel m = (ArrayModel) model;
|
||||
Property inner = m.getItems();
|
||||
if (inner instanceof ObjectProperty) {
|
||||
String innerModelName = uniqueName(modelName + "_inner");
|
||||
Model innerModel = modelFromProperty((ObjectProperty) inner, modelName);
|
||||
|
||||
String existing = matchGenerated(innerModel);
|
||||
if (existing == null) {
|
||||
swagger.addDefinition(innerModelName, innerModel);
|
||||
addGenerated(innerModelName, innerModel);
|
||||
m.setItems(new RefProperty(innerModelName));
|
||||
} else {
|
||||
m.setItems(new RefProperty(existing));
|
||||
}
|
||||
}
|
||||
} else if (model instanceof ComposedModel) {
|
||||
ComposedModel m = (ComposedModel) model;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String matchGenerated(Model model) {
|
||||
if (this.skipMatches) {
|
||||
return null;
|
||||
}
|
||||
String json = Json.pretty(model);
|
||||
if (generatedSignature.containsKey(json)) {
|
||||
return generatedSignature.get(json);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void addGenerated(String name, Model model) {
|
||||
generatedSignature.put(Json.pretty(model), name);
|
||||
}
|
||||
|
||||
public String uniqueName(String key) {
|
||||
int count = 0;
|
||||
boolean done = false;
|
||||
key = key.replaceAll("[^a-z_\\.A-Z0-9 ]", "");
|
||||
while (!done) {
|
||||
String name = key;
|
||||
if (count > 0) {
|
||||
name = key + "_" + count;
|
||||
}
|
||||
if (swagger.getDefinitions() == null) {
|
||||
return name;
|
||||
} else if (!swagger.getDefinitions().containsKey(name)) {
|
||||
return name;
|
||||
}
|
||||
count += 1;
|
||||
}
|
||||
return key;
|
||||
}
|
||||
|
||||
public void flattenProperties(Map<String, Property> properties, String path) {
|
||||
if (properties == null) {
|
||||
return;
|
||||
}
|
||||
Map<String, Property> propsToUpdate = new HashMap<String, Property>();
|
||||
Map<String, Model> modelsToAdd = new HashMap<String, Model>();
|
||||
for (String key : properties.keySet()) {
|
||||
Property property = properties.get(key);
|
||||
if (property instanceof ObjectProperty) {
|
||||
String modelName = uniqueName(path + "_" + key);
|
||||
|
||||
ObjectProperty op = (ObjectProperty) property;
|
||||
Model model = modelFromProperty(op, modelName);
|
||||
|
||||
String existing = matchGenerated(model);
|
||||
|
||||
if (existing != null) {
|
||||
propsToUpdate.put(key, new RefProperty(existing));
|
||||
} else {
|
||||
propsToUpdate.put(key, new RefProperty(modelName));
|
||||
modelsToAdd.put(modelName, model);
|
||||
addGenerated(modelName, model);
|
||||
swagger.addDefinition(modelName, model);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (propsToUpdate.size() > 0) {
|
||||
for (String key : propsToUpdate.keySet()) {
|
||||
properties.put(key, propsToUpdate.get(key));
|
||||
}
|
||||
}
|
||||
for (String key : modelsToAdd.keySet()) {
|
||||
swagger.addDefinition(key, modelsToAdd.get(key));
|
||||
this.addedModels.put(key, modelsToAdd.get(key));
|
||||
}
|
||||
}
|
||||
|
||||
public Model modelFromProperty(ArrayProperty object, String path) {
|
||||
String access = object.getAccess();
|
||||
String description = object.getDescription();
|
||||
String example = object.getExample();
|
||||
String name = object.getName();
|
||||
Integer position = object.getPosition();
|
||||
Boolean readOnly = object.getReadOnly();
|
||||
Boolean required = object.getRequired();
|
||||
String title = object.getTitle();
|
||||
Map<String, Object> extensions = object.getVendorExtensions();
|
||||
Xml xml = object.getXml();
|
||||
|
||||
// object.getItems()
|
||||
// Map<String, Property> properties = object.getProperties();
|
||||
|
||||
Property inner = object.getItems();
|
||||
if (inner instanceof ObjectProperty) {
|
||||
ArrayModel model = new ArrayModel();
|
||||
model.setDescription(description);
|
||||
model.setExample(example);
|
||||
// model.setName(name);
|
||||
// model.setXml(xml);
|
||||
|
||||
model.setItems(object.getItems());
|
||||
return model;
|
||||
}
|
||||
|
||||
// if(properties != null) {
|
||||
// flattenProperties(properties, path);
|
||||
// model.setProperties(properties);
|
||||
// }
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public Model modelFromProperty(ObjectProperty object, String path) {
|
||||
String access = object.getAccess();
|
||||
String description = object.getDescription();
|
||||
String example = object.getExample();
|
||||
String name = object.getName();
|
||||
Integer position = object.getPosition();
|
||||
Boolean readOnly = object.getReadOnly();
|
||||
Boolean required = object.getRequired();
|
||||
String title = object.getTitle();
|
||||
Map<String, Object> extensions = object.getVendorExtensions();
|
||||
Xml xml = object.getXml();
|
||||
|
||||
Map<String, Property> properties = object.getProperties();
|
||||
|
||||
ModelImpl model = new ModelImpl();
|
||||
model.setDescription(description);
|
||||
model.setExample(example);
|
||||
model.setName(name);
|
||||
model.setXml(xml);
|
||||
|
||||
if (properties != null) {
|
||||
flattenProperties(properties, path);
|
||||
model.setProperties(properties);
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
public Model modelFromProperty(MapProperty object, String path) {
|
||||
String access = object.getAccess();
|
||||
String description = object.getDescription();
|
||||
String example = object.getExample();
|
||||
String name = object.getName();
|
||||
Integer position = object.getPosition();
|
||||
Boolean readOnly = object.getReadOnly();
|
||||
Boolean required = object.getRequired();
|
||||
String title = object.getTitle();
|
||||
Map<String, Object> extensions = object.getVendorExtensions();
|
||||
Xml xml = object.getXml();
|
||||
|
||||
ArrayModel model = new ArrayModel();
|
||||
model.setDescription(description);
|
||||
model.setExample(example);
|
||||
model.setItems(object.getAdditionalProperties());
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
public boolean isSkipMatches() {
|
||||
return skipMatches;
|
||||
}
|
||||
|
||||
public void setSkipMatches(boolean skipMatches) {
|
||||
this.skipMatches = skipMatches;
|
||||
}
|
||||
}
|
||||
@@ -84,12 +84,15 @@ public class XmlExampleGenerator {
|
||||
name = xml.getName();
|
||||
}
|
||||
}
|
||||
for (String pName : model.getProperties().keySet()) {
|
||||
Property p = model.getProperties().get(pName);
|
||||
if (p != null && p.getXml() != null && p.getXml().getAttribute() != null && p.getXml().getAttribute()) {
|
||||
attributes.put(pName, p);
|
||||
} else {
|
||||
elements.put(pName, p);
|
||||
// TODO: map objects will not enter this block
|
||||
if(model.getProperties() != null) {
|
||||
for (String pName : model.getProperties().keySet()) {
|
||||
Property p = model.getProperties().get(pName);
|
||||
if (p != null && p.getXml() != null && p.getXml().getAttribute() != null && p.getXml().getAttribute()) {
|
||||
attributes.put(pName, p);
|
||||
} else {
|
||||
elements.put(pName, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
sb.append(indent(indent)).append(TAG_START);
|
||||
|
||||
@@ -24,9 +24,6 @@ repositories {
|
||||
dependencies {
|
||||
groovy "org.codehaus.groovy:groovy-all:2.0.5"
|
||||
compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.6'
|
||||
|
||||
|
||||
}
|
||||
|
||||
task wrapper(type: Wrapper) { gradleVersion = '1.6' }
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<swagger-annotations-version>1.5.0</swagger-annotations-version>
|
||||
<swagger-annotations-version>1.5.4</swagger-annotations-version>
|
||||
<jersey-version>1.18</jersey-version>
|
||||
<jackson-version>2.4.2</jackson-version>
|
||||
<jodatime-version>2.3</jodatime-version>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
</dependencies>
|
||||
<properties>
|
||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||
<swagger-core-version>1.5.3</swagger-core-version>
|
||||
<swagger-core-version>1.5.4</swagger-core-version>
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<logback-version>1.0.1</logback-version>
|
||||
<junit-version>4.8.2</junit-version>
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
</repository>
|
||||
</repositories>
|
||||
<properties>
|
||||
<swagger-core-version>1.5.3</swagger-core-version>
|
||||
<swagger-core-version>1.5.4</swagger-core-version>
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<jersey-version>1.18.1</jersey-version>
|
||||
<slf4j-version>1.6.3</slf4j-version>
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
<akka-version>2.3.9</akka-version>
|
||||
<joda-version>1.2</joda-version>
|
||||
<joda-time-version>2.2</joda-time-version>
|
||||
<swagger-core-version>1.5.3</swagger-core-version>
|
||||
<swagger-core-version>1.5.4</swagger-core-version>
|
||||
<maven-plugin.version>1.0.0</maven-plugin.version>
|
||||
|
||||
<junit-version>4.8.1</junit-version>
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
</repository>
|
||||
</repositories>
|
||||
<properties>
|
||||
<swagger-annotations-version>1.5.0</swagger-annotations-version>
|
||||
<swagger-annotations-version>1.5.4</swagger-annotations-version>
|
||||
<gson-version>2.3.1</gson-version>
|
||||
<junit-version>4.8.1</junit-version>
|
||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<swagger-codegen-version>2.1.2-M1</swagger-codegen-version>
|
||||
<swagger-codegen-version>2.1.3</swagger-codegen-version>
|
||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||
<junit-version>4.8.1</junit-version>
|
||||
</properties>
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
<joda-version>1.2</joda-version>
|
||||
<joda-time-version>2.2</joda-time-version>
|
||||
<jersey-version>1.19</jersey-version>
|
||||
<swagger-core-version>1.5.3</swagger-core-version>
|
||||
<swagger-core-version>1.5.4</swagger-core-version>
|
||||
<jersey-async-version>1.0.5</jersey-async-version>
|
||||
<maven-plugin.version>1.0.0</maven-plugin.version>
|
||||
<jackson-version>2.4.2</jackson-version>
|
||||
|
||||
@@ -33,57 +33,16 @@ class {{classname}} (implicit val swagger: Swagger) extends ScalatraServlet
|
||||
|
||||
val {{nickname}}Operation = (apiOperation[{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}]("{{nickname}}")
|
||||
summary "{{{summary}}}"
|
||||
parameters(
|
||||
{{#allParams}}{{#isQueryParam}}queryParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}
|
||||
{{/isQueryParam}}
|
||||
{{#isPathParam}}pathParam[{{dataType}}]("{{paramName}}").description(""){{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}
|
||||
{{/isPathParam}}
|
||||
{{#isHeaderParam}}headerParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}
|
||||
{{/isHeaderParam}}
|
||||
{{#isBodyParam}}bodyParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}
|
||||
{{/isBodyParam}}
|
||||
{{#isFormParam}}formParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}
|
||||
{{/isFormParam}}
|
||||
{{#hasMore}},{{/hasMore}}
|
||||
{{/allParams}})
|
||||
parameters({{#allParams}}{{>queryParam}}{{>pathParam}}{{>bodyParam}}{{>formParam}}{{#hasMore}},
|
||||
{{/hasMore}}{{/allParams}})
|
||||
)
|
||||
|
||||
{{httpMethod}}("{{path}}",operation({{nickname}}Operation)) {
|
||||
{{#allParams}}
|
||||
{{#isFile}}
|
||||
val {{paramName}} = fileParams("{{paramName}}")
|
||||
{{/isFile}}
|
||||
{{^isFile}}
|
||||
{{#isPathParam}}
|
||||
val {{paramName}} = params.getOrElse("{{paramName}}", halt(400))
|
||||
{{/isPathParam}}
|
||||
|
||||
{{#isQueryParam}}
|
||||
{{#collectionFormat}}val {{paramName}}String = params.getAs[String]("{{paramName}}")
|
||||
val {{paramName}} = if("{{collectionFormat}}".equals("default")) {
|
||||
{{paramName}}String match {
|
||||
case Some(str) => str.split(",")
|
||||
case None => List()
|
||||
}
|
||||
}
|
||||
else
|
||||
List()
|
||||
{{/collectionFormat}}
|
||||
{{^collectionFormat}}val {{paramName}} = params.getAs[{{dataType}}]("{{paramName}}"){{/collectionFormat}}
|
||||
|
||||
{{/isQueryParam}}
|
||||
|
||||
{{#isHeaderParam}}
|
||||
val {{paramName}} = request.getHeader("{{paramName}}")
|
||||
{{/isHeaderParam}}
|
||||
|
||||
{{#isFormParam}}
|
||||
val {{paramName}} = params.getAs[{{dataType}}]("{{paramName}}")
|
||||
{{/isFormParam}}
|
||||
|
||||
{{#isBodyParam}}
|
||||
val {{paramName}} = parsedBody.extract[{{dataType}}]
|
||||
{{/isBodyParam}}
|
||||
{{#isFile}}val {{paramName}} = fileParams("{{paramName}}"){{/isFile}}
|
||||
{{^isFile}}{{#isPathParam}}
|
||||
val {{paramName}} = params.getOrElse("{{paramName}}", halt(400)){{/isPathParam}}
|
||||
{{>queryParamOperation}}{{>headerParamOperation}}{{>formParamMustache}}{{>bodyParam}}
|
||||
{{/isFile}}
|
||||
println("{{paramName}}: " + {{paramName}})
|
||||
{{/allParams}}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{{#isBodyParam}}bodyParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isBodyParam}}
|
||||
@@ -0,0 +1,3 @@
|
||||
{{#isBodyParam}}
|
||||
val {{paramName}} = parsedBody.extract[{{dataType}}]
|
||||
{{/isBodyParam}}
|
||||
@@ -0,0 +1 @@
|
||||
{{#isFormParam}}formParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isFormParam}}
|
||||
@@ -0,0 +1,3 @@
|
||||
{{#isFormParam}}
|
||||
val {{paramName}} = params.getAs[{{dataType}}]("{{paramName}}")
|
||||
{{/isFormParam}}
|
||||
@@ -0,0 +1 @@
|
||||
{{#isHeaderParam}}headerParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isHeaderParam}}
|
||||
@@ -0,0 +1,3 @@
|
||||
{{#isHeaderParam}}
|
||||
val {{paramName}} = request.getHeader("{{paramName}}")
|
||||
{{/isHeaderParam}}
|
||||
@@ -0,0 +1 @@
|
||||
{{#isPathParam}}pathParam[{{dataType}}]("{{paramName}}").description(""){{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isPathParam}}
|
||||
@@ -0,0 +1 @@
|
||||
{{#isQueryParam}}queryParam[{{dataType}}]("{{paramName}}").description(""){{^required}}.optional{{/required}}{{#defaultValue}}.defaultValue({{{defaultValue}}}){{/defaultValue}}{{/isQueryParam}}
|
||||
@@ -0,0 +1,13 @@
|
||||
{{#isQueryParam}}
|
||||
{{#collectionFormat}}val {{paramName}}String = params.getAs[String]("{{paramName}}")
|
||||
val {{paramName}} = if("{{collectionFormat}}".equals("default")) {
|
||||
{{paramName}}String match {
|
||||
case Some(str) => str.split(",")
|
||||
case None => List()
|
||||
}
|
||||
}
|
||||
else
|
||||
List()
|
||||
{{/collectionFormat}}
|
||||
{{^collectionFormat}}val {{paramName}} = params.getAs[{{dataType}}]("{{paramName}}"){{/collectionFormat}}
|
||||
{{/isQueryParam}}
|
||||
@@ -0,0 +1,301 @@
|
||||
package io.swagger.codegen;
|
||||
|
||||
|
||||
import io.swagger.models.*;
|
||||
import io.swagger.models.parameters.BodyParameter;
|
||||
import io.swagger.models.parameters.Parameter;
|
||||
import io.swagger.models.properties.*;
|
||||
import io.swagger.util.Json;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static org.testng.AssertJUnit.*;
|
||||
|
||||
public class InlineModelResolverTest {
|
||||
@Test
|
||||
public void resolveInlineModelTest() throws Exception {
|
||||
Swagger swagger = new Swagger();
|
||||
|
||||
swagger.addDefinition("User", new ModelImpl()
|
||||
.name("user")
|
||||
.description("a common user")
|
||||
.property("name", new StringProperty())
|
||||
.property("address", new ObjectProperty()
|
||||
.title("title")
|
||||
._default("default")
|
||||
.access("access")
|
||||
.readOnly(false)
|
||||
.required(true)
|
||||
.description("description")
|
||||
.name("name")
|
||||
.property("street", new StringProperty())
|
||||
.property("city", new StringProperty())));
|
||||
|
||||
new InlineModelResolver().flatten(swagger);
|
||||
|
||||
ModelImpl user = (ModelImpl)swagger.getDefinitions().get("User");
|
||||
|
||||
assertNotNull(user);
|
||||
assertTrue(user.getProperties().get("address") instanceof RefProperty);
|
||||
|
||||
ModelImpl address = (ModelImpl)swagger.getDefinitions().get("User_address");
|
||||
assertNotNull(address);
|
||||
assertNotNull(address.getProperties().get("city"));
|
||||
assertNotNull(address.getProperties().get("street"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInlineResponseModel() throws Exception {
|
||||
Swagger swagger = new Swagger();
|
||||
|
||||
swagger.path("/foo/bar", new Path()
|
||||
.get(new Operation()
|
||||
.response(200, new Response()
|
||||
.description("it works!")
|
||||
.schema(new ObjectProperty()
|
||||
.property("name", new StringProperty())))))
|
||||
.path("/foo/baz", new Path()
|
||||
.get(new Operation()
|
||||
.response(200, new Response()
|
||||
.vendorExtension("x-foo", "bar")
|
||||
.description("it works!")
|
||||
.schema(new ObjectProperty()
|
||||
.property("name", new StringProperty())))));
|
||||
new InlineModelResolver().flatten(swagger);
|
||||
|
||||
Map<String, Response> responses = swagger.getPaths().get("/foo/bar").getGet().getResponses();
|
||||
|
||||
Response response = responses.get("200");
|
||||
assertNotNull(response);
|
||||
assertTrue(response.getSchema() instanceof RefProperty);
|
||||
|
||||
ModelImpl model = (ModelImpl)swagger.getDefinitions().get("inline_response_200");
|
||||
assertTrue(model.getProperties().size() == 1);
|
||||
assertNotNull(model.getProperties().get("name"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resolveInlineArrayModel() throws Exception {
|
||||
Swagger swagger = new Swagger();
|
||||
|
||||
swagger.addDefinition("User", new ArrayModel()
|
||||
.items(new ObjectProperty()
|
||||
.title("title")
|
||||
._default("default")
|
||||
.access("access")
|
||||
.readOnly(false)
|
||||
.required(true)
|
||||
.description("description")
|
||||
.name("name")
|
||||
.property("street", new StringProperty())
|
||||
.property("city", new StringProperty())));
|
||||
|
||||
new InlineModelResolver().flatten(swagger);
|
||||
|
||||
Model model = swagger.getDefinitions().get("User");
|
||||
assertTrue(model instanceof ArrayModel);
|
||||
|
||||
Model user = swagger.getDefinitions().get("User_inner");
|
||||
assertNotNull(user);
|
||||
assertEquals("description", user.getDescription());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resolveInlineBodyParameter() throws Exception {
|
||||
Swagger swagger = new Swagger();
|
||||
|
||||
swagger.path("/hello", new Path()
|
||||
.get(new Operation()
|
||||
.parameter(new BodyParameter()
|
||||
.name("body")
|
||||
.schema(new ModelImpl()
|
||||
.property("address", new ObjectProperty()
|
||||
.property("street", new StringProperty()))
|
||||
.property("name", new StringProperty())))));
|
||||
|
||||
new InlineModelResolver().flatten(swagger);
|
||||
|
||||
Operation operation = swagger.getPaths().get("/hello").getGet();
|
||||
BodyParameter bp = (BodyParameter)operation.getParameters().get(0);
|
||||
assertTrue(bp.getSchema() instanceof RefModel);
|
||||
|
||||
Model body = swagger.getDefinitions().get("body");
|
||||
assertTrue(body instanceof ModelImpl);
|
||||
|
||||
ModelImpl impl = (ModelImpl) body;
|
||||
assertNotNull(impl.getProperties().get("address"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resolveInlineArrayBodyParameter() throws Exception {
|
||||
Swagger swagger = new Swagger();
|
||||
|
||||
swagger.path("/hello", new Path()
|
||||
.get(new Operation()
|
||||
.parameter(new BodyParameter()
|
||||
.name("body")
|
||||
.schema(new ArrayModel()
|
||||
.items(new ObjectProperty()
|
||||
.property("address", new ObjectProperty()
|
||||
.property("street", new StringProperty())))))));
|
||||
|
||||
new InlineModelResolver().flatten(swagger);
|
||||
|
||||
Parameter param = swagger.getPaths().get("/hello").getGet().getParameters().get(0);
|
||||
assertTrue(param instanceof BodyParameter);
|
||||
|
||||
BodyParameter bp = (BodyParameter) param;
|
||||
Model schema = bp.getSchema();
|
||||
|
||||
assertTrue(schema instanceof ArrayModel);
|
||||
|
||||
ArrayModel am = (ArrayModel) schema;
|
||||
Property inner = am.getItems();
|
||||
|
||||
ObjectProperty op = (ObjectProperty) inner;
|
||||
Property name = op.getProperties().get("address");
|
||||
assertTrue(name instanceof RefProperty);
|
||||
|
||||
Model model = swagger.getDefinitions().get("hello_address");
|
||||
assertNotNull(model);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resolveInlineArrayResponse() throws Exception {
|
||||
Swagger swagger = new Swagger();
|
||||
|
||||
swagger.path("/foo/baz", new Path()
|
||||
.get(new Operation()
|
||||
.response(200, new Response()
|
||||
.vendorExtension("x-foo", "bar")
|
||||
.description("it works!")
|
||||
.schema(new ArrayProperty()
|
||||
.items(
|
||||
new ObjectProperty()
|
||||
.property("name", new StringProperty()))))));
|
||||
|
||||
new InlineModelResolver().flatten(swagger);
|
||||
|
||||
Response response = swagger.getPaths().get("/foo/baz").getGet().getResponses().get("200");
|
||||
assertNotNull(response);
|
||||
|
||||
assertNotNull(response.getSchema());
|
||||
Property responseProperty = response.getSchema();
|
||||
|
||||
// no need to flatten more
|
||||
assertTrue(responseProperty instanceof ArrayProperty);
|
||||
|
||||
ArrayProperty ap = (ArrayProperty) responseProperty;
|
||||
Property p = ap.getItems();
|
||||
|
||||
assertNotNull(p);
|
||||
|
||||
ObjectProperty innerModel = (ObjectProperty) p;
|
||||
assertTrue(innerModel.getProperties().size() == 1);
|
||||
assertNotNull(innerModel.getProperties().get("name"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInlineMapResponse() throws Exception {
|
||||
Swagger swagger = new Swagger();
|
||||
|
||||
MapProperty schema = new MapProperty();
|
||||
schema.setAdditionalProperties(new StringProperty());
|
||||
|
||||
swagger.path("/foo/baz", new Path()
|
||||
.get(new Operation()
|
||||
.response(200, new Response()
|
||||
.vendorExtension("x-foo", "bar")
|
||||
.description("it works!")
|
||||
.schema(schema))));
|
||||
new InlineModelResolver().flatten(swagger);
|
||||
Json.prettyPrint(swagger);
|
||||
|
||||
Response response = swagger.getPaths().get("/foo/baz").getGet().getResponses().get("200");
|
||||
|
||||
Property property = response.getSchema();
|
||||
assertTrue(property instanceof MapProperty);
|
||||
assertTrue(swagger.getDefinitions().size() == 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInlineMapResponseWithObjectProperty() throws Exception {
|
||||
Swagger swagger = new Swagger();
|
||||
|
||||
MapProperty schema = new MapProperty();
|
||||
schema.setAdditionalProperties(new ObjectProperty()
|
||||
.property("name", new StringProperty()));
|
||||
|
||||
swagger.path("/foo/baz", new Path()
|
||||
.get(new Operation()
|
||||
.response(200, new Response()
|
||||
.vendorExtension("x-foo", "bar")
|
||||
.description("it works!")
|
||||
.schema(schema))));
|
||||
new InlineModelResolver().flatten(swagger);
|
||||
|
||||
Response response = swagger.getPaths().get("/foo/baz").getGet().getResponses().get("200");
|
||||
|
||||
Property property = response.getSchema();
|
||||
assertTrue(property instanceof RefProperty);
|
||||
|
||||
Model inline = swagger.getDefinitions().get("inline_response_200");
|
||||
assertTrue(inline instanceof ModelImpl);
|
||||
ModelImpl impl = (ModelImpl) inline;
|
||||
|
||||
Property innerProperty = impl.getAdditionalProperties();
|
||||
assertTrue(innerProperty instanceof ObjectProperty);
|
||||
|
||||
ObjectProperty obj = (ObjectProperty) innerProperty;
|
||||
Property name = obj.getProperties().get("name");
|
||||
assertTrue(name instanceof StringProperty);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testArrayResponse() {
|
||||
Swagger swagger = new Swagger();
|
||||
|
||||
ArrayProperty schema = new ArrayProperty();
|
||||
schema.setItems(new ObjectProperty()
|
||||
.property("name", new StringProperty()));
|
||||
|
||||
swagger.path("/foo/baz", new Path()
|
||||
.get(new Operation()
|
||||
.response(200, new Response()
|
||||
.vendorExtension("x-foo", "bar")
|
||||
.description("it works!")
|
||||
.schema(schema))));
|
||||
new InlineModelResolver().flatten(swagger);
|
||||
|
||||
Response response = swagger.getPaths().get("/foo/baz").getGet().getResponses().get("200");
|
||||
assertTrue(response.getSchema() instanceof ArrayProperty);
|
||||
|
||||
ArrayProperty am = (ArrayProperty) response.getSchema();
|
||||
Property items = am.getItems();
|
||||
assertTrue(items instanceof ObjectProperty);
|
||||
ObjectProperty op = (ObjectProperty) items;
|
||||
Property name = op.getProperties().get("name");
|
||||
assertTrue(name instanceof StringProperty);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBasicInput() {
|
||||
Swagger swagger = new Swagger();
|
||||
|
||||
ModelImpl user = new ModelImpl()
|
||||
.property("name", new StringProperty());
|
||||
|
||||
swagger.path("/foo/baz", new Path()
|
||||
.post(new Operation()
|
||||
.parameter(new BodyParameter()
|
||||
.name("myBody")
|
||||
.schema(new RefModel("User")))));
|
||||
|
||||
swagger.addDefinition("User", user);
|
||||
|
||||
new InlineModelResolver().flatten(swagger);
|
||||
|
||||
Json.prettyPrint(swagger);
|
||||
}
|
||||
}
|
||||
1643
modules/swagger-codegen/src/test/resources/2_0/wordnik.yaml
Normal file
1643
modules/swagger-codegen/src/test/resources/2_0/wordnik.yaml
Normal file
File diff suppressed because it is too large
Load Diff
2
pom.xml
2
pom.xml
@@ -520,7 +520,7 @@
|
||||
<swagger-parser-version>1.0.11-SNAPSHOT</swagger-parser-version>
|
||||
<scala-version>2.11.1</scala-version>
|
||||
<felix-version>2.3.4</felix-version>
|
||||
<swagger-core-version>1.5.4-SNAPSHOT</swagger-core-version>
|
||||
<swagger-core-version>1.5.4</swagger-core-version>
|
||||
<scala-test-version>2.1.4</scala-test-version>
|
||||
<commons-io-version>2.3</commons-io-version>
|
||||
<commons-cli-version>1.2</commons-cli-version>
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
<akka-version>2.3.9</akka-version>
|
||||
<joda-version>1.2</joda-version>
|
||||
<joda-time-version>2.2</joda-time-version>
|
||||
<swagger-core-version>1.5.0</swagger-core-version>
|
||||
<swagger-core-version>1.5.4</swagger-core-version>
|
||||
<maven-plugin.version>1.0.0</maven-plugin.version>
|
||||
|
||||
<junit-version>4.8.1</junit-version>
|
||||
|
||||
@@ -11,18 +11,18 @@ object PetApi {
|
||||
/**
|
||||
*
|
||||
* Expected answers:
|
||||
* code 405 : (Validation exception)
|
||||
* code 404 : (Pet not found)
|
||||
* code 400 : (Invalid ID supplied)
|
||||
* code 404 : (Pet not found)
|
||||
* code 405 : (Validation exception)
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store
|
||||
*/
|
||||
def updatePet(body: Option[Pet] = None): ApiRequest[Unit] =
|
||||
ApiRequest[Unit](ApiMethods.PUT, "http://petstore.swagger.io/v2", "/pet", "application/json")
|
||||
.withBody(body)
|
||||
.withErrorResponse[Unit](405)
|
||||
.withErrorResponse[Unit](404)
|
||||
.withErrorResponse[Unit](400)
|
||||
.withErrorResponse[Unit](404)
|
||||
.withErrorResponse[Unit](405)
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -70,9 +70,9 @@ object PetApi {
|
||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
*
|
||||
* Expected answers:
|
||||
* code 404 : (Pet not found)
|
||||
* code 200 : Pet (successful operation)
|
||||
* code 400 : (Invalid ID supplied)
|
||||
* code 404 : (Pet not found)
|
||||
*
|
||||
* Available security schemes:
|
||||
* api_key (apiKey)
|
||||
@@ -83,9 +83,9 @@ object PetApi {
|
||||
ApiRequest[Pet](ApiMethods.GET, "http://petstore.swagger.io/v2", "/pet/{petId}", "application/json")
|
||||
.withApiKey(apiKey, "api_key", HEADER)
|
||||
.withPathParam("petId", petId)
|
||||
.withErrorResponse[Unit](404)
|
||||
.withSuccessResponse[Pet](200)
|
||||
.withErrorResponse[Unit](400)
|
||||
.withErrorResponse[Unit](404)
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -39,33 +39,33 @@ object StoreApi {
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
*
|
||||
* Expected answers:
|
||||
* code 404 : (Order not found)
|
||||
* code 200 : Order (successful operation)
|
||||
* code 400 : (Invalid ID supplied)
|
||||
* code 404 : (Order not found)
|
||||
*
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
*/
|
||||
def getOrderById(orderId: String): ApiRequest[Order] =
|
||||
ApiRequest[Order](ApiMethods.GET, "http://petstore.swagger.io/v2", "/store/order/{orderId}", "application/json")
|
||||
.withPathParam("orderId", orderId)
|
||||
.withErrorResponse[Unit](404)
|
||||
.withSuccessResponse[Order](200)
|
||||
.withErrorResponse[Unit](400)
|
||||
.withErrorResponse[Unit](404)
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
*
|
||||
* Expected answers:
|
||||
* code 404 : (Order not found)
|
||||
* code 400 : (Invalid ID supplied)
|
||||
* code 404 : (Order not found)
|
||||
*
|
||||
* @param orderId ID of the order that needs to be deleted
|
||||
*/
|
||||
def deleteOrder(orderId: String): ApiRequest[Unit] =
|
||||
ApiRequest[Unit](ApiMethods.DELETE, "http://petstore.swagger.io/v2", "/store/order/{orderId}", "application/json")
|
||||
.withPathParam("orderId", orderId)
|
||||
.withErrorResponse[Unit](404)
|
||||
.withErrorResponse[Unit](400)
|
||||
.withErrorResponse[Unit](404)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -72,25 +72,25 @@ object UserApi {
|
||||
/**
|
||||
*
|
||||
* Expected answers:
|
||||
* code 404 : (User not found)
|
||||
* code 200 : User (successful operation)
|
||||
* code 400 : (Invalid username supplied)
|
||||
* code 404 : (User not found)
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
*/
|
||||
def getUserByName(username: String): ApiRequest[User] =
|
||||
ApiRequest[User](ApiMethods.GET, "http://petstore.swagger.io/v2", "/user/{username}", "application/json")
|
||||
.withPathParam("username", username)
|
||||
.withErrorResponse[Unit](404)
|
||||
.withSuccessResponse[User](200)
|
||||
.withErrorResponse[Unit](400)
|
||||
.withErrorResponse[Unit](404)
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* Expected answers:
|
||||
* code 404 : (User not found)
|
||||
* code 400 : (Invalid user supplied)
|
||||
* code 404 : (User not found)
|
||||
*
|
||||
* @param username name that need to be deleted
|
||||
* @param body Updated user object
|
||||
@@ -99,23 +99,23 @@ object UserApi {
|
||||
ApiRequest[Unit](ApiMethods.PUT, "http://petstore.swagger.io/v2", "/user/{username}", "application/json")
|
||||
.withBody(body)
|
||||
.withPathParam("username", username)
|
||||
.withErrorResponse[Unit](404)
|
||||
.withErrorResponse[Unit](400)
|
||||
.withErrorResponse[Unit](404)
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* Expected answers:
|
||||
* code 404 : (User not found)
|
||||
* code 400 : (Invalid username supplied)
|
||||
* code 404 : (User not found)
|
||||
*
|
||||
* @param username The name that needs to be deleted
|
||||
*/
|
||||
def deleteUser(username: String): ApiRequest[Unit] =
|
||||
ApiRequest[Unit](ApiMethods.DELETE, "http://petstore.swagger.io/v2", "/user/{username}", "application/json")
|
||||
.withPathParam("username", username)
|
||||
.withErrorResponse[Unit](404)
|
||||
.withErrorResponse[Unit](400)
|
||||
.withErrorResponse[Unit](404)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
</repository>
|
||||
</repositories>
|
||||
<properties>
|
||||
<swagger-annotations-version>1.5.0</swagger-annotations-version>
|
||||
<swagger-annotations-version>1.5.4</swagger-annotations-version>
|
||||
<gson-version>2.3.1</gson-version>
|
||||
<junit-version>4.8.1</junit-version>
|
||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||
|
||||
@@ -316,7 +316,7 @@ public class UserApi {
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
* @return User
|
||||
*/
|
||||
public User getUserByName (String username) throws ApiException {
|
||||
|
||||
@@ -18,9 +18,9 @@ public class Pet {
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
@SerializedName("photoUrls")
|
||||
private List<String> photoUrls = new ArrayList<String>() ;
|
||||
private List<String> photoUrls = null;
|
||||
@SerializedName("tags")
|
||||
private List<Tag> tags = new ArrayList<Tag>() ;
|
||||
private List<Tag> tags = null;
|
||||
public enum StatusEnum {
|
||||
available, pending, sold,
|
||||
};
|
||||
|
||||
@@ -145,8 +145,9 @@ class PetApi(client: TransportClient, config: SwaggerConfig) extends ApiClient(c
|
||||
}
|
||||
|
||||
|
||||
def deletePet(apiKey: Option[String] = None,
|
||||
petId: Long)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = {
|
||||
def deletePet(petId: Long,
|
||||
apiKey: Option[String] = None
|
||||
)(implicit reader: ClientResponseReader[Unit]): Future[Unit] = {
|
||||
// create path and map variables
|
||||
val path = (addFmt("/pet/{petId}")
|
||||
replaceAll ("\\{" + "petId" + "\\}",petId.toString))
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -161,7 +161,7 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<swagger-annotations-version>1.5.0</swagger-annotations-version>
|
||||
<swagger-annotations-version>1.5.4</swagger-annotations-version>
|
||||
<jersey-version>1.18</jersey-version>
|
||||
<jackson-version>2.4.2</jackson-version>
|
||||
<jodatime-version>2.3</jodatime-version>
|
||||
|
||||
@@ -39,7 +39,7 @@ import io.swagger.client.auth.HttpBasicAuth;
|
||||
import io.swagger.client.auth.ApiKeyAuth;
|
||||
import io.swagger.client.auth.OAuth;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-01T23:05:28.119+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class ApiClient {
|
||||
private Map<String, Client> hostMap = new HashMap<String, Client>();
|
||||
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
||||
|
||||
@@ -3,7 +3,7 @@ package io.swagger.client;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-01T23:05:28.119+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class ApiException extends Exception {
|
||||
private int code = 0;
|
||||
private Map<String, List<String>> responseHeaders = null;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.swagger.client;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-01T23:05:28.119+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class Configuration {
|
||||
private static ApiClient defaultApiClient = new ApiClient();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.fasterxml.jackson.datatype.joda.*;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-01T23:05:28.119+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class JSON {
|
||||
private ObjectMapper mapper;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.swagger.client;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-01T23:05:28.119+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class Pair {
|
||||
private String name = "";
|
||||
private String value = "";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.swagger.client;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-01T23:05:28.119+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class StringUtil {
|
||||
/**
|
||||
* Check if the given array contains the given value (with case-insensitive comparison).
|
||||
|
||||
@@ -3,7 +3,7 @@ package io.swagger.client;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-01T23:05:28.119+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class TypeRef<T> {
|
||||
private final Type type;
|
||||
|
||||
|
||||
@@ -6,12 +6,18 @@ import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
import io.swagger.client.TypeRef;
|
||||
|
||||
import io.swagger.client.model.Pet;
|
||||
import java.io.File;
|
||||
import io.swagger.client.model.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-16T10:32:51.872+08:00")
|
||||
import io.swagger.client.model.Pet;
|
||||
import java.io.File;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class PetApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -266,7 +272,7 @@ public class PetApi {
|
||||
};
|
||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
||||
|
||||
String[] authNames = new String[] { "api_key" };
|
||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,12 +6,18 @@ import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
import io.swagger.client.TypeRef;
|
||||
|
||||
import java.util.Map;
|
||||
import io.swagger.client.model.Order;
|
||||
import io.swagger.client.model.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-09T21:30:27.235+08:00")
|
||||
import java.util.Map;
|
||||
import io.swagger.client.model.Order;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class StoreApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
|
||||
@@ -6,12 +6,18 @@ import io.swagger.client.Configuration;
|
||||
import io.swagger.client.Pair;
|
||||
import io.swagger.client.TypeRef;
|
||||
|
||||
import io.swagger.client.model.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import io.swagger.client.model.User;
|
||||
import java.util.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-09T21:30:27.235+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class UserApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import io.swagger.client.Pair;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-01T23:05:28.119+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class ApiKeyAuth implements Authentication {
|
||||
private final String location;
|
||||
private final String paramName;
|
||||
|
||||
@@ -5,7 +5,7 @@ import io.swagger.client.Pair;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-01T23:05:28.119+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public interface Authentication {
|
||||
/** Apply authentication settings to header and query params. */
|
||||
void applyToParams(List<Pair> queryParams, Map<String, String> headerParams);
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-01T23:05:28.119+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class HttpBasicAuth implements Authentication {
|
||||
private String username;
|
||||
private String password;
|
||||
|
||||
@@ -5,7 +5,7 @@ import io.swagger.client.Pair;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-01T23:05:28.119+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class OAuth implements Authentication {
|
||||
@Override
|
||||
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package io.swagger.client.auth;
|
||||
|
||||
public enum OAuthFlow {
|
||||
accessCode, implicit, password, application
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-01T23:05:28.119+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class Category {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-09T21:30:27.235+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class Order {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -2,8 +2,8 @@ package io.swagger.client.model;
|
||||
|
||||
import io.swagger.client.StringUtil;
|
||||
import io.swagger.client.model.Category;
|
||||
import java.util.*;
|
||||
import io.swagger.client.model.Tag;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-09T21:30:27.235+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class Pet {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-01T23:05:28.119+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class Tag {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-01T23:05:28.119+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-20T10:56:59.550-07:00")
|
||||
public class User {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -43,7 +43,7 @@ import io.swagger.client.auth.HttpBasicAuth;
|
||||
import io.swagger.client.auth.ApiKeyAuth;
|
||||
import io.swagger.client.auth.OAuth;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-24T21:52:47.417+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
public class ApiClient {
|
||||
private Map<String, Client> hostMap = new HashMap<String, Client>();
|
||||
private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
||||
|
||||
@@ -3,7 +3,7 @@ package io.swagger.client;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
public class ApiException extends Exception {
|
||||
private int code = 0;
|
||||
private Map<String, List<String>> responseHeaders = null;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.swagger.client;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
public class Configuration {
|
||||
private static ApiClient defaultApiClient = new ApiClient();
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.fasterxml.jackson.datatype.joda.*;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
public class JSON {
|
||||
private ObjectMapper mapper;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.swagger.client;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
public class Pair {
|
||||
private String name = "";
|
||||
private String value = "";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.swagger.client;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
public class StringUtil {
|
||||
/**
|
||||
* Check if the given array contains the given value (with case-insensitive comparison).
|
||||
|
||||
@@ -3,7 +3,7 @@ package io.swagger.client;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
public class TypeRef<T> {
|
||||
private final Type type;
|
||||
|
||||
|
||||
@@ -11,7 +11,11 @@ import java.io.File;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
<<<<<<< HEAD
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
=======
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-16T10:40:45.419+08:00")
|
||||
>>>>>>> master
|
||||
public class PetApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
@@ -237,7 +241,11 @@ public class PetApi {
|
||||
};
|
||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
||||
|
||||
<<<<<<< HEAD
|
||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
||||
=======
|
||||
String[] authNames = new String[] { "api_key" };
|
||||
>>>>>>> master
|
||||
|
||||
|
||||
TypeRef returnType = new TypeRef<Pet>() {};
|
||||
|
||||
@@ -11,7 +11,11 @@ import io.swagger.client.model.Order;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
<<<<<<< HEAD
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
=======
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-09T21:30:19.416+08:00")
|
||||
>>>>>>> master
|
||||
public class StoreApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
|
||||
@@ -11,7 +11,11 @@ import java.util.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
<<<<<<< HEAD
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
=======
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-09T21:30:19.416+08:00")
|
||||
>>>>>>> master
|
||||
public class UserApi {
|
||||
private ApiClient apiClient;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import io.swagger.client.Pair;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
public class ApiKeyAuth implements Authentication {
|
||||
private final String location;
|
||||
private final String paramName;
|
||||
|
||||
@@ -5,7 +5,7 @@ import io.swagger.client.Pair;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
public interface Authentication {
|
||||
/** Apply authentication settings to header and query params. */
|
||||
void applyToParams(List<Pair> queryParams, Map<String, String> headerParams);
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
public class HttpBasicAuth implements Authentication {
|
||||
private String username;
|
||||
private String password;
|
||||
|
||||
@@ -5,7 +5,7 @@ import io.swagger.client.Pair;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
public class OAuth implements Authentication {
|
||||
@Override
|
||||
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package io.swagger.client.auth;
|
||||
|
||||
public enum OAuthFlow {
|
||||
accessCode, implicit, password, application
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
public class Category {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -10,7 +10,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
<<<<<<< HEAD
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
=======
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-09T21:30:19.416+08:00")
|
||||
>>>>>>> master
|
||||
public class Order {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -2,8 +2,8 @@ package io.swagger.client.model;
|
||||
|
||||
import io.swagger.client.StringUtil;
|
||||
import io.swagger.client.model.Category;
|
||||
import java.util.*;
|
||||
import io.swagger.client.model.Tag;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,11 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
<<<<<<< HEAD
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
=======
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-09T21:30:19.416+08:00")
|
||||
>>>>>>> master
|
||||
public class Pet {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
public class Tag {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-11T11:35:51.678+08:00")
|
||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-19T23:12:20.646-07:00")
|
||||
public class User {
|
||||
|
||||
private Long id = null;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user