mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 07:32:48 +00:00
Update java play framework samples OAS2 (#286)
* Regenerate play framework examples * Add 'samples.ci' for manual files and update scripts
This commit is contained in:
2
bin/java-play-framework-petstore-server-api-package-override.sh
Normal file → Executable file
2
bin/java-play-framework-petstore-server-api-package-override.sh
Normal file → Executable file
@@ -30,3 +30,5 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/
|
|||||||
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-api-package-override -DhideGenerationTimestamp=true,apiPackage=com.puppies.store.apis"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-api-package-override -DhideGenerationTimestamp=true,apiPackage=com.puppies.store.apis"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
cp samples.ci/server/petstore/java-play-framework-api-package-override/pom.xml samples/server/petstore/java-play-framework-api-package-override/pom.xml
|
||||||
@@ -30,3 +30,5 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/
|
|||||||
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-controller-only -DhideGenerationTimestamp=true,controllerOnly=true"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-controller-only -DhideGenerationTimestamp=true,controllerOnly=true"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
cp samples.ci/server/petstore/java-play-framework-controller-only/pom.xml samples/server/petstore/java-play-framework-controller-only/pom.xml
|
||||||
@@ -30,3 +30,5 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/
|
|||||||
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-fake-endpoints -DhideGenerationTimestamp=true"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-fake-endpoints -DhideGenerationTimestamp=true"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
cp samples.ci/server/petstore/java-play-framework-fake-endpoints/pom.xml samples/server/petstore/java-play-framework-fake-endpoints/pom.xml
|
||||||
@@ -30,3 +30,5 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/
|
|||||||
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-no-bean-validation -DhideGenerationTimestamp=true,useBeanValidation=false"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-no-bean-validation -DhideGenerationTimestamp=true,useBeanValidation=false"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
cp samples.ci/server/petstore/java-play-framework-no-bean-validation/pom.xml samples/server/petstore/java-play-framework-no-bean-validation/pom.xml
|
||||||
@@ -30,3 +30,5 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/
|
|||||||
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-no-exception-handling -DhideGenerationTimestamp=true,handleExceptions=false"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-no-exception-handling -DhideGenerationTimestamp=true,handleExceptions=false"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
cp samples.ci/server/petstore/java-play-framework-no-exception-handling/pom.xml samples/server/petstore/java-play-framework-no-exception-handling/pom.xml
|
||||||
@@ -30,3 +30,5 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/
|
|||||||
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-no-interface -DhideGenerationTimestamp=true,useInterfaces=false"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-no-interface -DhideGenerationTimestamp=true,useInterfaces=false"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
cp samples.ci/server/petstore/java-play-framework-no-interface/pom.xml samples/server/petstore/java-play-framework-no-interface/pom.xml
|
||||||
@@ -30,3 +30,5 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/
|
|||||||
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-no-swagger-ui -DhideGenerationTimestamp=true,useSwaggerUI=false"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-no-swagger-ui -DhideGenerationTimestamp=true,useSwaggerUI=false"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
cp samples.ci/server/petstore/java-play-framework-no-swagger-ui/pom.xml samples/server/petstore/java-play-framework-no-swagger-ui/pom.xml
|
||||||
@@ -30,3 +30,5 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/
|
|||||||
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-no-wrap-calls -DhideGenerationTimestamp=true,wrapCalls=false"
|
ags="$@ generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework-no-wrap-calls -DhideGenerationTimestamp=true,wrapCalls=false"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
cp samples.ci/server/petstore/java-play-framework-no-wrap-calls/pom.xml samples/server/petstore/java-play-framework-no-wrap-calls/pom.xml
|
||||||
@@ -30,3 +30,5 @@ export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/
|
|||||||
ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework -DhideGenerationTimestamp=true $@"
|
ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -l java-play-framework -o samples/server/petstore/java-play-framework -DhideGenerationTimestamp=true $@"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
|
||||||
|
cp samples.ci/server/petstore/java-play-framework/pom.xml samples/server/petstore/java-play-framework/pom.xml
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>PlayServerTests-api-package-override</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>Play Petstore Server</name>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.6.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>Play Test</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>sbt</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>test</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>PlayServerTests-controller-only</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>Play Petstore Server</name>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.6.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>Play Test</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>sbt</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>test</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>PlayServerTests-fake-endpoints</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>Play Petstore Server</name>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.6.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>Play Test</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>sbt</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>test</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>PlayServerTests-no-bean-validation</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>Play Petstore Server</name>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.6.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>Play Test</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>sbt</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>test</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>PlayServerTests-no-exception-handling</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>Play Petstore Server</name>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.6.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>Play Test</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>sbt</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>test</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>PlayServerTests-no-interface</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>Play Petstore Server</name>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.6.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>Play Test</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>sbt</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>test</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>PlayServerTests-no-swagger-ui</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>Play Petstore Server</name>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.6.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>Play Test</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>sbt</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>test</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>PlayServerTests-no-wrap-calls</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>Play Petstore Server</name>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.6.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>Play Test</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>sbt</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>test</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
46
samples.ci/server/petstore/java-play-framework/pom.xml
Normal file
46
samples.ci/server/petstore/java-play-framework/pom.xml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<project>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>PlayServerTests</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>Play Petstore Server</name>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.6.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>Play Test</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>sbt</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>test</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
# Swagger Codegen Ignore
|
# OpenAPI Generator Ignore
|
||||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||||
|
|
||||||
# Use this file to prevent files from being overwritten by the generator.
|
# Use this file to prevent files from being overwritten by the generator.
|
||||||
# The patterns follow closely to .gitignore or .dockerignore.
|
# The patterns follow closely to .gitignore or .dockerignore.
|
||||||
|
|
||||||
# As an example, the C# client generator defines ApiClient.cs.
|
# As an example, the C# client generator defines ApiClient.cs.
|
||||||
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||||
#ApiClient.cs
|
#ApiClient.cs
|
||||||
|
|
||||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.4.0-SNAPSHOT
|
3.0.0-SNAPSHOT
|
||||||
@@ -10,6 +10,6 @@ public class ApiDocController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Result api() {
|
public Result api() {
|
||||||
return redirect("/assets/lib/swagger-ui/index.html?/url=/assets/swagger.json");
|
return redirect("/assets/lib/swagger-ui/index.html?/url=/assets/openapi.json");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,17 +39,17 @@ public class PetApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result addPet() throws Exception {
|
public Result addPet() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodepet = request().body().asJson();
|
||||||
Pet body;
|
Pet pet;
|
||||||
if (nodebody != null) {
|
if (nodepet != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(pet);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||||
}
|
}
|
||||||
imp.addPet(body);
|
imp.addPet(pet);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,17 +126,17 @@ public class PetApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result updatePet() throws Exception {
|
public Result updatePet() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodepet = request().body().asJson();
|
||||||
Pet body;
|
Pet pet;
|
||||||
if (nodebody != null) {
|
if (nodepet != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(pet);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||||
}
|
}
|
||||||
imp.updatePet(body);
|
imp.updatePet(pet);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,14 +147,14 @@ public class PetApiController extends Controller {
|
|||||||
if (valuename != null) {
|
if (valuename != null) {
|
||||||
name = valuename;
|
name = valuename;
|
||||||
} else {
|
} else {
|
||||||
name = null;
|
name = "null";
|
||||||
}
|
}
|
||||||
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||||
String status;
|
String status;
|
||||||
if (valuestatus != null) {
|
if (valuestatus != null) {
|
||||||
status = valuestatus;
|
status = valuestatus;
|
||||||
} else {
|
} else {
|
||||||
status = null;
|
status = "null";
|
||||||
}
|
}
|
||||||
imp.updatePetWithForm(petId, name, status);
|
imp.updatePetWithForm(petId, name, status);
|
||||||
return ok();
|
return ok();
|
||||||
@@ -167,7 +167,7 @@ public class PetApiController extends Controller {
|
|||||||
if (valueadditionalMetadata != null) {
|
if (valueadditionalMetadata != null) {
|
||||||
additionalMetadata = valueadditionalMetadata;
|
additionalMetadata = valueadditionalMetadata;
|
||||||
} else {
|
} else {
|
||||||
additionalMetadata = null;
|
additionalMetadata = "null";
|
||||||
}
|
}
|
||||||
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
||||||
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
public class PetApiControllerImp implements PetApiControllerImpInterface {
|
public class PetApiControllerImp implements PetApiControllerImpInterface {
|
||||||
@Override
|
@Override
|
||||||
public void addPet(Pet body) throws Exception {
|
public void addPet(Pet pet) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ public class PetApiControllerImp implements PetApiControllerImpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updatePet(Pet body) throws Exception {
|
public void updatePet(Pet pet) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
@SuppressWarnings("RedundantThrows")
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface PetApiControllerImpInterface {
|
public interface PetApiControllerImpInterface {
|
||||||
void addPet(Pet body) throws Exception;
|
void addPet(Pet pet) throws Exception;
|
||||||
|
|
||||||
void deletePet(Long petId, String apiKey) throws Exception;
|
void deletePet(Long petId, String apiKey) throws Exception;
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ public interface PetApiControllerImpInterface {
|
|||||||
|
|
||||||
Pet getPetById(Long petId) throws Exception;
|
Pet getPetById(Long petId) throws Exception;
|
||||||
|
|
||||||
void updatePet(Pet body) throws Exception;
|
void updatePet(Pet pet) throws Exception;
|
||||||
|
|
||||||
void updatePetWithForm(Long petId, String name, String status) throws Exception;
|
void updatePetWithForm(Long petId, String name, String status) throws Exception;
|
||||||
|
|
||||||
|
|||||||
@@ -61,17 +61,17 @@ public class StoreApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result placeOrder() throws Exception {
|
public Result placeOrder() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeorder = request().body().asJson();
|
||||||
Order body;
|
Order order;
|
||||||
if (nodebody != null) {
|
if (nodeorder != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Order.class);
|
order = mapper.readValue(nodeorder.toString(), Order.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(order);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Order' parameter is required");
|
||||||
}
|
}
|
||||||
Order obj = imp.placeOrder(body);
|
Order obj = imp.placeOrder(order);
|
||||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||||
SwaggerUtils.validate(obj);
|
SwaggerUtils.validate(obj);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class StoreApiControllerImp implements StoreApiControllerImpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Order placeOrder(Order body) throws Exception {
|
public Order placeOrder(Order order) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
return new Order();
|
return new Order();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,6 @@ public interface StoreApiControllerImpInterface {
|
|||||||
|
|
||||||
Order getOrderById( @Min(1) @Max(5)Long orderId) throws Exception;
|
Order getOrderById( @Min(1) @Max(5)Long orderId) throws Exception;
|
||||||
|
|
||||||
Order placeOrder(Order body) throws Exception;
|
Order placeOrder(Order order) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,53 +38,53 @@ public class UserApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result createUser() throws Exception {
|
public Result createUser() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
User body;
|
User user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), User.class);
|
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(user);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
imp.createUser(body);
|
imp.createUser(user);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result createUsersWithArrayInput() throws Exception {
|
public Result createUsersWithArrayInput() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
List<User> body;
|
List<User> user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
for (User curItem : body) {
|
for (User curItem : user) {
|
||||||
SwaggerUtils.validate(curItem);
|
SwaggerUtils.validate(curItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
imp.createUsersWithArrayInput(body);
|
imp.createUsersWithArrayInput(user);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result createUsersWithListInput() throws Exception {
|
public Result createUsersWithListInput() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
List<User> body;
|
List<User> user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
for (User curItem : body) {
|
for (User curItem : user) {
|
||||||
SwaggerUtils.validate(curItem);
|
SwaggerUtils.validate(curItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
imp.createUsersWithListInput(body);
|
imp.createUsersWithListInput(user);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,17 +133,17 @@ public class UserApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result updateUser(String username) throws Exception {
|
public Result updateUser(String username) throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
User body;
|
User user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), User.class);
|
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(user);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
imp.updateUser(username, body);
|
imp.updateUser(username, user);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,17 +12,17 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
public class UserApiControllerImp implements UserApiControllerImpInterface {
|
public class UserApiControllerImp implements UserApiControllerImpInterface {
|
||||||
@Override
|
@Override
|
||||||
public void createUser(User body) throws Exception {
|
public void createUser(User user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createUsersWithArrayInput(List<User> body) throws Exception {
|
public void createUsersWithArrayInput(List<User> user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createUsersWithListInput(List<User> body) throws Exception {
|
public void createUsersWithListInput(List<User> user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ public class UserApiControllerImp implements UserApiControllerImpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateUser(String username, User body) throws Exception {
|
public void updateUser(String username, User user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
@SuppressWarnings("RedundantThrows")
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface UserApiControllerImpInterface {
|
public interface UserApiControllerImpInterface {
|
||||||
void createUser(User body) throws Exception;
|
void createUser(User user) throws Exception;
|
||||||
|
|
||||||
void createUsersWithArrayInput(List<User> body) throws Exception;
|
void createUsersWithArrayInput(List<User> user) throws Exception;
|
||||||
|
|
||||||
void createUsersWithListInput(List<User> body) throws Exception;
|
void createUsersWithListInput(List<User> user) throws Exception;
|
||||||
|
|
||||||
void deleteUser(String username) throws Exception;
|
void deleteUser(String username) throws Exception;
|
||||||
|
|
||||||
@@ -26,6 +26,6 @@ public interface UserApiControllerImpInterface {
|
|||||||
|
|
||||||
void logoutUser() throws Exception;
|
void logoutUser() throws Exception;
|
||||||
|
|
||||||
void updateUser(String username, User body) throws Exception;
|
void updateUser(String username, User user) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name := """swagger-java-playframework"""
|
name := """openapi-java-playframework"""
|
||||||
|
|
||||||
version := "1.0-SNAPSHOT"
|
version := "1.0-SNAPSHOT"
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
|||||||
# Swagger Codegen Ignore
|
# OpenAPI Generator Ignore
|
||||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||||
|
|
||||||
# Use this file to prevent files from being overwritten by the generator.
|
# Use this file to prevent files from being overwritten by the generator.
|
||||||
# The patterns follow closely to .gitignore or .dockerignore.
|
# The patterns follow closely to .gitignore or .dockerignore.
|
||||||
|
|
||||||
# As an example, the C# client generator defines ApiClient.cs.
|
# As an example, the C# client generator defines ApiClient.cs.
|
||||||
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||||
#ApiClient.cs
|
#ApiClient.cs
|
||||||
|
|
||||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.4.0-SNAPSHOT
|
3.0.0-SNAPSHOT
|
||||||
@@ -10,6 +10,6 @@ public class ApiDocController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Result api() {
|
public Result api() {
|
||||||
return redirect("/assets/lib/swagger-ui/index.html?/url=/assets/swagger.json");
|
return redirect("/assets/lib/swagger-ui/index.html?/url=/assets/openapi.json");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,18 +42,18 @@ public class PetApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public CompletionStage<Result> addPet() throws Exception {
|
public CompletionStage<Result> addPet() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodepet = request().body().asJson();
|
||||||
Pet body;
|
Pet pet;
|
||||||
if (nodebody != null) {
|
if (nodepet != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(pet);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||||
}
|
}
|
||||||
return CompletableFuture.supplyAsync(() -> {
|
return CompletableFuture.supplyAsync(() -> {
|
||||||
imp.addPet(body)
|
imp.addPet(pet)
|
||||||
return ok();
|
return ok();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -145,18 +145,18 @@ public class PetApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public CompletionStage<Result> updatePet() throws Exception {
|
public CompletionStage<Result> updatePet() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodepet = request().body().asJson();
|
||||||
Pet body;
|
Pet pet;
|
||||||
if (nodebody != null) {
|
if (nodepet != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(pet);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||||
}
|
}
|
||||||
return CompletableFuture.supplyAsync(() -> {
|
return CompletableFuture.supplyAsync(() -> {
|
||||||
imp.updatePet(body)
|
imp.updatePet(pet)
|
||||||
return ok();
|
return ok();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -168,14 +168,14 @@ public class PetApiController extends Controller {
|
|||||||
if (valuename != null) {
|
if (valuename != null) {
|
||||||
name = valuename;
|
name = valuename;
|
||||||
} else {
|
} else {
|
||||||
name = null;
|
name = "null";
|
||||||
}
|
}
|
||||||
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||||
String status;
|
String status;
|
||||||
if (valuestatus != null) {
|
if (valuestatus != null) {
|
||||||
status = valuestatus;
|
status = valuestatus;
|
||||||
} else {
|
} else {
|
||||||
status = null;
|
status = "null";
|
||||||
}
|
}
|
||||||
return CompletableFuture.supplyAsync(() -> {
|
return CompletableFuture.supplyAsync(() -> {
|
||||||
imp.updatePetWithForm(petId, name, status)
|
imp.updatePetWithForm(petId, name, status)
|
||||||
@@ -190,7 +190,7 @@ public class PetApiController extends Controller {
|
|||||||
if (valueadditionalMetadata != null) {
|
if (valueadditionalMetadata != null) {
|
||||||
additionalMetadata = valueadditionalMetadata;
|
additionalMetadata = valueadditionalMetadata;
|
||||||
} else {
|
} else {
|
||||||
additionalMetadata = null;
|
additionalMetadata = "null";
|
||||||
}
|
}
|
||||||
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
||||||
CompletionStage<ModelApiResponse> stage = imp.uploadFile(petId, additionalMetadata, file).thenApply(obj -> {
|
CompletionStage<ModelApiResponse> stage = imp.uploadFile(petId, additionalMetadata, file).thenApply(obj -> {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
public class PetApiControllerImp implements PetApiControllerImpInterface {
|
public class PetApiControllerImp implements PetApiControllerImpInterface {
|
||||||
@Override
|
@Override
|
||||||
public void addPet(Pet body) throws Exception {
|
public void addPet(Pet pet) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ public class PetApiControllerImp implements PetApiControllerImpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updatePet(Pet body) throws Exception {
|
public void updatePet(Pet pet) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
@SuppressWarnings("RedundantThrows")
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface PetApiControllerImpInterface {
|
public interface PetApiControllerImpInterface {
|
||||||
void addPet(Pet body) throws Exception;
|
void addPet(Pet pet) throws Exception;
|
||||||
|
|
||||||
void deletePet(Long petId, String apiKey) throws Exception;
|
void deletePet(Long petId, String apiKey) throws Exception;
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ public interface PetApiControllerImpInterface {
|
|||||||
|
|
||||||
CompletionStage<Pet> getPetById(Long petId) throws Exception;
|
CompletionStage<Pet> getPetById(Long petId) throws Exception;
|
||||||
|
|
||||||
void updatePet(Pet body) throws Exception;
|
void updatePet(Pet pet) throws Exception;
|
||||||
|
|
||||||
void updatePetWithForm(Long petId, String name, String status) throws Exception;
|
void updatePetWithForm(Long petId, String name, String status) throws Exception;
|
||||||
|
|
||||||
|
|||||||
@@ -74,17 +74,17 @@ public class StoreApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public CompletionStage<Result> placeOrder() throws Exception {
|
public CompletionStage<Result> placeOrder() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeorder = request().body().asJson();
|
||||||
Order body;
|
Order order;
|
||||||
if (nodebody != null) {
|
if (nodeorder != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Order.class);
|
order = mapper.readValue(nodeorder.toString(), Order.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(order);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Order' parameter is required");
|
||||||
}
|
}
|
||||||
CompletionStage<Order> stage = imp.placeOrder(body).thenApply(obj -> {
|
CompletionStage<Order> stage = imp.placeOrder(order).thenApply(obj -> {
|
||||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||||
SwaggerUtils.validate(obj);
|
SwaggerUtils.validate(obj);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class StoreApiControllerImp implements StoreApiControllerImpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CompletionStage<Order> placeOrder(Order body) throws Exception {
|
public CompletionStage<Order> placeOrder(Order order) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
return CompletableFuture.supplyAsync(() -> {
|
return CompletableFuture.supplyAsync(() -> {
|
||||||
return new Order();
|
return new Order();
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ public interface StoreApiControllerImpInterface {
|
|||||||
|
|
||||||
CompletionStage<Order> getOrderById( @Min(1) @Max(5)Long orderId) throws Exception;
|
CompletionStage<Order> getOrderById( @Min(1) @Max(5)Long orderId) throws Exception;
|
||||||
|
|
||||||
CompletionStage<Order> placeOrder(Order body) throws Exception;
|
CompletionStage<Order> placeOrder(Order order) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,58 +41,58 @@ public class UserApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public CompletionStage<Result> createUser() throws Exception {
|
public CompletionStage<Result> createUser() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
User body;
|
User user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), User.class);
|
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(user);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
return CompletableFuture.supplyAsync(() -> {
|
return CompletableFuture.supplyAsync(() -> {
|
||||||
imp.createUser(body)
|
imp.createUser(user)
|
||||||
return ok();
|
return ok();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public CompletionStage<Result> createUsersWithArrayInput() throws Exception {
|
public CompletionStage<Result> createUsersWithArrayInput() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
List<User> body;
|
List<User> user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
for (User curItem : body) {
|
for (User curItem : user) {
|
||||||
SwaggerUtils.validate(curItem);
|
SwaggerUtils.validate(curItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
return CompletableFuture.supplyAsync(() -> {
|
return CompletableFuture.supplyAsync(() -> {
|
||||||
imp.createUsersWithArrayInput(body)
|
imp.createUsersWithArrayInput(user)
|
||||||
return ok();
|
return ok();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public CompletionStage<Result> createUsersWithListInput() throws Exception {
|
public CompletionStage<Result> createUsersWithListInput() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
List<User> body;
|
List<User> user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
for (User curItem : body) {
|
for (User curItem : user) {
|
||||||
SwaggerUtils.validate(curItem);
|
SwaggerUtils.validate(curItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
return CompletableFuture.supplyAsync(() -> {
|
return CompletableFuture.supplyAsync(() -> {
|
||||||
imp.createUsersWithListInput(body)
|
imp.createUsersWithListInput(user)
|
||||||
return ok();
|
return ok();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -154,18 +154,18 @@ public class UserApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public CompletionStage<Result> updateUser(String username) throws Exception {
|
public CompletionStage<Result> updateUser(String username) throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
User body;
|
User user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), User.class);
|
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(user);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
return CompletableFuture.supplyAsync(() -> {
|
return CompletableFuture.supplyAsync(() -> {
|
||||||
imp.updateUser(username, body)
|
imp.updateUser(username, user)
|
||||||
return ok();
|
return ok();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,17 +12,17 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
public class UserApiControllerImp implements UserApiControllerImpInterface {
|
public class UserApiControllerImp implements UserApiControllerImpInterface {
|
||||||
@Override
|
@Override
|
||||||
public void createUser(User body) throws Exception {
|
public void createUser(User user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createUsersWithArrayInput(List<User> body) throws Exception {
|
public void createUsersWithArrayInput(List<User> user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createUsersWithListInput(List<User> body) throws Exception {
|
public void createUsersWithListInput(List<User> user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ public class UserApiControllerImp implements UserApiControllerImpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateUser(String username, User body) throws Exception {
|
public void updateUser(String username, User user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
@SuppressWarnings("RedundantThrows")
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface UserApiControllerImpInterface {
|
public interface UserApiControllerImpInterface {
|
||||||
void createUser(User body) throws Exception;
|
void createUser(User user) throws Exception;
|
||||||
|
|
||||||
void createUsersWithArrayInput(List<User> body) throws Exception;
|
void createUsersWithArrayInput(List<User> user) throws Exception;
|
||||||
|
|
||||||
void createUsersWithListInput(List<User> body) throws Exception;
|
void createUsersWithListInput(List<User> user) throws Exception;
|
||||||
|
|
||||||
void deleteUser(String username) throws Exception;
|
void deleteUser(String username) throws Exception;
|
||||||
|
|
||||||
@@ -28,6 +28,6 @@ public interface UserApiControllerImpInterface {
|
|||||||
|
|
||||||
void logoutUser() throws Exception;
|
void logoutUser() throws Exception;
|
||||||
|
|
||||||
void updateUser(String username, User body) throws Exception;
|
void updateUser(String username, User user) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name := """swagger-java-playframework"""
|
name := """openapi-java-playframework"""
|
||||||
|
|
||||||
version := "1.0-SNAPSHOT"
|
version := "1.0-SNAPSHOT"
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
|||||||
# Swagger Codegen Ignore
|
# OpenAPI Generator Ignore
|
||||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||||
|
|
||||||
# Use this file to prevent files from being overwritten by the generator.
|
# Use this file to prevent files from being overwritten by the generator.
|
||||||
# The patterns follow closely to .gitignore or .dockerignore.
|
# The patterns follow closely to .gitignore or .dockerignore.
|
||||||
|
|
||||||
# As an example, the C# client generator defines ApiClient.cs.
|
# As an example, the C# client generator defines ApiClient.cs.
|
||||||
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||||
#ApiClient.cs
|
#ApiClient.cs
|
||||||
|
|
||||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.4.0-SNAPSHOT
|
3.0.0-SNAPSHOT
|
||||||
@@ -10,6 +10,6 @@ public class ApiDocController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Result api() {
|
public Result api() {
|
||||||
return redirect("/assets/lib/swagger-ui/index.html?/url=/assets/swagger.json");
|
return redirect("/assets/lib/swagger-ui/index.html?/url=/assets/openapi.json");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,15 +37,15 @@ public class PetApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result addPet() throws Exception {
|
public Result addPet() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodepet = request().body().asJson();
|
||||||
Pet body;
|
Pet pet;
|
||||||
if (nodebody != null) {
|
if (nodepet != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(pet);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||||
}
|
}
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
@@ -103,15 +103,15 @@ public class PetApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result updatePet() throws Exception {
|
public Result updatePet() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodepet = request().body().asJson();
|
||||||
Pet body;
|
Pet pet;
|
||||||
if (nodebody != null) {
|
if (nodepet != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(pet);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||||
}
|
}
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
@@ -123,14 +123,14 @@ public class PetApiController extends Controller {
|
|||||||
if (valuename != null) {
|
if (valuename != null) {
|
||||||
name = valuename;
|
name = valuename;
|
||||||
} else {
|
} else {
|
||||||
name = null;
|
name = "null";
|
||||||
}
|
}
|
||||||
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||||
String status;
|
String status;
|
||||||
if (valuestatus != null) {
|
if (valuestatus != null) {
|
||||||
status = valuestatus;
|
status = valuestatus;
|
||||||
} else {
|
} else {
|
||||||
status = null;
|
status = "null";
|
||||||
}
|
}
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
@@ -142,7 +142,7 @@ public class PetApiController extends Controller {
|
|||||||
if (valueadditionalMetadata != null) {
|
if (valueadditionalMetadata != null) {
|
||||||
additionalMetadata = valueadditionalMetadata;
|
additionalMetadata = valueadditionalMetadata;
|
||||||
} else {
|
} else {
|
||||||
additionalMetadata = null;
|
additionalMetadata = "null";
|
||||||
}
|
}
|
||||||
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
||||||
return ok();
|
return ok();
|
||||||
|
|||||||
@@ -51,15 +51,15 @@ public class StoreApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result placeOrder() throws Exception {
|
public Result placeOrder() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeorder = request().body().asJson();
|
||||||
Order body;
|
Order order;
|
||||||
if (nodebody != null) {
|
if (nodeorder != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Order.class);
|
order = mapper.readValue(nodeorder.toString(), Order.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(order);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Order' parameter is required");
|
||||||
}
|
}
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,49 +36,49 @@ public class UserApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result createUser() throws Exception {
|
public Result createUser() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
User body;
|
User user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), User.class);
|
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(user);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result createUsersWithArrayInput() throws Exception {
|
public Result createUsersWithArrayInput() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
List<User> body;
|
List<User> user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
for (User curItem : body) {
|
for (User curItem : user) {
|
||||||
SwaggerUtils.validate(curItem);
|
SwaggerUtils.validate(curItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result createUsersWithListInput() throws Exception {
|
public Result createUsersWithListInput() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
List<User> body;
|
List<User> user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
for (User curItem : body) {
|
for (User curItem : user) {
|
||||||
SwaggerUtils.validate(curItem);
|
SwaggerUtils.validate(curItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
@@ -119,15 +119,15 @@ public class UserApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result updateUser(String username) throws Exception {
|
public Result updateUser(String username) throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
User body;
|
User user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), User.class);
|
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(user);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name := """swagger-java-playframework"""
|
name := """openapi-java-playframework"""
|
||||||
|
|
||||||
version := "1.0-SNAPSHOT"
|
version := "1.0-SNAPSHOT"
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
|||||||
# Swagger Codegen Ignore
|
# OpenAPI Generator Ignore
|
||||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||||
|
|
||||||
# Use this file to prevent files from being overwritten by the generator.
|
# Use this file to prevent files from being overwritten by the generator.
|
||||||
# The patterns follow closely to .gitignore or .dockerignore.
|
# The patterns follow closely to .gitignore or .dockerignore.
|
||||||
|
|
||||||
# As an example, the C# client generator defines ApiClient.cs.
|
# As an example, the C# client generator defines ApiClient.cs.
|
||||||
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||||
#ApiClient.cs
|
#ApiClient.cs
|
||||||
|
|
||||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.4.0-SNAPSHOT
|
3.0.0-SNAPSHOT
|
||||||
@@ -48,6 +48,42 @@ public class EnumTest {
|
|||||||
@JsonProperty("enum_string")
|
@JsonProperty("enum_string")
|
||||||
private EnumStringEnum enumString = null;
|
private EnumStringEnum enumString = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets or Sets enumStringRequired
|
||||||
|
*/
|
||||||
|
public enum EnumStringRequiredEnum {
|
||||||
|
UPPER("UPPER"),
|
||||||
|
|
||||||
|
LOWER("lower"),
|
||||||
|
|
||||||
|
EMPTY("");
|
||||||
|
|
||||||
|
private final String value;
|
||||||
|
|
||||||
|
EnumStringRequiredEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@JsonValue
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static EnumStringRequiredEnum fromValue(String text) {
|
||||||
|
for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(text)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("enum_string_required")
|
||||||
|
private EnumStringRequiredEnum enumStringRequired = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets or Sets enumInteger
|
* Gets or Sets enumInteger
|
||||||
*/
|
*/
|
||||||
@@ -136,6 +172,24 @@ public class EnumTest {
|
|||||||
this.enumString = enumString;
|
this.enumString = enumString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) {
|
||||||
|
this.enumStringRequired = enumStringRequired;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get enumStringRequired
|
||||||
|
* @return enumStringRequired
|
||||||
|
**/
|
||||||
|
@NotNull
|
||||||
|
public EnumStringRequiredEnum getEnumStringRequired() {
|
||||||
|
return enumStringRequired;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
|
||||||
|
this.enumStringRequired = enumStringRequired;
|
||||||
|
}
|
||||||
|
|
||||||
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
|
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
|
||||||
this.enumInteger = enumInteger;
|
this.enumInteger = enumInteger;
|
||||||
return this;
|
return this;
|
||||||
@@ -199,6 +253,7 @@ public class EnumTest {
|
|||||||
}
|
}
|
||||||
EnumTest enumTest = (EnumTest) o;
|
EnumTest enumTest = (EnumTest) o;
|
||||||
return Objects.equals(enumString, enumTest.enumString) &&
|
return Objects.equals(enumString, enumTest.enumString) &&
|
||||||
|
Objects.equals(enumStringRequired, enumTest.enumStringRequired) &&
|
||||||
Objects.equals(enumInteger, enumTest.enumInteger) &&
|
Objects.equals(enumInteger, enumTest.enumInteger) &&
|
||||||
Objects.equals(enumNumber, enumTest.enumNumber) &&
|
Objects.equals(enumNumber, enumTest.enumNumber) &&
|
||||||
Objects.equals(outerEnum, enumTest.outerEnum);
|
Objects.equals(outerEnum, enumTest.outerEnum);
|
||||||
@@ -206,7 +261,7 @@ public class EnumTest {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(enumString, enumInteger, enumNumber, outerEnum);
|
return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("StringBufferReplaceableByString")
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@@ -216,6 +271,7 @@ public class EnumTest {
|
|||||||
sb.append("class EnumTest {\n");
|
sb.append("class EnumTest {\n");
|
||||||
|
|
||||||
sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n");
|
sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n");
|
||||||
|
sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n");
|
||||||
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
|
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
|
||||||
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
|
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
|
||||||
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
|
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package apimodels;
|
package apimodels;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@@ -40,7 +41,7 @@ public class FormatTest {
|
|||||||
private byte[] _byte = null;
|
private byte[] _byte = null;
|
||||||
|
|
||||||
@JsonProperty("binary")
|
@JsonProperty("binary")
|
||||||
private byte[] binary = null;
|
private InputStream binary = null;
|
||||||
|
|
||||||
@JsonProperty("date")
|
@JsonProperty("date")
|
||||||
private LocalDate date = null;
|
private LocalDate date = null;
|
||||||
@@ -215,7 +216,7 @@ public class FormatTest {
|
|||||||
this._byte = _byte;
|
this._byte = _byte;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FormatTest binary(byte[] binary) {
|
public FormatTest binary(InputStream binary) {
|
||||||
this.binary = binary;
|
this.binary = binary;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -224,11 +225,12 @@ public class FormatTest {
|
|||||||
* Get binary
|
* Get binary
|
||||||
* @return binary
|
* @return binary
|
||||||
**/
|
**/
|
||||||
public byte[] getBinary() {
|
@Valid
|
||||||
|
public InputStream getBinary() {
|
||||||
return binary;
|
return binary;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBinary(byte[] binary) {
|
public void setBinary(InputStream binary) {
|
||||||
this.binary = binary;
|
this.binary = binary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ public class Model200Response {
|
|||||||
if (o == null || getClass() != o.getClass()) {
|
if (o == null || getClass() != o.getClass()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Model200Response _200Response = (Model200Response) o;
|
Model200Response _200response = (Model200Response) o;
|
||||||
return Objects.equals(name, _200Response.name) &&
|
return Objects.equals(name, _200response.name) &&
|
||||||
Objects.equals(propertyClass, _200Response.propertyClass);
|
Objects.equals(propertyClass, _200response.propertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class Name {
|
|||||||
private String property = null;
|
private String property = null;
|
||||||
|
|
||||||
@JsonProperty("123Number")
|
@JsonProperty("123Number")
|
||||||
private Integer _123Number = null;
|
private Integer _123number = null;
|
||||||
|
|
||||||
public Name name(Integer name) {
|
public Name name(Integer name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
@@ -75,21 +75,21 @@ public class Name {
|
|||||||
this.property = property;
|
this.property = property;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Name _123Number(Integer _123Number) {
|
public Name _123number(Integer _123number) {
|
||||||
this._123Number = _123Number;
|
this._123number = _123number;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get _123Number
|
* Get _123number
|
||||||
* @return _123Number
|
* @return _123number
|
||||||
**/
|
**/
|
||||||
public Integer get123Number() {
|
public Integer get123number() {
|
||||||
return _123Number;
|
return _123number;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set123Number(Integer _123Number) {
|
public void set123number(Integer _123number) {
|
||||||
this._123Number = _123Number;
|
this._123number = _123number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -105,12 +105,12 @@ public class Name {
|
|||||||
return Objects.equals(name, name.name) &&
|
return Objects.equals(name, name.name) &&
|
||||||
Objects.equals(snakeCase, name.snakeCase) &&
|
Objects.equals(snakeCase, name.snakeCase) &&
|
||||||
Objects.equals(property, name.property) &&
|
Objects.equals(property, name.property) &&
|
||||||
Objects.equals(_123Number, name._123Number);
|
Objects.equals(_123number, name._123number);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(name, snakeCase, property, _123Number);
|
return Objects.hash(name, snakeCase, property, _123number);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("StringBufferReplaceableByString")
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@@ -122,7 +122,7 @@ public class Name {
|
|||||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
|
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
|
||||||
sb.append(" property: ").append(toIndentedString(property)).append("\n");
|
sb.append(" property: ").append(toIndentedString(property)).append("\n");
|
||||||
sb.append(" _123Number: ").append(toIndentedString(_123Number)).append("\n");
|
sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,23 +12,23 @@ import javax.validation.constraints.*;
|
|||||||
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
|
||||||
public class SpecialModelName {
|
public class SpecialModelName {
|
||||||
@JsonProperty("$special[property.name]")
|
@JsonProperty("$special[property.name]")
|
||||||
private Long specialPropertyName = null;
|
private Long $specialPropertyName = null;
|
||||||
|
|
||||||
public SpecialModelName specialPropertyName(Long specialPropertyName) {
|
public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
|
||||||
this.specialPropertyName = specialPropertyName;
|
this.$specialPropertyName = $specialPropertyName;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get specialPropertyName
|
* Get $specialPropertyName
|
||||||
* @return specialPropertyName
|
* @return $specialPropertyName
|
||||||
**/
|
**/
|
||||||
public Long getSpecialPropertyName() {
|
public Long get$SpecialPropertyName() {
|
||||||
return specialPropertyName;
|
return $specialPropertyName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSpecialPropertyName(Long specialPropertyName) {
|
public void set$SpecialPropertyName(Long $specialPropertyName) {
|
||||||
this.specialPropertyName = specialPropertyName;
|
this.$specialPropertyName = $specialPropertyName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -40,13 +40,13 @@ public class SpecialModelName {
|
|||||||
if (o == null || getClass() != o.getClass()) {
|
if (o == null || getClass() != o.getClass()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SpecialModelName specialModelName = (SpecialModelName) o;
|
SpecialModelName $specialModelName = (SpecialModelName) o;
|
||||||
return Objects.equals(specialPropertyName, specialModelName.specialPropertyName);
|
return Objects.equals($specialPropertyName, $specialModelName.$specialPropertyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(specialPropertyName);
|
return Objects.hash($specialPropertyName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("StringBufferReplaceableByString")
|
@SuppressWarnings("StringBufferReplaceableByString")
|
||||||
@@ -55,7 +55,7 @@ public class SpecialModelName {
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("class SpecialModelName {\n");
|
sb.append("class SpecialModelName {\n");
|
||||||
|
|
||||||
sb.append(" specialPropertyName: ").append(toIndentedString(specialPropertyName)).append("\n");
|
sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,17 +37,17 @@ public class AnotherFakeApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result testSpecialTags() throws Exception {
|
public Result testSpecialTags() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeclient = request().body().asJson();
|
||||||
Client body;
|
Client client;
|
||||||
if (nodebody != null) {
|
if (nodeclient != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Client.class);
|
client = mapper.readValue(nodeclient.toString(), Client.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(client);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Client' parameter is required");
|
||||||
}
|
}
|
||||||
Client obj = imp.testSpecialTags(body);
|
Client obj = imp.testSpecialTags(client);
|
||||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||||
SwaggerUtils.validate(obj);
|
SwaggerUtils.validate(obj);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
public class AnotherFakeApiControllerImp implements AnotherFakeApiControllerImpInterface {
|
public class AnotherFakeApiControllerImp implements AnotherFakeApiControllerImpInterface {
|
||||||
@Override
|
@Override
|
||||||
public Client testSpecialTags(Client body) throws Exception {
|
public Client testSpecialTags(Client client) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
return new Client();
|
return new Client();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,6 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
@SuppressWarnings("RedundantThrows")
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface AnotherFakeApiControllerImpInterface {
|
public interface AnotherFakeApiControllerImpInterface {
|
||||||
Client testSpecialTags(Client body) throws Exception;
|
Client testSpecialTags(Client client) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,6 @@ public class ApiDocController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Result api() {
|
public Result api() {
|
||||||
return redirect("/assets/lib/swagger-ui/index.html?/url=/assets/swagger.json");
|
return redirect("/assets/lib/swagger-ui/index.html?/url=/assets/openapi.json");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,12 @@ package controllers;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import apimodels.Client;
|
import apimodels.Client;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.Map;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import apimodels.OuterComposite;
|
import apimodels.OuterComposite;
|
||||||
|
import apimodels.User;
|
||||||
|
|
||||||
import play.mvc.Controller;
|
import play.mvc.Controller;
|
||||||
import play.mvc.Result;
|
import play.mvc.Result;
|
||||||
@@ -58,17 +61,17 @@ public class FakeApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result fakeOuterCompositeSerialize() throws Exception {
|
public Result fakeOuterCompositeSerialize() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeouterComposite = request().body().asJson();
|
||||||
OuterComposite body;
|
OuterComposite outerComposite;
|
||||||
if (nodebody != null) {
|
if (nodeouterComposite != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), OuterComposite.class);
|
outerComposite = mapper.readValue(nodeouterComposite.toString(), OuterComposite.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(outerComposite);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
body = null;
|
outerComposite = null;
|
||||||
}
|
}
|
||||||
OuterComposite obj = imp.fakeOuterCompositeSerialize(body);
|
OuterComposite obj = imp.fakeOuterCompositeSerialize(outerComposite);
|
||||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||||
SwaggerUtils.validate(obj);
|
SwaggerUtils.validate(obj);
|
||||||
}
|
}
|
||||||
@@ -114,18 +117,41 @@ public class FakeApiController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result testClientModel() throws Exception {
|
public Result testBodyWithQueryParams() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
Client body;
|
User user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Client.class);
|
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(user);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
Client obj = imp.testClientModel(body);
|
String valuequery = request().getQueryString("query");
|
||||||
|
String query;
|
||||||
|
if (valuequery != null) {
|
||||||
|
query = valuequery;
|
||||||
|
} else {
|
||||||
|
throw new IllegalArgumentException("'query' parameter is required");
|
||||||
|
}
|
||||||
|
imp.testBodyWithQueryParams(query, user);
|
||||||
|
return ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiAction
|
||||||
|
public Result testClientModel() throws Exception {
|
||||||
|
JsonNode nodeclient = request().body().asJson();
|
||||||
|
Client client;
|
||||||
|
if (nodeclient != null) {
|
||||||
|
client = mapper.readValue(nodeclient.toString(), Client.class);
|
||||||
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
|
SwaggerUtils.validate(client);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new IllegalArgumentException("'Client' parameter is required");
|
||||||
|
}
|
||||||
|
Client obj = imp.testClientModel(client);
|
||||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||||
SwaggerUtils.validate(obj);
|
SwaggerUtils.validate(obj);
|
||||||
}
|
}
|
||||||
@@ -182,7 +208,7 @@ public class FakeApiController extends Controller {
|
|||||||
if (valuestring != null) {
|
if (valuestring != null) {
|
||||||
string = valuestring;
|
string = valuestring;
|
||||||
} else {
|
} else {
|
||||||
string = null;
|
string = "null";
|
||||||
}
|
}
|
||||||
String valuepatternWithoutDelimiter = (request().body().asMultipartFormData().asFormUrlEncoded().get("pattern_without_delimiter"))[0];
|
String valuepatternWithoutDelimiter = (request().body().asMultipartFormData().asFormUrlEncoded().get("pattern_without_delimiter"))[0];
|
||||||
String patternWithoutDelimiter;
|
String patternWithoutDelimiter;
|
||||||
@@ -198,13 +224,7 @@ public class FakeApiController extends Controller {
|
|||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'byte' parameter is required");
|
throw new IllegalArgumentException("'byte' parameter is required");
|
||||||
}
|
}
|
||||||
String valuebinary = (request().body().asMultipartFormData().asFormUrlEncoded().get("binary"))[0];
|
Http.MultipartFormData.FilePart binary = request().body().asMultipartFormData().getFile("binary");
|
||||||
byte[] binary;
|
|
||||||
if (valuebinary != null) {
|
|
||||||
binary = valuebinary.getBytes();
|
|
||||||
} else {
|
|
||||||
binary = null;
|
|
||||||
}
|
|
||||||
String valuedate = (request().body().asMultipartFormData().asFormUrlEncoded().get("date"))[0];
|
String valuedate = (request().body().asMultipartFormData().asFormUrlEncoded().get("date"))[0];
|
||||||
LocalDate date;
|
LocalDate date;
|
||||||
if (valuedate != null) {
|
if (valuedate != null) {
|
||||||
@@ -224,14 +244,14 @@ public class FakeApiController extends Controller {
|
|||||||
if (valuepassword != null) {
|
if (valuepassword != null) {
|
||||||
password = valuepassword;
|
password = valuepassword;
|
||||||
} else {
|
} else {
|
||||||
password = null;
|
password = "null";
|
||||||
}
|
}
|
||||||
String valueparamCallback = (request().body().asMultipartFormData().asFormUrlEncoded().get("callback"))[0];
|
String valueparamCallback = (request().body().asMultipartFormData().asFormUrlEncoded().get("callback"))[0];
|
||||||
String paramCallback;
|
String paramCallback;
|
||||||
if (valueparamCallback != null) {
|
if (valueparamCallback != null) {
|
||||||
paramCallback = valueparamCallback;
|
paramCallback = valueparamCallback;
|
||||||
} else {
|
} else {
|
||||||
paramCallback = null;
|
paramCallback = "null";
|
||||||
}
|
}
|
||||||
imp.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
imp.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||||
return ok();
|
return ok();
|
||||||
@@ -262,14 +282,19 @@ public class FakeApiController extends Controller {
|
|||||||
} else {
|
} else {
|
||||||
enumQueryInteger = null;
|
enumQueryInteger = null;
|
||||||
}
|
}
|
||||||
String[] enumFormStringArrayArray = request().body().asMultipartFormData().asFormUrlEncoded().get("enum_form_string_array");
|
String valueenumQueryDouble = request().getQueryString("enum_query_double");
|
||||||
List<String> enumFormStringArrayList = SwaggerUtils.parametersToList("csv", enumFormStringArrayArray);
|
Double enumQueryDouble;
|
||||||
List<String> enumFormStringArray = new ArrayList<String>();
|
if (valueenumQueryDouble != null) {
|
||||||
for (String curParam : enumFormStringArrayList) {
|
enumQueryDouble = Double.parseDouble(valueenumQueryDouble);
|
||||||
if (!curParam.isEmpty()) {
|
} else {
|
||||||
//noinspection UseBulkOperation
|
enumQueryDouble = null;
|
||||||
enumFormStringArray.add(curParam);
|
|
||||||
}
|
}
|
||||||
|
String valueenumFormStringArray = (request().body().asMultipartFormData().asFormUrlEncoded().get("enum_form_string_array"))[0];
|
||||||
|
List<String> enumFormStringArray;
|
||||||
|
if (valueenumFormStringArray != null) {
|
||||||
|
enumFormStringArray = valueenumFormStringArray;
|
||||||
|
} else {
|
||||||
|
enumFormStringArray = new ArrayList<>();
|
||||||
}
|
}
|
||||||
String valueenumFormString = (request().body().asMultipartFormData().asFormUrlEncoded().get("enum_form_string"))[0];
|
String valueenumFormString = (request().body().asMultipartFormData().asFormUrlEncoded().get("enum_form_string"))[0];
|
||||||
String enumFormString;
|
String enumFormString;
|
||||||
@@ -278,13 +303,6 @@ public class FakeApiController extends Controller {
|
|||||||
} else {
|
} else {
|
||||||
enumFormString = "-efg";
|
enumFormString = "-efg";
|
||||||
}
|
}
|
||||||
String valueenumQueryDouble = (request().body().asMultipartFormData().asFormUrlEncoded().get("enum_query_double"))[0];
|
|
||||||
Double enumQueryDouble;
|
|
||||||
if (valueenumQueryDouble != null) {
|
|
||||||
enumQueryDouble = Double.parseDouble(valueenumQueryDouble);
|
|
||||||
} else {
|
|
||||||
enumQueryDouble = null;
|
|
||||||
}
|
|
||||||
String[] enumHeaderStringArrayArray = request().headers().get("enum_header_string_array");
|
String[] enumHeaderStringArrayArray = request().headers().get("enum_header_string_array");
|
||||||
List<String> enumHeaderStringArrayList = SwaggerUtils.parametersToList("csv", enumHeaderStringArrayArray);
|
List<String> enumHeaderStringArrayList = SwaggerUtils.parametersToList("csv", enumHeaderStringArrayArray);
|
||||||
List<String> enumHeaderStringArray = new ArrayList<String>();
|
List<String> enumHeaderStringArray = new ArrayList<String>();
|
||||||
@@ -301,23 +319,25 @@ public class FakeApiController extends Controller {
|
|||||||
} else {
|
} else {
|
||||||
enumHeaderString = "-efg";
|
enumHeaderString = "-efg";
|
||||||
}
|
}
|
||||||
imp.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
|
imp.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result testInlineAdditionalProperties() throws Exception {
|
public Result testInlineAdditionalProperties() throws Exception {
|
||||||
JsonNode nodeparam = request().body().asJson();
|
JsonNode noderequestBody = request().body().asJson();
|
||||||
Object param;
|
String requestBody;
|
||||||
if (nodeparam != null) {
|
if (noderequestBody != null) {
|
||||||
param = mapper.readValue(nodeparam.toString(), Object.class);
|
requestBody = mapper.readValue(noderequestBody.toString(), new TypeReference<String>(){});
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(param);
|
for (Map.Entry<String, String> entry : requestBody.entrySet()) {
|
||||||
|
SwaggerUtils.validate(entry.getValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'param' parameter is required");
|
throw new IllegalArgumentException("'request_body' parameter is required");
|
||||||
}
|
}
|
||||||
imp.testInlineAdditionalProperties(param);
|
imp.testInlineAdditionalProperties(requestBody);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,12 @@ package controllers;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import apimodels.Client;
|
import apimodels.Client;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.Map;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import apimodels.OuterComposite;
|
import apimodels.OuterComposite;
|
||||||
|
import apimodels.User;
|
||||||
|
|
||||||
import play.mvc.Http;
|
import play.mvc.Http;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -21,7 +24,7 @@ public class FakeApiControllerImp implements FakeApiControllerImpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws Exception {
|
public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
return new OuterComposite();
|
return new OuterComposite();
|
||||||
}
|
}
|
||||||
@@ -39,23 +42,28 @@ public class FakeApiControllerImp implements FakeApiControllerImpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Client testClientModel(Client body) throws Exception {
|
public void testBodyWithQueryParams( @NotNull String query, User user) throws Exception {
|
||||||
|
//Do your magic!!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Client testClientModel(Client client) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
return new Client();
|
return new Client();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws Exception {
|
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, Http.MultipartFormData.FilePart binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void testEnumParameters(List<String> enumFormStringArray, String enumFormString, List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws Exception {
|
public void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void testInlineAdditionalProperties(Object param) throws Exception {
|
public void testInlineAdditionalProperties(String requestBody) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,12 @@ package controllers;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import apimodels.Client;
|
import apimodels.Client;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.util.Map;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import apimodels.OuterComposite;
|
import apimodels.OuterComposite;
|
||||||
|
import apimodels.User;
|
||||||
|
|
||||||
import play.mvc.Http;
|
import play.mvc.Http;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -17,19 +20,21 @@ import javax.validation.constraints.*;
|
|||||||
public interface FakeApiControllerImpInterface {
|
public interface FakeApiControllerImpInterface {
|
||||||
Boolean fakeOuterBooleanSerialize(Boolean body) throws Exception;
|
Boolean fakeOuterBooleanSerialize(Boolean body) throws Exception;
|
||||||
|
|
||||||
OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws Exception;
|
OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws Exception;
|
||||||
|
|
||||||
BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws Exception;
|
BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws Exception;
|
||||||
|
|
||||||
String fakeOuterStringSerialize(String body) throws Exception;
|
String fakeOuterStringSerialize(String body) throws Exception;
|
||||||
|
|
||||||
Client testClientModel(Client body) throws Exception;
|
void testBodyWithQueryParams( @NotNull String query, User user) throws Exception;
|
||||||
|
|
||||||
void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, byte[] binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws Exception;
|
Client testClientModel(Client client) throws Exception;
|
||||||
|
|
||||||
void testEnumParameters(List<String> enumFormStringArray, String enumFormString, List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws Exception;
|
void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, Http.MultipartFormData.FilePart binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws Exception;
|
||||||
|
|
||||||
void testInlineAdditionalProperties(Object param) throws Exception;
|
void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws Exception;
|
||||||
|
|
||||||
|
void testInlineAdditionalProperties(String requestBody) throws Exception;
|
||||||
|
|
||||||
void testJsonFormData(String param, String param2) throws Exception;
|
void testJsonFormData(String param, String param2) throws Exception;
|
||||||
|
|
||||||
|
|||||||
@@ -37,17 +37,17 @@ public class FakeClassnameTags123ApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result testClassname() throws Exception {
|
public Result testClassname() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeclient = request().body().asJson();
|
||||||
Client body;
|
Client client;
|
||||||
if (nodebody != null) {
|
if (nodeclient != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Client.class);
|
client = mapper.readValue(nodeclient.toString(), Client.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(client);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Client' parameter is required");
|
||||||
}
|
}
|
||||||
Client obj = imp.testClassname(body);
|
Client obj = imp.testClassname(client);
|
||||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||||
SwaggerUtils.validate(obj);
|
SwaggerUtils.validate(obj);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
public class FakeClassnameTags123ApiControllerImp implements FakeClassnameTags123ApiControllerImpInterface {
|
public class FakeClassnameTags123ApiControllerImp implements FakeClassnameTags123ApiControllerImpInterface {
|
||||||
@Override
|
@Override
|
||||||
public Client testClassname(Client body) throws Exception {
|
public Client testClassname(Client client) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
return new Client();
|
return new Client();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,6 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
@SuppressWarnings("RedundantThrows")
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface FakeClassnameTags123ApiControllerImpInterface {
|
public interface FakeClassnameTags123ApiControllerImpInterface {
|
||||||
Client testClassname(Client body) throws Exception;
|
Client testClassname(Client client) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,17 +39,17 @@ public class PetApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result addPet() throws Exception {
|
public Result addPet() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodepet = request().body().asJson();
|
||||||
Pet body;
|
Pet pet;
|
||||||
if (nodebody != null) {
|
if (nodepet != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(pet);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||||
}
|
}
|
||||||
imp.addPet(body);
|
imp.addPet(pet);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,17 +126,17 @@ public class PetApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result updatePet() throws Exception {
|
public Result updatePet() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodepet = request().body().asJson();
|
||||||
Pet body;
|
Pet pet;
|
||||||
if (nodebody != null) {
|
if (nodepet != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(pet);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||||
}
|
}
|
||||||
imp.updatePet(body);
|
imp.updatePet(pet);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,14 +147,14 @@ public class PetApiController extends Controller {
|
|||||||
if (valuename != null) {
|
if (valuename != null) {
|
||||||
name = valuename;
|
name = valuename;
|
||||||
} else {
|
} else {
|
||||||
name = null;
|
name = "null";
|
||||||
}
|
}
|
||||||
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||||
String status;
|
String status;
|
||||||
if (valuestatus != null) {
|
if (valuestatus != null) {
|
||||||
status = valuestatus;
|
status = valuestatus;
|
||||||
} else {
|
} else {
|
||||||
status = null;
|
status = "null";
|
||||||
}
|
}
|
||||||
imp.updatePetWithForm(petId, name, status);
|
imp.updatePetWithForm(petId, name, status);
|
||||||
return ok();
|
return ok();
|
||||||
@@ -167,7 +167,7 @@ public class PetApiController extends Controller {
|
|||||||
if (valueadditionalMetadata != null) {
|
if (valueadditionalMetadata != null) {
|
||||||
additionalMetadata = valueadditionalMetadata;
|
additionalMetadata = valueadditionalMetadata;
|
||||||
} else {
|
} else {
|
||||||
additionalMetadata = null;
|
additionalMetadata = "null";
|
||||||
}
|
}
|
||||||
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
||||||
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
public class PetApiControllerImp implements PetApiControllerImpInterface {
|
public class PetApiControllerImp implements PetApiControllerImpInterface {
|
||||||
@Override
|
@Override
|
||||||
public void addPet(Pet body) throws Exception {
|
public void addPet(Pet pet) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ public class PetApiControllerImp implements PetApiControllerImpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updatePet(Pet body) throws Exception {
|
public void updatePet(Pet pet) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
@SuppressWarnings("RedundantThrows")
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface PetApiControllerImpInterface {
|
public interface PetApiControllerImpInterface {
|
||||||
void addPet(Pet body) throws Exception;
|
void addPet(Pet pet) throws Exception;
|
||||||
|
|
||||||
void deletePet(Long petId, String apiKey) throws Exception;
|
void deletePet(Long petId, String apiKey) throws Exception;
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ public interface PetApiControllerImpInterface {
|
|||||||
|
|
||||||
Pet getPetById(Long petId) throws Exception;
|
Pet getPetById(Long petId) throws Exception;
|
||||||
|
|
||||||
void updatePet(Pet body) throws Exception;
|
void updatePet(Pet pet) throws Exception;
|
||||||
|
|
||||||
void updatePetWithForm(Long petId, String name, String status) throws Exception;
|
void updatePetWithForm(Long petId, String name, String status) throws Exception;
|
||||||
|
|
||||||
|
|||||||
@@ -61,17 +61,17 @@ public class StoreApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result placeOrder() throws Exception {
|
public Result placeOrder() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeorder = request().body().asJson();
|
||||||
Order body;
|
Order order;
|
||||||
if (nodebody != null) {
|
if (nodeorder != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Order.class);
|
order = mapper.readValue(nodeorder.toString(), Order.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(order);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Order' parameter is required");
|
||||||
}
|
}
|
||||||
Order obj = imp.placeOrder(body);
|
Order obj = imp.placeOrder(order);
|
||||||
if (configuration.getBoolean("useOutputBeanValidation")) {
|
if (configuration.getBoolean("useOutputBeanValidation")) {
|
||||||
SwaggerUtils.validate(obj);
|
SwaggerUtils.validate(obj);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class StoreApiControllerImp implements StoreApiControllerImpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Order placeOrder(Order body) throws Exception {
|
public Order placeOrder(Order order) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
return new Order();
|
return new Order();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,6 @@ public interface StoreApiControllerImpInterface {
|
|||||||
|
|
||||||
Order getOrderById( @Min(1) @Max(5)Long orderId) throws Exception;
|
Order getOrderById( @Min(1) @Max(5)Long orderId) throws Exception;
|
||||||
|
|
||||||
Order placeOrder(Order body) throws Exception;
|
Order placeOrder(Order order) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,53 +38,53 @@ public class UserApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result createUser() throws Exception {
|
public Result createUser() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
User body;
|
User user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), User.class);
|
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(user);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
imp.createUser(body);
|
imp.createUser(user);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result createUsersWithArrayInput() throws Exception {
|
public Result createUsersWithArrayInput() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
List<User> body;
|
List<User> user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
for (User curItem : body) {
|
for (User curItem : user) {
|
||||||
SwaggerUtils.validate(curItem);
|
SwaggerUtils.validate(curItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
imp.createUsersWithArrayInput(body);
|
imp.createUsersWithArrayInput(user);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result createUsersWithListInput() throws Exception {
|
public Result createUsersWithListInput() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
List<User> body;
|
List<User> user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
for (User curItem : body) {
|
for (User curItem : user) {
|
||||||
SwaggerUtils.validate(curItem);
|
SwaggerUtils.validate(curItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
imp.createUsersWithListInput(body);
|
imp.createUsersWithListInput(user);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,17 +133,17 @@ public class UserApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result updateUser(String username) throws Exception {
|
public Result updateUser(String username) throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
User body;
|
User user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), User.class);
|
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||||
if (configuration.getBoolean("useInputBeanValidation")) {
|
if (configuration.getBoolean("useInputBeanValidation")) {
|
||||||
SwaggerUtils.validate(body);
|
SwaggerUtils.validate(user);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
imp.updateUser(username, body);
|
imp.updateUser(username, user);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,17 +12,17 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
public class UserApiControllerImp implements UserApiControllerImpInterface {
|
public class UserApiControllerImp implements UserApiControllerImpInterface {
|
||||||
@Override
|
@Override
|
||||||
public void createUser(User body) throws Exception {
|
public void createUser(User user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createUsersWithArrayInput(List<User> body) throws Exception {
|
public void createUsersWithArrayInput(List<User> user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createUsersWithListInput(List<User> body) throws Exception {
|
public void createUsersWithListInput(List<User> user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ public class UserApiControllerImp implements UserApiControllerImpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateUser(String username, User body) throws Exception {
|
public void updateUser(String username, User user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ import javax.validation.constraints.*;
|
|||||||
|
|
||||||
@SuppressWarnings("RedundantThrows")
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface UserApiControllerImpInterface {
|
public interface UserApiControllerImpInterface {
|
||||||
void createUser(User body) throws Exception;
|
void createUser(User user) throws Exception;
|
||||||
|
|
||||||
void createUsersWithArrayInput(List<User> body) throws Exception;
|
void createUsersWithArrayInput(List<User> user) throws Exception;
|
||||||
|
|
||||||
void createUsersWithListInput(List<User> body) throws Exception;
|
void createUsersWithListInput(List<User> user) throws Exception;
|
||||||
|
|
||||||
void deleteUser(String username) throws Exception;
|
void deleteUser(String username) throws Exception;
|
||||||
|
|
||||||
@@ -26,6 +26,6 @@ public interface UserApiControllerImpInterface {
|
|||||||
|
|
||||||
void logoutUser() throws Exception;
|
void logoutUser() throws Exception;
|
||||||
|
|
||||||
void updateUser(String username, User body) throws Exception;
|
void updateUser(String username, User user) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name := """swagger-java-playframework"""
|
name := """openapi-java-playframework"""
|
||||||
|
|
||||||
version := "1.0-SNAPSHOT"
|
version := "1.0-SNAPSHOT"
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ POST /v2/fake/outer/boolean controllers.FakeApiControlle
|
|||||||
POST /v2/fake/outer/composite controllers.FakeApiController.fakeOuterCompositeSerialize()
|
POST /v2/fake/outer/composite controllers.FakeApiController.fakeOuterCompositeSerialize()
|
||||||
POST /v2/fake/outer/number controllers.FakeApiController.fakeOuterNumberSerialize()
|
POST /v2/fake/outer/number controllers.FakeApiController.fakeOuterNumberSerialize()
|
||||||
POST /v2/fake/outer/string controllers.FakeApiController.fakeOuterStringSerialize()
|
POST /v2/fake/outer/string controllers.FakeApiController.fakeOuterStringSerialize()
|
||||||
|
PUT /v2/fake/body-with-query-params controllers.FakeApiController.testBodyWithQueryParams()
|
||||||
PATCH /v2/fake controllers.FakeApiController.testClientModel()
|
PATCH /v2/fake controllers.FakeApiController.testClientModel()
|
||||||
POST /v2/fake controllers.FakeApiController.testEndpointParameters()
|
POST /v2/fake controllers.FakeApiController.testEndpointParameters()
|
||||||
GET /v2/fake controllers.FakeApiController.testEnumParameters()
|
GET /v2/fake controllers.FakeApiController.testEnumParameters()
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
|||||||
# Swagger Codegen Ignore
|
# OpenAPI Generator Ignore
|
||||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||||
|
|
||||||
# Use this file to prevent files from being overwritten by the generator.
|
# Use this file to prevent files from being overwritten by the generator.
|
||||||
# The patterns follow closely to .gitignore or .dockerignore.
|
# The patterns follow closely to .gitignore or .dockerignore.
|
||||||
|
|
||||||
# As an example, the C# client generator defines ApiClient.cs.
|
# As an example, the C# client generator defines ApiClient.cs.
|
||||||
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||||
#ApiClient.cs
|
#ApiClient.cs
|
||||||
|
|
||||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.4.0-SNAPSHOT
|
3.0.0-SNAPSHOT
|
||||||
@@ -10,6 +10,6 @@ public class ApiDocController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Result api() {
|
public Result api() {
|
||||||
return redirect("/assets/lib/swagger-ui/index.html?/url=/assets/swagger.json");
|
return redirect("/assets/lib/swagger-ui/index.html?/url=/assets/openapi.json");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,14 +35,14 @@ public class PetApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result addPet() throws Exception {
|
public Result addPet() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodepet = request().body().asJson();
|
||||||
Pet body;
|
Pet pet;
|
||||||
if (nodebody != null) {
|
if (nodepet != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||||
}
|
}
|
||||||
imp.addPet(body);
|
imp.addPet(pet);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,14 +106,14 @@ public class PetApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result updatePet() throws Exception {
|
public Result updatePet() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodepet = request().body().asJson();
|
||||||
Pet body;
|
Pet pet;
|
||||||
if (nodebody != null) {
|
if (nodepet != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Pet.class);
|
pet = mapper.readValue(nodepet.toString(), Pet.class);
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Pet' parameter is required");
|
||||||
}
|
}
|
||||||
imp.updatePet(body);
|
imp.updatePet(pet);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,14 +124,14 @@ public class PetApiController extends Controller {
|
|||||||
if (valuename != null) {
|
if (valuename != null) {
|
||||||
name = valuename;
|
name = valuename;
|
||||||
} else {
|
} else {
|
||||||
name = null;
|
name = "null";
|
||||||
}
|
}
|
||||||
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
String valuestatus = (request().body().asMultipartFormData().asFormUrlEncoded().get("status"))[0];
|
||||||
String status;
|
String status;
|
||||||
if (valuestatus != null) {
|
if (valuestatus != null) {
|
||||||
status = valuestatus;
|
status = valuestatus;
|
||||||
} else {
|
} else {
|
||||||
status = null;
|
status = "null";
|
||||||
}
|
}
|
||||||
imp.updatePetWithForm(petId, name, status);
|
imp.updatePetWithForm(petId, name, status);
|
||||||
return ok();
|
return ok();
|
||||||
@@ -144,7 +144,7 @@ public class PetApiController extends Controller {
|
|||||||
if (valueadditionalMetadata != null) {
|
if (valueadditionalMetadata != null) {
|
||||||
additionalMetadata = valueadditionalMetadata;
|
additionalMetadata = valueadditionalMetadata;
|
||||||
} else {
|
} else {
|
||||||
additionalMetadata = null;
|
additionalMetadata = "null";
|
||||||
}
|
}
|
||||||
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
Http.MultipartFormData.FilePart file = request().body().asMultipartFormData().getFile("file");
|
||||||
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
ModelApiResponse obj = imp.uploadFile(petId, additionalMetadata, file);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.io.FileInputStream;
|
|||||||
|
|
||||||
public class PetApiControllerImp implements PetApiControllerImpInterface {
|
public class PetApiControllerImp implements PetApiControllerImpInterface {
|
||||||
@Override
|
@Override
|
||||||
public void addPet(Pet body) throws Exception {
|
public void addPet(Pet pet) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ public class PetApiControllerImp implements PetApiControllerImpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updatePet(Pet body) throws Exception {
|
public void updatePet(Pet pet) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
@SuppressWarnings("RedundantThrows")
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface PetApiControllerImpInterface {
|
public interface PetApiControllerImpInterface {
|
||||||
void addPet(Pet body) throws Exception;
|
void addPet(Pet pet) throws Exception;
|
||||||
|
|
||||||
void deletePet(Long petId, String apiKey) throws Exception;
|
void deletePet(Long petId, String apiKey) throws Exception;
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ public interface PetApiControllerImpInterface {
|
|||||||
|
|
||||||
Pet getPetById(Long petId) throws Exception;
|
Pet getPetById(Long petId) throws Exception;
|
||||||
|
|
||||||
void updatePet(Pet body) throws Exception;
|
void updatePet(Pet pet) throws Exception;
|
||||||
|
|
||||||
void updatePetWithForm(Long petId, String name, String status) throws Exception;
|
void updatePetWithForm(Long petId, String name, String status) throws Exception;
|
||||||
|
|
||||||
|
|||||||
@@ -54,14 +54,14 @@ public class StoreApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result placeOrder() throws Exception {
|
public Result placeOrder() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeorder = request().body().asJson();
|
||||||
Order body;
|
Order order;
|
||||||
if (nodebody != null) {
|
if (nodeorder != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), Order.class);
|
order = mapper.readValue(nodeorder.toString(), Order.class);
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'Order' parameter is required");
|
||||||
}
|
}
|
||||||
Order obj = imp.placeOrder(body);
|
Order obj = imp.placeOrder(order);
|
||||||
JsonNode result = mapper.valueToTree(obj);
|
JsonNode result = mapper.valueToTree(obj);
|
||||||
return ok(result);
|
return ok(result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class StoreApiControllerImp implements StoreApiControllerImpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Order placeOrder(Order body) throws Exception {
|
public Order placeOrder(Order order) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
return new Order();
|
return new Order();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ public interface StoreApiControllerImpInterface {
|
|||||||
|
|
||||||
Order getOrderById(Long orderId) throws Exception;
|
Order getOrderById(Long orderId) throws Exception;
|
||||||
|
|
||||||
Order placeOrder(Order body) throws Exception;
|
Order placeOrder(Order order) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,40 +34,40 @@ public class UserApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result createUser() throws Exception {
|
public Result createUser() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
User body;
|
User user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), User.class);
|
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
imp.createUser(body);
|
imp.createUser(user);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result createUsersWithArrayInput() throws Exception {
|
public Result createUsersWithArrayInput() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
List<User> body;
|
List<User> user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
imp.createUsersWithArrayInput(body);
|
imp.createUsersWithArrayInput(user);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result createUsersWithListInput() throws Exception {
|
public Result createUsersWithListInput() throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
List<User> body;
|
List<User> user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), new TypeReference<List<User>>(){});
|
user = mapper.readValue(nodeuser.toString(), new TypeReference<List<User>>(){});
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
imp.createUsersWithListInput(body);
|
imp.createUsersWithListInput(user);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,14 +113,14 @@ public class UserApiController extends Controller {
|
|||||||
|
|
||||||
@ApiAction
|
@ApiAction
|
||||||
public Result updateUser(String username) throws Exception {
|
public Result updateUser(String username) throws Exception {
|
||||||
JsonNode nodebody = request().body().asJson();
|
JsonNode nodeuser = request().body().asJson();
|
||||||
User body;
|
User user;
|
||||||
if (nodebody != null) {
|
if (nodeuser != null) {
|
||||||
body = mapper.readValue(nodebody.toString(), User.class);
|
user = mapper.readValue(nodeuser.toString(), User.class);
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("'body' parameter is required");
|
throw new IllegalArgumentException("'User' parameter is required");
|
||||||
}
|
}
|
||||||
imp.updateUser(username, body);
|
imp.updateUser(username, user);
|
||||||
return ok();
|
return ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,17 +11,17 @@ import java.io.FileInputStream;
|
|||||||
|
|
||||||
public class UserApiControllerImp implements UserApiControllerImpInterface {
|
public class UserApiControllerImp implements UserApiControllerImpInterface {
|
||||||
@Override
|
@Override
|
||||||
public void createUser(User body) throws Exception {
|
public void createUser(User user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createUsersWithArrayInput(List<User> body) throws Exception {
|
public void createUsersWithArrayInput(List<User> user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void createUsersWithListInput(List<User> body) throws Exception {
|
public void createUsersWithListInput(List<User> user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ public class UserApiControllerImp implements UserApiControllerImpInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateUser(String username, User body) throws Exception {
|
public void updateUser(String username, User user) throws Exception {
|
||||||
//Do your magic!!!
|
//Do your magic!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ import java.util.HashMap;
|
|||||||
|
|
||||||
@SuppressWarnings("RedundantThrows")
|
@SuppressWarnings("RedundantThrows")
|
||||||
public interface UserApiControllerImpInterface {
|
public interface UserApiControllerImpInterface {
|
||||||
void createUser(User body) throws Exception;
|
void createUser(User user) throws Exception;
|
||||||
|
|
||||||
void createUsersWithArrayInput(List<User> body) throws Exception;
|
void createUsersWithArrayInput(List<User> user) throws Exception;
|
||||||
|
|
||||||
void createUsersWithListInput(List<User> body) throws Exception;
|
void createUsersWithListInput(List<User> user) throws Exception;
|
||||||
|
|
||||||
void deleteUser(String username) throws Exception;
|
void deleteUser(String username) throws Exception;
|
||||||
|
|
||||||
@@ -25,6 +25,6 @@ public interface UserApiControllerImpInterface {
|
|||||||
|
|
||||||
void logoutUser() throws Exception;
|
void logoutUser() throws Exception;
|
||||||
|
|
||||||
void updateUser(String username, User body) throws Exception;
|
void updateUser(String username, User user) throws Exception;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name := """swagger-java-playframework"""
|
name := """openapi-java-playframework"""
|
||||||
|
|
||||||
version := "1.0-SNAPSHOT"
|
version := "1.0-SNAPSHOT"
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
|||||||
# Swagger Codegen Ignore
|
# OpenAPI Generator Ignore
|
||||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||||
|
|
||||||
# Use this file to prevent files from being overwritten by the generator.
|
# Use this file to prevent files from being overwritten by the generator.
|
||||||
# The patterns follow closely to .gitignore or .dockerignore.
|
# The patterns follow closely to .gitignore or .dockerignore.
|
||||||
|
|
||||||
# As an example, the C# client generator defines ApiClient.cs.
|
# As an example, the C# client generator defines ApiClient.cs.
|
||||||
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||||
#ApiClient.cs
|
#ApiClient.cs
|
||||||
|
|
||||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.4.0-SNAPSHOT
|
3.0.0-SNAPSHOT
|
||||||
@@ -10,6 +10,6 @@ public class ApiDocController extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Result api() {
|
public Result api() {
|
||||||
return redirect("/assets/lib/swagger-ui/index.html?/url=/assets/swagger.json");
|
return redirect("/assets/lib/swagger-ui/index.html?/url=/assets/openapi.json");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user