forked from loafle/openapi-generator-original
[Scala][Lagom] minor enhancements (#7011)
* rename lagom scala, minor enhancements * add scala lagom to circle ci * test sala lagom with jdk8 only
This commit is contained in:
parent
5e76b22ae8
commit
573b5518be
2
bin/lagomScalaApi-petstore.sh → bin/scala-lagom-petstore.sh
Normal file → Executable file
2
bin/lagomScalaApi-petstore.sh → bin/scala-lagom-petstore.sh
Normal file → Executable file
@ -26,6 +26,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="$@ generate -t modules/swagger-codegen/src/main/resources/lagomScalaApi -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l scala-lagomApi -o samples/server/petstore/lagomScalaApi"
|
||||
ags="$@ generate -t modules/swagger-codegen/src/main/resources/scala-lagom -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l scala-lagom -o samples/server/petstore/scala-lagom"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
@ -5,6 +5,6 @@ If Not Exist %executable% (
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -l scala-lagomApi -o samples\server\petstore\scala-lagomApi
|
||||
set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.yaml -l scala-lagom -o samples\server\petstore\scala-lagom
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
@ -10,15 +10,15 @@ public class ScalaLagomServerCodegen extends AbstractScalaCodegen implements Cod
|
||||
private String authScheme = "";
|
||||
private boolean authPreemptive=false;
|
||||
protected String groupId = "io.swagger";
|
||||
protected String artifactId = "scala-lagomApi";
|
||||
protected String artifactId = "scala-lagom";
|
||||
protected String artifactVersion = "1.0.0";
|
||||
|
||||
public ScalaLagomServerCodegen() {
|
||||
super();
|
||||
outputFolder = "generated-code/scala-lagomApi";
|
||||
outputFolder = "generated-code/scala-lagom";
|
||||
modelTemplateFiles.put("model.mustache", ".scala");
|
||||
apiTemplateFiles.put("api.mustache", ".scala");
|
||||
embeddedTemplateDir = templateDir = "lagomScalaApi";
|
||||
embeddedTemplateDir = templateDir = "scala-lagom";
|
||||
apiPackage = "io.swagger.client.api";
|
||||
modelPackage = "io.swagger.client.model";
|
||||
|
||||
@ -166,12 +166,12 @@ public class ScalaLagomServerCodegen extends AbstractScalaCodegen implements Cod
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "scala-lagomApi";
|
||||
return "scala-lagom";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHelp() {
|
||||
return "Generates a Lagom API in scala";
|
||||
return "Generates a Lagom API (Beta) in scala";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -866,6 +866,7 @@
|
||||
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
|
||||
<module>samples/server/petstore/java-msf4j</module>
|
||||
<module>samples/server/petstore/jaxrs-spec-interface</module>
|
||||
<module>samples/server/petstore/scala-lagom</module>
|
||||
</modules>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
@ -1,6 +1,6 @@
|
||||
version := "1.0.0"
|
||||
|
||||
name := "scala-lagomApi"
|
||||
name := "scala-lagom"
|
||||
|
||||
organization := "io.swagger"
|
||||
|
29
samples/server/petstore/scala-lagom/pom.xml
Normal file
29
samples/server/petstore/scala-lagom/pom.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>scala-lagom</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>Scala Lagom server</name>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.5.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sbt-test</id>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>./sbt_test_jdk8_only.sh</executable>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
11
samples/server/petstore/scala-lagom/sbt_test_jdk8_only.sh
Executable file
11
samples/server/petstore/scala-lagom/sbt_test_jdk8_only.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
java -version 2>&1 | grep "java version \"1.8"
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "Running JDK8"
|
||||
sbt test
|
||||
else
|
||||
echo "Not running JDK8"
|
||||
fi
|
@ -1,6 +1,6 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.wordnik</groupId>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>scalatra-server</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
Loading…
x
Reference in New Issue
Block a user