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

io.swagger.jaxrs.listing.AcceptHeaderApiListingResource Maven / Gradle / Ivy

There is a newer version: 1.6.14
Show newest version
package io.swagger.jaxrs.listing;

import io.swagger.annotations.ApiOperation;

import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.*;

/**
 * Created by rbolles on 2/15/16.
 */
@Path("/swagger")
public class AcceptHeaderApiListingResource extends BaseApiListingResource {

    @Context
    ServletContext context;

    @GET
    @Produces({MediaType.APPLICATION_JSON})
    @ApiOperation(value = "The swagger definition in JSON", hidden = true)
    public Response getListingJson(
            @Context Application app,
            @Context ServletConfig sc,
            @Context HttpHeaders headers,
            @Context UriInfo uriInfo) {
        return getListingJsonResponse(app, context, sc, headers, uriInfo);
    }

    @GET
    @Produces("application/yaml")
    @ApiOperation(value = "The swagger definition in YAML", hidden = true)
    public Response getListingYaml(
            @Context Application app,
            @Context ServletConfig sc,
            @Context HttpHeaders headers,
            @Context UriInfo uriInfo) {
        return getListingYamlResponse(app, context, sc, headers, uriInfo);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy