moved version to poststats-api
This commit is contained in:
5
pom.xml
5
pom.xml
@@ -31,6 +31,11 @@
|
|||||||
<artifactId>commons-csv</artifactId>
|
<artifactId>commons-csv</artifactId>
|
||||||
<version>1.5</version>
|
<version>1.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.webcohesion.enunciate</groupId>
|
||||||
|
<artifactId>enunciate-core-annotations</artifactId>
|
||||||
|
<version>2.14.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
|
@@ -1,32 +0,0 @@
|
|||||||
package com.poststats.golf.api;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import com.fasterxml.jackson.databind.node.TextNode;
|
|
||||||
import jakarta.enterprise.context.ApplicationScoped;
|
|
||||||
import jakarta.ws.rs.GET;
|
|
||||||
import jakarta.ws.rs.Path;
|
|
||||||
import jakarta.ws.rs.Produces;
|
|
||||||
import jakarta.ws.rs.core.MediaType;
|
|
||||||
|
|
||||||
@ApplicationScoped
|
|
||||||
@Path("/version")
|
|
||||||
public class VersionApi {
|
|
||||||
|
|
||||||
private ObjectMapper mapper = new ObjectMapper();
|
|
||||||
|
|
||||||
@GET
|
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
|
||||||
public String get() throws JsonProcessingException {
|
|
||||||
// FIXME make dynamic
|
|
||||||
return this.mapper.writeValueAsString(new TextNode("1.0"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GET
|
|
||||||
@Path("/pattern")
|
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
|
||||||
public String getRegexPattern() throws JsonProcessingException {
|
|
||||||
return this.mapper.writeValueAsString(new TextNode("[0-9]+\\.[0-9]+"));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,4 +0,0 @@
|
|||||||
/**
|
|
||||||
* Here is a description.
|
|
||||||
*/
|
|
||||||
package com.poststats.golf;
|
|
@@ -1,6 +1,7 @@
|
|||||||
package com.poststats.golf.api;
|
package com.poststats.golf.api;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.poststats.api.VersionApi;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
|
Reference in New Issue
Block a user