Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/lagomScalaApi-petstore.sh → bin/scala-lagom-petstore.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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%
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -166,12 +166,12 @@ public CodegenType getTag() {

@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
Expand Down
1 change: 1 addition & 0 deletions pom.xml.circleci
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version := "1.0.0"

name := "scala-lagomApi"
name := "scala-lagom"

organization := "io.swagger"

Expand Down
29 changes: 29 additions & 0 deletions samples/server/petstore/scala-lagom/pom.xml
Original file line number Diff line number Diff line change
@@ -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 changes: 11 additions & 0 deletions samples/server/petstore/scala-lagom/sbt_test_jdk8_only.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion samples/server/petstore/scalatra/pom.xml
Original file line number Diff line number Diff line change
@@ -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>
Expand Down