added resource, method stub for generator options

This commit is contained in:
Tony Tam 2015-11-02 14:46:31 -08:00 committed by Nadezhda Makarkina
parent b4146d3f9c
commit dadc85b6fd
2 changed files with 25 additions and 0 deletions

View File

@ -20,10 +20,15 @@ import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class Generator {
static Logger LOGGER = LoggerFactory.getLogger(Generator.class);
public static Map<String, String> getOptions(String language) {
return null;
}
public enum Type {
CLIENT("client"),
SERVER("server");

View File

@ -89,6 +89,26 @@ public class SwaggerResource {
return Response.status(500).build();
}
}
@GET
@Path("/clients/{language}")
@ApiOperation(
value = "Returns options for a client library",
response = String.class,
responseContainer = "map",
tags = "clients")
public Response getClientOptions(
@Context HttpServletRequest request,
@ApiParam(value = "The target language for the client library", required = true) @PathParam("language") String language) throws Exception {
Map<String, String> opts = Generator.getOptions(language);
if (opts != null) {
return Response.ok().entity(opts).build();
} else {
return Response.status(404).build();
}
}
@GET
@Path("/clients")