mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
Fix missing media type
This commit is contained in:
@@ -15,6 +15,7 @@ public class VndMediaType {
|
|||||||
public static final String PLAIN_TEXT_PREFIX = "text/" + SUBTYPE_PREFIX;
|
public static final String PLAIN_TEXT_PREFIX = "text/" + SUBTYPE_PREFIX;
|
||||||
public static final String PLAIN_TEXT_SUFFIX = "+plain;v=" + VERSION;
|
public static final String PLAIN_TEXT_SUFFIX = "+plain;v=" + VERSION;
|
||||||
|
|
||||||
|
public static final String INDEX = PREFIX + "index" + SUFFIX;
|
||||||
public static final String USER = PREFIX + "user" + SUFFIX;
|
public static final String USER = PREFIX + "user" + SUFFIX;
|
||||||
public static final String GROUP = PREFIX + "group" + SUFFIX;
|
public static final String GROUP = PREFIX + "group" + SUFFIX;
|
||||||
public static final String REPOSITORY = PREFIX + "repository" + SUFFIX;
|
public static final String REPOSITORY = PREFIX + "repository" + SUFFIX;
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
package sonia.scm.api.v2.resources;
|
package sonia.scm.api.v2.resources;
|
||||||
|
|
||||||
|
import com.webcohesion.enunciate.metadata.rs.TypeHint;
|
||||||
|
import sonia.scm.web.VndMediaType;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.ws.rs.GET;
|
import javax.ws.rs.GET;
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
|
||||||
@Path(IndexResource.INDEX_PATH_V2)
|
@Path(IndexResource.INDEX_PATH_V2)
|
||||||
public class IndexResource {
|
public class IndexResource {
|
||||||
@@ -16,6 +20,8 @@ public class IndexResource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
|
@Produces(VndMediaType.INDEX)
|
||||||
|
@TypeHint(IndexDto.class)
|
||||||
public IndexDto getIndex() {
|
public IndexDto getIndex() {
|
||||||
return indexDtoGenerator.generate();
|
return indexDtoGenerator.generate();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user