All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.smoketurner.snowizard.application.resources.PingResource Maven / Gradle / Ivy

There is a newer version: 2.0.1
Show newest version
package com.smoketurner.snowizard.application.resources;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import io.dropwizard.jersey.caching.CacheControl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;

@Path("/ping")
@Api("ping")
public class PingResource {

    @GET
    @Produces(MediaType.TEXT_PLAIN)
    @CacheControl(mustRevalidate = true, noCache = true, noStore = true)
    @ApiOperation(value = "Ping", notes = "Pings the API service")
    @ApiResponses(value = { @ApiResponse(code = 200, message = "pong") })
    public Response ping() {
        return Response.ok("pong").type(MediaType.TEXT_PLAIN).build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy