use of com.baremaps.model.LandingPage in project baremaps by baremaps.
the class RootResourceIntegrationTest method testRoot.
@Test
public void testRoot() {
LandingPage landingPage = target().path("").request().get(LandingPage.class);
assertEquals("Baremaps", landingPage.getTitle());
}
use of com.baremaps.model.LandingPage in project baremaps by baremaps.
the class RootResource method getLandingPage.
@Override
public Response getLandingPage() {
String address = uriInfo.getBaseUri().toString();
LandingPage landingPage = new LandingPage().title("Baremaps").description("Baremaps OGC API Landing Page").links(Arrays.asList(new Link().title("This document (landing page)").href(address).type("application/json").rel("self"), new Link().title("Conformance declaration").href(address + "conformance").type("application/json").rel("conformance"), new Link().title("API description").href(address + "api").type("application/json").rel("service-desc"), new Link().title("API description").href(address + "api").type("application/yaml").rel("service-desc"), new Link().title("API documentation").href(address + "swagger").type("text/html").rel("service-doc")));
return Response.ok().entity(landingPage).build();
}
Aggregations