forked from loafle/openapi-generator-original
added context path
This commit is contained in:
parent
fd792ef180
commit
ebec85fd54
@ -66,8 +66,10 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
|||||||
else
|
else
|
||||||
hostBuilder.append("https://");
|
hostBuilder.append("https://");
|
||||||
hostBuilder.append(swagger.getHost()).append(swagger.getBasePath());
|
hostBuilder.append(swagger.getHost()).append(swagger.getBasePath());
|
||||||
|
String contextPath = swagger.getBasePath();
|
||||||
String basePath = hostBuilder.toString();
|
String basePath = hostBuilder.toString();
|
||||||
|
|
||||||
|
|
||||||
List<Object> allOperations = new ArrayList<Object>();
|
List<Object> allOperations = new ArrayList<Object>();
|
||||||
List<Object> allModels = new ArrayList<Object>();
|
List<Object> allModels = new ArrayList<Object>();
|
||||||
|
|
||||||
@ -111,6 +113,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
|||||||
List<CodegenOperation> ops = paths.get(tag);
|
List<CodegenOperation> ops = paths.get(tag);
|
||||||
Map<String, Object> operation = processOperations(config, tag, ops);
|
Map<String, Object> operation = processOperations(config, tag, ops);
|
||||||
operation.put("basePath", basePath);
|
operation.put("basePath", basePath);
|
||||||
|
operation.put("contextPath", contextPath);
|
||||||
operation.put("baseName", tag);
|
operation.put("baseName", tag);
|
||||||
operation.put("modelPackage", config.modelPackage());
|
operation.put("modelPackage", config.modelPackage());
|
||||||
operation.putAll(config.additionalProperties());
|
operation.putAll(config.additionalProperties());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user