mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 19:08:52 +00:00
added resource, method stub for generator options
This commit is contained in:
parent
b4146d3f9c
commit
dadc85b6fd
@ -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");
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user