-
-
Save dansiviter/5b9ce0d60134d6c074fb6ec7bac42dab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sandbox; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.core.MediaType; | |
import org.eclipse.microprofile.openapi.annotations.responses.APIResponse; | |
@Path("/") | |
public class MyResource { | |
@GET | |
@Produces(MediaType.TEXT_PLAIN) | |
@APIResponse(responseCode = "200", description = "It did something!") | |
public String get() { | |
return "It worked!"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>acme</groupId> | |
<artifactId>sandbox</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>war</packaging> | |
<properties> | |
<maven.compiler.source>1.8</maven.compiler.source> | |
<maven.compiler.target>1.8</maven.compiler.target> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |
<failOnMissingWebXml>false</failOnMissingWebXml> | |
<wildfly.swarm.version>2018.3.3</wildfly.swarm.version> | |
</properties> | |
<dependencyManagement> | |
<dependencies> | |
<dependency> | |
<groupId>org.wildfly.swarm</groupId> | |
<artifactId>bom-all</artifactId> | |
<version>${wildfly.swarm.version}</version> | |
<type>pom</type> | |
<scope>import</scope> | |
</dependency> | |
</dependencies> | |
</dependencyManagement> | |
<dependencies> | |
<dependency> | |
<groupId>org.wildfly.swarm</groupId> | |
<artifactId>jaxrs</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>org.wildfly.swarm</groupId> | |
<artifactId>cdi</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>org.wildfly.swarm</groupId> | |
<artifactId>microprofile-openapi</artifactId> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.wildfly.swarm</groupId> | |
<artifactId>wildfly-swarm-plugin</artifactId> | |
<version>${wildfly.swarm.version}</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>package</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment