X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-docgen%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frest%2Fdoc%2Fapi%2FApiDocService.java;fp=opendaylight%2Fmd-sal%2Fsal-rest-docgen%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frest%2Fdoc%2Fapi%2FApiDocService.java;h=0000000000000000000000000000000000000000;hb=89b8b59cd26fd4810293ff14386eb29a71da9fac;hp=2646a6a245210d51198570b4dac8797b45be0a4a;hpb=9ba2b4eca79bcc0e78099b133296801c8d45a6c4;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-docgen/src/main/java/org/opendaylight/controller/sal/rest/doc/api/ApiDocService.java b/opendaylight/md-sal/sal-rest-docgen/src/main/java/org/opendaylight/controller/sal/rest/doc/api/ApiDocService.java deleted file mode 100644 index 2646a6a245..0000000000 --- a/opendaylight/md-sal/sal-rest-docgen/src/main/java/org/opendaylight/controller/sal/rest/doc/api/ApiDocService.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.sal.rest.doc.api; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - -/** - * This service generates swagger (See https://helloreverb.com/developers/swagger) compliant documentation for - * RESTCONF APIs. The output of this is used by embedded Swagger UI. - */ -@Path("/") -public interface ApiDocService { - - /** - * Generates index document for Swagger UI. This document lists out all - * modules with link to get APIs for each module. The API for each module is - * served by getDocByModule() method. - * - * @param uriInfo - * @return - */ - @GET - @Produces(MediaType.APPLICATION_JSON) - public Response getRootDoc(@Context javax.ws.rs.core.UriInfo uriInfo); - - /** - * Generates Swagger compliant document listing APIs for module. - * - * @param module - * @param revision - * @param uriInfo - * @return - */ - @GET - @Path("/{module}({revision})") - @Produces(MediaType.APPLICATION_JSON) - public Response getDocByModule(@PathParam("module") String module, - @PathParam("revision") String revision, @Context javax.ws.rs.core.UriInfo uriInfo); - - /** - * Redirects to embedded swagger ui. - * - * @param uriInfo - * @return - */ - @GET - @Path("/ui") - @Produces(MediaType.TEXT_HTML) - public Response getApiExplorer(@Context javax.ws.rs.core.UriInfo uriInfo); - - /** - * Generates index document for Swagger UI. This document lists out all - * modules with link to get APIs for each module. The API for each module is - * served by getDocByModule() method. - * - * @param uriInfo - * @return - */ - @GET - @Path("/mounts") - @Produces(MediaType.APPLICATION_JSON) - public Response getListOfMounts(@Context javax.ws.rs.core.UriInfo uriInfo); - - @GET - @Path("/mounts/{instance}") - @Produces(MediaType.APPLICATION_JSON) - public Response getMountRootDoc(@PathParam("instance") String instanceNum, - @Context javax.ws.rs.core.UriInfo uriInfo); - - /** - * Generates Swagger compliant document listing APIs for module. - * - * @param module - * @param revision - * @param uriInfo - * @return - */ - @GET - @Path("/mounts/{instance}/{module}({revision})") - @Produces(MediaType.APPLICATION_JSON) - public Response getMountDocByModule(@PathParam("instance") String instanceNum, - @PathParam("module") String module, @PathParam("revision") String revision, - @Context javax.ws.rs.core.UriInfo uriInfo); - -}