Search in sources :

Example 1 with LandingPage

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());
}
Also used : LandingPage(com.baremaps.model.LandingPage) JerseyTest(org.glassfish.jersey.test.JerseyTest) Test(org.junit.Test)

Example 2 with LandingPage

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();
}
Also used : LandingPage(com.baremaps.model.LandingPage) Link(com.baremaps.model.Link)

Aggregations

LandingPage (com.baremaps.model.LandingPage)2 Link (com.baremaps.model.Link)1 JerseyTest (org.glassfish.jersey.test.JerseyTest)1 Test (org.junit.Test)1