[scala] Support for Set when array has uniqueItems=true (#4926)

* [scala] Set support for unique arrays

This includes and builds upon community contribution for better Set support in Scala.
It makes property + model work as expected with Set and default values
across all Scala generators. Included tests to account for new changes.

This also reverts the community contribution to remove ListBuffer
imports and change the default for array to ListBuffer. Users should use
the instantiation types map to modify the desired array instantiation
type. Any new default should target a new minor release after community
discussion, as it affects all existing SDKs generated with
openapi-generator.

* [scala] Improve default handling of monadic collection type

* [scala] Regenerate samples

* Update ScalaPlayFrameworkServerCodegen.java

Scala Play defaulted to List and should continue to do so.

Co-authored-by: František Kocun <frantisek.kocun@gmail.com>
This commit is contained in:
Jim Schubert
2020-01-05 09:20:56 -05:00
committed by GitHub
parent 965efdd965
commit 25036e48d5
52 changed files with 757 additions and 547 deletions

View File

@@ -426,7 +426,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
additionalProperties.put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, getSortParamsByRequiredFlag()); additionalProperties.put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, getSortParamsByRequiredFlag());
additionalProperties.put(CodegenConstants.SORT_MODEL_PROPERTIES_BY_REQUIRED_FLAG, getSortModelPropertiesByRequiredFlag()); additionalProperties.put(CodegenConstants.SORT_MODEL_PROPERTIES_BY_REQUIRED_FLAG, getSortModelPropertiesByRequiredFlag());
additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage()); additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage());
additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage()); additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage());
@@ -674,7 +674,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
// TODO: collection type here should be fully qualified namespace to avoid model conflicts // TODO: collection type here should be fully qualified namespace to avoid model conflicts
// This supports arrays of arrays. // This supports arrays of arrays.
String arrayType = typeMapping.get("array"); String arrayType = typeMapping.get("array");
if (Boolean.TRUE.equals(arr.getUniqueItems())) { if (ModelUtils.isSet(arr)) {
arrayType = typeMapping.get("set"); arrayType = typeMapping.get("set");
} }
StringBuilder instantiationType = new StringBuilder(arrayType); StringBuilder instantiationType = new StringBuilder(arrayType);

View File

@@ -23,9 +23,7 @@ import io.swagger.v3.oas.models.media.ArraySchema;
import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.media.Schema;
import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.openapitools.codegen.CliOption; import org.openapitools.codegen.*;
import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.utils.ModelUtils; import org.openapitools.codegen.utils.ModelUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@@ -106,6 +104,14 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen {
"yield" "yield"
)); ));
importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer");
// although Seq is a predef, before Scala 2.13, it _could_ refer to a mutable Seq in some cases.
importMapping.put("Seq", "scala.collection.immutable.Seq");
importMapping.put("Set", "scala.collection.immutable.Set");
importMapping.put("ListSet", "scala.collection.immutable.ListSet");
instantiationTypes.put("set", "Set");
cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC));
cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC)); cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC));
cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC)); cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC));
@@ -199,7 +205,11 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen {
@Override @Override
public String getSchemaType(Schema p) { public String getSchemaType(Schema p) {
String openAPIType = super.getSchemaType(p); String openAPIType = super.getSchemaType(p);
String type = null; if (ModelUtils.isSet(p)) {
openAPIType = "set";
}
String type;
if (typeMapping.containsKey(openAPIType)) { if (typeMapping.containsKey(openAPIType)) {
type = typeMapping.get(openAPIType); type = typeMapping.get(openAPIType);
if (languageSpecificPrimitives.contains(type)) { if (languageSpecificPrimitives.contains(type)) {
@@ -219,7 +229,7 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen {
} else if (ModelUtils.isArraySchema(p)) { } else if (ModelUtils.isArraySchema(p)) {
ArraySchema ap = (ArraySchema) p; ArraySchema ap = (ArraySchema) p;
String inner = getSchemaType(ap.getItems()); String inner = getSchemaType(ap.getItems());
return instantiationTypes.get("array") + "[" + inner + "]"; return ( ModelUtils.isSet(ap) ? instantiationTypes.get("set") : instantiationTypes.get("array") ) + "[" + inner + "]";
} else { } else {
return null; return null;
} }
@@ -248,7 +258,28 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen {
} else if (ModelUtils.isArraySchema(p)) { } else if (ModelUtils.isArraySchema(p)) {
ArraySchema ap = (ArraySchema) p; ArraySchema ap = (ArraySchema) p;
String inner = getSchemaType(ap.getItems()); String inner = getSchemaType(ap.getItems());
return "new ListBuffer[" + inner + "]() "; String genericType;
if (ModelUtils.isSet(ap)) {
genericType = instantiationTypes.get("set");
} else {
genericType = instantiationTypes.get("array");
}
// test for immutable Monoids with .empty method for idiomatic defaults
if ("List".equals(genericType) ||
"Set".equals(genericType) ||
"Seq".equals(genericType) ||
"Array".equals(genericType) ||
"Vector".equals(genericType) ||
"IndexedSeq".equals(genericType) ||
"Iterable".equals(genericType) ||
"ListSet".equals(genericType)
) {
return genericType + "[" + inner + "].empty ";
}
// Assume that any other generic types can be new'd up.
return "new " + genericType + "[" + inner + "]() ";
} else if (ModelUtils.isStringSchema(p)) { } else if (ModelUtils.isStringSchema(p)) {
return null; return null;
} else { } else {
@@ -256,6 +287,25 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen {
} }
} }
/**
* Convert OAS Property object to Codegen Property object
*
* @param name name of the property
* @param p OAS property object
* @return Codegen Property object
*/
@Override
public CodegenProperty fromProperty(String name, Schema p) {
CodegenProperty prop = super.fromProperty(name, p);
if (ModelUtils.isArraySchema(p)) {
ArraySchema as = (ArraySchema) p;
if (ModelUtils.isSet(as)) {
prop.containerType = "set";
}
}
return prop;
}
@Override @Override
public Map<String, Object> postProcessModels(Map<String, Object> objs) { public Map<String, Object> postProcessModels(Map<String, Object> objs) {
// remove model imports to avoid warnings for importing class in the same package in Scala // remove model imports to avoid warnings for importing class in the same package in Scala

View File

@@ -265,6 +265,9 @@ public class ScalaAkkaClientCodegen extends AbstractScalaCodegen implements Code
} else if (ModelUtils.isArraySchema(p)) { } else if (ModelUtils.isArraySchema(p)) {
ArraySchema ap = (ArraySchema) p; ArraySchema ap = (ArraySchema) p;
String inner = getSchemaType(ap.getItems()); String inner = getSchemaType(ap.getItems());
if (ModelUtils.isSet(ap)) {
return "Set[" + inner + "].empty ";
}
return "Seq[" + inner + "].empty "; return "Seq[" + inner + "].empty ";
} else if (ModelUtils.isStringSchema(p)) { } else if (ModelUtils.isStringSchema(p)) {
return null; return null;

View File

@@ -151,7 +151,6 @@ public class ScalaGatlingCodegen extends AbstractScalaCodegen implements Codegen
importMapping.remove("Map"); importMapping.remove("Map");
importMapping.put("Date", "java.util.Date"); importMapping.put("Date", "java.util.Date");
importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer");
typeMapping = new HashMap<String, String>(); typeMapping = new HashMap<String, String>();
typeMapping.put("enum", "NSString"); typeMapping.put("enum", "NSString");

View File

@@ -110,7 +110,6 @@ public class ScalaHttpClientCodegen extends AbstractScalaCodegen implements Code
importMapping.remove("Map"); importMapping.remove("Map");
importMapping.put("Date", "java.util.Date"); importMapping.put("Date", "java.util.Date");
importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer");
typeMapping = new HashMap<String, String>(); typeMapping = new HashMap<String, String>();
typeMapping.put("enum", "NSString"); typeMapping.put("enum", "NSString");

View File

@@ -76,7 +76,6 @@ public class ScalaLagomServerCodegen extends AbstractScalaCodegen implements Cod
importMapping.remove("Map"); importMapping.remove("Map");
importMapping.put("DateTime", "org.joda.time.DateTime"); importMapping.put("DateTime", "org.joda.time.DateTime");
importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer");
typeMapping = new HashMap<>(); typeMapping = new HashMap<>();
typeMapping.put("Integer", "Int"); typeMapping.put("Integer", "Int");

View File

@@ -348,6 +348,9 @@ public class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem
if (ModelUtils.isArraySchema(p)) { if (ModelUtils.isArraySchema(p)) {
Schema items = ((ArraySchema) p).getItems(); Schema items = ((ArraySchema) p).getItems();
String inner = getSchemaType(items); String inner = getSchemaType(items);
if (ModelUtils.isSet(p)) {
return "Set.empty[" + inner + "]";
}
return "List.empty[" + inner + "]"; return "List.empty[" + inner + "]";
} }

View File

@@ -63,14 +63,27 @@ public class ScalatraServerCodegen extends AbstractScalaCodegen implements Codeg
"Integer", "Integer",
"Long", "Long",
"Float", "Float",
"List",
"Set", "Set",
"Map") "Map")
); );
typeMapping = new HashMap<>();
typeMapping.put("array", "List");
typeMapping.put("set", "Set");
typeMapping.put("boolean", "Boolean");
typeMapping.put("string", "String");
typeMapping.put("int", "Int");
typeMapping.put("integer", "Int"); typeMapping.put("integer", "Int");
typeMapping.put("long", "Long"); typeMapping.put("long", "Long");
typeMapping.put("float", "Float");
typeMapping.put("byte", "Byte");
typeMapping.put("short", "Short");
typeMapping.put("char", "Char");
typeMapping.put("double", "Double");
typeMapping.put("object", "Any");
typeMapping.put("file", "File");
typeMapping.put("binary", "File"); typeMapping.put("binary", "File");
typeMapping.put("number", "Double");
additionalProperties.put("appName", "OpenAPI Sample"); additionalProperties.put("appName", "OpenAPI Sample");
additionalProperties.put("appDescription", "A sample openapi server"); additionalProperties.put("appDescription", "A sample openapi server");
@@ -95,7 +108,6 @@ public class ScalatraServerCodegen extends AbstractScalaCodegen implements Codeg
supportingFiles.add(new SupportingFile("project/plugins.sbt", "project", "plugins.sbt")); supportingFiles.add(new SupportingFile("project/plugins.sbt", "project", "plugins.sbt"));
supportingFiles.add(new SupportingFile("sbt", "", "sbt")); supportingFiles.add(new SupportingFile("sbt", "", "sbt"));
instantiationTypes.put("array", "ArrayList");
instantiationTypes.put("map", "HashMap"); instantiationTypes.put("map", "HashMap");
importMapping = new HashMap<String, String>(); importMapping = new HashMap<String, String>();
@@ -113,6 +125,11 @@ public class ScalatraServerCodegen extends AbstractScalaCodegen implements Codeg
importMapping.put("LocalDateTime", "org.joda.time.LocalDateTime"); importMapping.put("LocalDateTime", "org.joda.time.LocalDateTime");
importMapping.put("LocalDate", "org.joda.time.LocalDate"); importMapping.put("LocalDate", "org.joda.time.LocalDate");
importMapping.put("LocalTime", "org.joda.time.LocalTime"); importMapping.put("LocalTime", "org.joda.time.LocalTime");
importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer");
importMapping.put("Set", "scala.collection.immutable.Set");
importMapping.put("ListSet", "scala.collection.immutable.ListSet");
instantiationTypes.put("set", "Set");
} }
@Override @Override

View File

@@ -76,8 +76,6 @@ public class ScalazClientCodegen extends AbstractScalaCodegen implements Codegen
importMapping.remove("List"); importMapping.remove("List");
importMapping.remove("Set"); importMapping.remove("Set");
importMapping.remove("Map"); importMapping.remove("Map");
importMapping.put("ListBuffer", "scala.collection.mutable.ListBuffer");
// Overrides defaults applied in DefaultCodegen which don't apply cleanly to Scala. // Overrides defaults applied in DefaultCodegen which don't apply cleanly to Scala.
importMapping.put("Date", "java.util.Date"); importMapping.put("Date", "java.util.Date");
@@ -214,7 +212,7 @@ public class ScalazClientCodegen extends AbstractScalaCodegen implements Codegen
} else if (ModelUtils.isArraySchema(p)) { } else if (ModelUtils.isArraySchema(p)) {
ArraySchema ap = (ArraySchema) p; ArraySchema ap = (ArraySchema) p;
String inner = getSchemaType(ap.getItems()); String inner = getSchemaType(ap.getItems());
String collectionType = typeMapping.get("array"); String collectionType = ModelUtils.isSet(ap) ? typeMapping.get("set") : typeMapping.get("array");
// We assume that users would map these collections to a monoid with an identity function // We assume that users would map these collections to a monoid with an identity function
// There's no reason to assume mutable structure here (which may make consumption more difficult) // There's no reason to assume mutable structure here (which may make consumption more difficult)

View File

@@ -386,6 +386,10 @@ public class ModelUtils {
return (schema instanceof ArraySchema); return (schema instanceof ArraySchema);
} }
public static boolean isSet(Schema schema) {
return ModelUtils.isArraySchema(schema) && Boolean.TRUE.equals(schema.getUniqueItems());
}
public static boolean isStringSchema(Schema schema) { public static boolean isStringSchema(Schema schema) {
if (schema instanceof StringSchema || SchemaTypeUtil.STRING_TYPE.equals(schema.getType())) { if (schema instanceof StringSchema || SchemaTypeUtil.STRING_TYPE.equals(schema.getType())) {
return true; return true;

View File

@@ -212,6 +212,37 @@ public class ScalaAkkaClientCodegenTest {
Assert.assertTrue(property1.isContainer); Assert.assertTrue(property1.isContainer);
} }
@Test(description = "convert a model with set (unique array) property")
public void complexSetPropertyTest() {
final Schema model = new Schema()
.description("a sample model")
.addProperties("children", new ArraySchema()
.items(new Schema().$ref("#/definitions/Children"))
.uniqueItems(Boolean.TRUE));
final DefaultCodegen codegen = new ScalaAkkaClientCodegen();
OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model);
codegen.setOpenAPI(openAPI);
final CodegenModel cm = codegen.fromModel("sample", model);
Assert.assertEquals(cm.name, "sample");
Assert.assertEquals(cm.classname, "Sample");
Assert.assertEquals(cm.description, "a sample model");
Assert.assertEquals(cm.vars.size(), 1);
final CodegenProperty property1 = cm.vars.get(0);
Assert.assertEquals(property1.baseName, "children");
Assert.assertEquals(property1.complexType, "Children");
Assert.assertEquals(property1.getter, "getChildren");
Assert.assertEquals(property1.setter, "setChildren");
Assert.assertEquals(property1.dataType, "Set[Children]");
Assert.assertEquals(property1.name, "children");
Assert.assertEquals(property1.defaultValue, "Set[Children].empty ");
Assert.assertEquals(property1.baseType, "Set");
Assert.assertEquals(property1.containerType, "set");
Assert.assertFalse(property1.required);
Assert.assertTrue(property1.isContainer);
}
@Test(description = "convert a model with complex map property") @Test(description = "convert a model with complex map property")
public void complexMapPropertyTest() { public void complexMapPropertyTest() {
final Schema model = new Schema() final Schema model = new Schema()
@@ -258,10 +289,33 @@ public class ScalaAkkaClientCodegenTest {
Assert.assertEquals(cm.description, "an array model"); Assert.assertEquals(cm.description, "an array model");
Assert.assertEquals(cm.vars.size(), 0); Assert.assertEquals(cm.vars.size(), 0);
Assert.assertEquals(cm.parent, "ListBuffer[Children]"); Assert.assertEquals(cm.parent, "ListBuffer[Children]");
Assert.assertEquals(cm.arrayModelType, "Children");
Assert.assertEquals(cm.imports.size(), 2); Assert.assertEquals(cm.imports.size(), 2);
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("ListBuffer", "Children")).size(), 2); Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("ListBuffer", "Children")).size(), 2);
} }
@Test(description = "convert an array model with unique items to set")
public void arrayAsSetModelTest() {
final Schema schema = new ArraySchema()
.items(new Schema().$ref("#/definitions/Children"))
.description("a set of Children models");
schema.setUniqueItems(true);
final DefaultCodegen codegen = new ScalaAkkaClientCodegen();
OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema);
codegen.setOpenAPI(openAPI);
final CodegenModel cm = codegen.fromModel("sample", schema);
Assert.assertEquals(cm.name, "sample");
Assert.assertEquals(cm.classname, "Sample");
Assert.assertEquals(cm.description, "a set of Children models");
Assert.assertEquals(cm.vars.size(), 0);
Assert.assertEquals(cm.parent, "Set[Children]");
Assert.assertEquals(cm.arrayModelType, "Children");
Assert.assertEquals(cm.imports.size(), 2);
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Set", "Children")).size(), 2);
}
@Test(description = "convert a map model") @Test(description = "convert a map model")
public void mapModelTest() { public void mapModelTest() {
final Schema model = new Schema() final Schema model = new Schema()

View File

@@ -25,6 +25,7 @@ import org.openapitools.codegen.CodegenModel;
import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.DefaultCodegen; import org.openapitools.codegen.DefaultCodegen;
import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.TestUtils;
import org.openapitools.codegen.languages.ScalaAkkaClientCodegen;
import org.openapitools.codegen.languages.ScalaHttpClientCodegen; import org.openapitools.codegen.languages.ScalaHttpClientCodegen;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@@ -119,6 +120,37 @@ public class ScalaHttpClientModelTest {
Assert.assertTrue(property1.isContainer); Assert.assertTrue(property1.isContainer);
} }
@Test(description = "convert a model with set (unique array) property")
public void complexSetPropertyTest() {
final Schema model = new Schema()
.description("a sample model")
.addProperties("children", new ArraySchema()
.items(new Schema().$ref("#/definitions/Children"))
.uniqueItems(Boolean.TRUE));
final DefaultCodegen codegen = new ScalaHttpClientCodegen();
OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model);
codegen.setOpenAPI(openAPI);
final CodegenModel cm = codegen.fromModel("sample", model);
Assert.assertEquals(cm.name, "sample");
Assert.assertEquals(cm.classname, "Sample");
Assert.assertEquals(cm.description, "a sample model");
Assert.assertEquals(cm.vars.size(), 1);
final CodegenProperty property1 = cm.vars.get(0);
Assert.assertEquals(property1.baseName, "children");
Assert.assertEquals(property1.complexType, "Children");
Assert.assertEquals(property1.getter, "getChildren");
Assert.assertEquals(property1.setter, "setChildren");
Assert.assertEquals(property1.dataType, "Set[Children]");
Assert.assertEquals(property1.name, "children");
Assert.assertEquals(property1.defaultValue, "Set[Children].empty ");
Assert.assertEquals(property1.baseType, "Set");
Assert.assertEquals(property1.containerType, "set");
Assert.assertFalse(property1.required);
Assert.assertTrue(property1.isContainer);
}
@Test(description = "convert a model with a map property") @Test(description = "convert a model with a map property")
public void mapPropertyTest() { public void mapPropertyTest() {
final Schema model = new Schema() final Schema model = new Schema()
@@ -256,6 +288,28 @@ public class ScalaHttpClientModelTest {
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("ListBuffer", "Children")).size(), 2); Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("ListBuffer", "Children")).size(), 2);
} }
@Test(description = "convert an array model with unique items to set")
public void arrayAsSetModelTest() {
final Schema schema = new ArraySchema()
.items(new Schema().$ref("#/definitions/Children"))
.description("a set of Children models");
schema.setUniqueItems(true);
final DefaultCodegen codegen = new ScalaHttpClientCodegen();
OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema);
codegen.setOpenAPI(openAPI);
final CodegenModel cm = codegen.fromModel("sample", schema);
Assert.assertEquals(cm.name, "sample");
Assert.assertEquals(cm.classname, "Sample");
Assert.assertEquals(cm.description, "a set of Children models");
Assert.assertEquals(cm.vars.size(), 0);
Assert.assertEquals(cm.parent, "Set[Children]");
Assert.assertEquals(cm.arrayModelType, "Children");
Assert.assertEquals(cm.imports.size(), 2);
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Set", "Children")).size(), 2);
}
@Test(description = "convert a map model") @Test(description = "convert a map model")
public void mapModelTest() { public void mapModelTest() {
final Schema model = new Schema() final Schema model = new Schema()

View File

@@ -235,4 +235,28 @@ public class ModelUtilsTest {
// Test a null schema // Test a null schema
Assert.assertFalse(ModelUtils.isFreeFormObject(null)); Assert.assertFalse(ModelUtils.isFreeFormObject(null));
} }
@Test
public void testIsSetForValidSet() {
ArraySchema as = new ArraySchema()
.items(new StringSchema());
as.setUniqueItems(true);
Assert.assertTrue(ModelUtils.isSet(as));
}
@Test
public void testIsSetFalseForInvalidSet() {
ArraySchema as = new ArraySchema()
.items(new StringSchema());
as.setUniqueItems(false);
Assert.assertFalse(ModelUtils.isSet(as));
}
@Test
public void testIsSetFailsForNullSchema() {
ArraySchema as = null;
Assert.assertFalse(ModelUtils.isSet(as));
}
} }

View File

@@ -1 +1 @@
4.1.3-SNAPSHOT 4.2.3-SNAPSHOT

View File

@@ -1 +1 @@
3.0.0-SNAPSHOT 4.2.3-SNAPSHOT

View File

@@ -1 +1 @@
username,password password,username
1 password username

View File

@@ -147,8 +147,8 @@ class UserApiSimulation extends Simulation {
.feed(loginUserQUERYFeeder) .feed(loginUserQUERYFeeder)
.exec(http("loginUser") .exec(http("loginUser")
.httpRequest("GET","/user/login") .httpRequest("GET","/user/login")
.queryParam("username","${username}")
.queryParam("password","${password}") .queryParam("password","${password}")
.queryParam("username","${username}")
) )
// Run scnloginUser with warm up and reach a constant rate for entire duration // Run scnloginUser with warm up and reach a constant rate for entire duration

View File

@@ -1 +1 @@
4.0.1-SNAPSHOT 4.2.3-SNAPSHOT

View File

@@ -1,11 +1,17 @@
#!/bin/sh #!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
# #
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
git_user_id=$1 git_user_id=$1
git_repo_id=$2 git_repo_id=$2
release_note=$3 release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID" git_user_id="GIT_USER_ID"
@@ -28,7 +34,7 @@ git init
# Adds the files in the local repository and stages them for commit. # Adds the files in the local repository and stages them for commit.
git add . git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository. # Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note" git commit -m "$release_note"
# Sets the new remote # Sets the new remote
@@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
fi fi
fi fi
@@ -47,6 +53,6 @@ fi
git pull origin master git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository # Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https' git push origin master 2>&1 | grep -v 'To https'

View File

@@ -1 +1 @@
4.2.2-SNAPSHOT 4.2.3-SNAPSHOT

View File

@@ -1 +1 @@
sbt.version=0.13.15 sbt.version=0.13.15

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT 4.2.3-SNAPSHOT

View File

@@ -1,9 +1,9 @@
# Swagger generated scala-lagomApi # OpenAPI generated scala-lagomApi
## Overview ## Overview
This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the
[OpenAPI-Spec](https://github.com/swagger-api/swagger-core/wiki) from a remote server, you can easily generate a server stub. This [OpenAPI-Spec](https://openapis.org) from a remote server, you can easily generate a server stub. This
is an example of building a swagger-enabled lagon-api. is an example of building a OpenAPI-enabled lagon-api.
This example uses the [lagomframework](https://www.lagomframework.com) lagomframework. This example uses the [lagomframework](https://www.lagomframework.com) lagomframework.

View File

@@ -2,7 +2,7 @@ version := "1.0.0"
name := "scala-lagom-server" name := "scala-lagom-server"
organization := "io.swagger" organization := "org.openapitools"
scalaVersion := "2.11.8" scalaVersion := "2.11.8"

View File

@@ -1,12 +1,12 @@
/** /**
* Swagger Petstore * OpenAPI Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* Contact: apiteam@swagger.io *
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://github.com/swagger-api/swagger-codegen.git * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@@ -1,12 +1,12 @@
/** /**
* Swagger Petstore * OpenAPI Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* Contact: apiteam@swagger.io *
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://github.com/swagger-api/swagger-codegen.git * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@@ -1,12 +1,12 @@
/** /**
* Swagger Petstore * OpenAPI Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* Contact: apiteam@swagger.io *
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://github.com/swagger-api/swagger-codegen.git * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@@ -75,7 +75,7 @@ trait UserApi extends Service {
* Get user by user name * 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 * @return User
*/ */
def getUserByName(username: String): ServiceCall[NotUsed ,User] def getUserByName(username: String): ServiceCall[NotUsed ,User]

View File

@@ -1,12 +1,12 @@
/** /**
* Swagger Petstore * OpenAPI Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* Contact: apiteam@swagger.io *
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://github.com/swagger-api/swagger-codegen.git * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
@@ -15,7 +15,7 @@ import play.api.libs.json._
case class ApiResponse ( case class ApiResponse (
code: Option[Int], code: Option[Int],
_type: Option[String], `type`: Option[String],
message: Option[String] message: Option[String]
) )

View File

@@ -1,12 +1,12 @@
/** /**
* Swagger Petstore * OpenAPI Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* Contact: apiteam@swagger.io *
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://github.com/swagger-api/swagger-codegen.git * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@@ -1,12 +1,12 @@
/** /**
* Swagger Petstore * OpenAPI Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* Contact: apiteam@swagger.io *
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://github.com/swagger-api/swagger-codegen.git * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@@ -1,12 +1,12 @@
/** /**
* Swagger Petstore * OpenAPI Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* Contact: apiteam@swagger.io *
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://github.com/swagger-api/swagger-codegen.git * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@@ -1,12 +1,12 @@
/** /**
* Swagger Petstore * OpenAPI Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* Contact: apiteam@swagger.io *
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://github.com/swagger-api/swagger-codegen.git * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@@ -1,12 +1,12 @@
/** /**
* Swagger Petstore * OpenAPI Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters. * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
* *
* OpenAPI spec version: 1.0.0 * The version of the OpenAPI document: 1.0.0
* Contact: apiteam@swagger.io *
* *
* NOTE: This class is auto generated by the swagger code generator program. * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://github.com/swagger-api/swagger-codegen.git * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */

View File

@@ -1 +1 @@
4.0.0-SNAPSHOT 4.2.3-SNAPSHOT

View File

@@ -2,7 +2,7 @@
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
This Scala Play Framework project was generated by the OpenAPI generator tool at 2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]. This Scala Play Framework project was generated by the OpenAPI generator tool at 2020-01-04T23:10:22.106-05:00[America/New_York].
## API ## API

View File

@@ -4,7 +4,7 @@ import model.ApiResponse
import model.Pet import model.Pet
import play.api.libs.Files.TemporaryFile import play.api.libs.Files.TemporaryFile
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
trait PetApi { trait PetApi {
/** /**
* Add a new pet to the store * Add a new pet to the store

View File

@@ -8,7 +8,7 @@ import model.ApiResponse
import model.Pet import model.Pet
import play.api.libs.Files.TemporaryFile import play.api.libs.Files.TemporaryFile
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
@Singleton @Singleton
class PetApiController @Inject()(cc: ControllerComponents, api: PetApi) extends AbstractController(cc) { class PetApiController @Inject()(cc: ControllerComponents, api: PetApi) extends AbstractController(cc) {
/** /**

View File

@@ -7,7 +7,7 @@ import play.api.libs.Files.TemporaryFile
/** /**
* Provides a default implementation for [[PetApi]]. * Provides a default implementation for [[PetApi]].
*/ */
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
class PetApiImpl extends PetApi { class PetApiImpl extends PetApi {
/** /**
* @inheritdoc * @inheritdoc

View File

@@ -2,7 +2,7 @@ package api
import model.Order import model.Order
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
trait StoreApi { trait StoreApi {
/** /**
* Delete purchase order by ID * Delete purchase order by ID

View File

@@ -6,7 +6,7 @@ import play.api.libs.json._
import play.api.mvc._ import play.api.mvc._
import model.Order import model.Order
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
@Singleton @Singleton
class StoreApiController @Inject()(cc: ControllerComponents, api: StoreApi) extends AbstractController(cc) { class StoreApiController @Inject()(cc: ControllerComponents, api: StoreApi) extends AbstractController(cc) {
/** /**

View File

@@ -5,7 +5,7 @@ import model.Order
/** /**
* Provides a default implementation for [[StoreApi]]. * Provides a default implementation for [[StoreApi]].
*/ */
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
class StoreApiImpl extends StoreApi { class StoreApiImpl extends StoreApi {
/** /**
* @inheritdoc * @inheritdoc

View File

@@ -2,7 +2,7 @@ package api
import model.User import model.User
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
trait UserApi { trait UserApi {
/** /**
* Create user * Create user

View File

@@ -6,7 +6,7 @@ import play.api.libs.json._
import play.api.mvc._ import play.api.mvc._
import model.User import model.User
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
@Singleton @Singleton
class UserApiController @Inject()(cc: ControllerComponents, api: UserApi) extends AbstractController(cc) { class UserApiController @Inject()(cc: ControllerComponents, api: UserApi) extends AbstractController(cc) {
/** /**

View File

@@ -5,7 +5,7 @@ import model.User
/** /**
* Provides a default implementation for [[UserApi]]. * Provides a default implementation for [[UserApi]].
*/ */
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
class UserApiImpl extends UserApi { class UserApiImpl extends UserApi {
/** /**
* @inheritdoc * @inheritdoc

View File

@@ -5,7 +5,7 @@ import play.api.libs.json._
/** /**
* Describes the result of uploading an image resource * Describes the result of uploading an image resource
*/ */
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
case class ApiResponse( case class ApiResponse(
code: Option[Int], code: Option[Int],
`type`: Option[String], `type`: Option[String],

View File

@@ -5,7 +5,7 @@ import play.api.libs.json._
/** /**
* A category for a pet * A category for a pet
*/ */
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
case class Category( case class Category(
id: Option[Long], id: Option[Long],
name: Option[String] name: Option[String]

View File

@@ -7,7 +7,7 @@ import java.time.OffsetDateTime
* An order for a pets from the pet store * An order for a pets from the pet store
* @param status Order Status * @param status Order Status
*/ */
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
case class Order( case class Order(
id: Option[Long], id: Option[Long],
petId: Option[Long], petId: Option[Long],

View File

@@ -6,7 +6,7 @@ import play.api.libs.json._
* A pet for sale in the pet store * A pet for sale in the pet store
* @param status pet status in the store * @param status pet status in the store
*/ */
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
case class Pet( case class Pet(
id: Option[Long], id: Option[Long],
category: Option[Category], category: Option[Category],

View File

@@ -5,7 +5,7 @@ import play.api.libs.json._
/** /**
* A tag for a pet * A tag for a pet
*/ */
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
case class Tag( case class Tag(
id: Option[Long], id: Option[Long],
name: Option[String] name: Option[String]

View File

@@ -6,7 +6,7 @@ import play.api.libs.json._
* A User who is purchasing from the pet store * A User who is purchasing from the pet store
* @param userStatus User Status * @param userStatus User Status
*/ */
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
case class User( case class User(
id: Option[Long], id: Option[Long],
username: Option[String], username: Option[String],

View File

@@ -4,7 +4,7 @@ import api._
import play.api.inject.{Binding, Module => PlayModule} import play.api.inject.{Binding, Module => PlayModule}
import play.api.{Configuration, Environment} import play.api.{Configuration, Environment}
@javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2019-03-26T16:21:58.590+08:00[Asia/Hong_Kong]") @javax.annotation.Generated(value = Array("org.openapitools.codegen.languages.ScalaPlayFrameworkServerCodegen"), date = "2020-01-04T23:10:22.106-05:00[America/New_York]")
class Module extends PlayModule { class Module extends PlayModule {
override def bindings(environment: Environment, configuration: Configuration): Seq[Binding[_]] = Seq( override def bindings(environment: Environment, configuration: Configuration): Seq[Binding[_]] = Seq(
bind[PetApi].to[PetApiImpl], bind[PetApi].to[PetApiImpl],

File diff suppressed because it is too large Load Diff