forked from loafle/openapi-generator-original
updated readme, base path
This commit is contained in:
parent
630def9d19
commit
0cb8e4ca69
@ -33,18 +33,6 @@ public class JaxRSServerCodegen extends JavaClientCodegen implements CodegenConf
|
||||
additionalProperties.put(CodegenConstants.ARTIFACT_ID, artifactId);
|
||||
additionalProperties.put(CodegenConstants.ARTIFACT_VERSION, artifactVersion);
|
||||
additionalProperties.put("title", title);
|
||||
|
||||
|
||||
languageSpecificPrimitives = new HashSet<String>(
|
||||
Arrays.asList(
|
||||
"String",
|
||||
"boolean",
|
||||
"Boolean",
|
||||
"Double",
|
||||
"Integer",
|
||||
"Long",
|
||||
"Float")
|
||||
);
|
||||
}
|
||||
|
||||
public CodegenType getTag() {
|
||||
@ -109,6 +97,9 @@ public class JaxRSServerCodegen extends JavaClientCodegen implements CodegenConf
|
||||
|
||||
@Override
|
||||
public void preprocessSwagger(Swagger swagger) {
|
||||
if("/".equals(swagger.getBasePath())) {
|
||||
swagger.setBasePath("");
|
||||
}
|
||||
if(swagger != null && swagger.getPaths() != null) {
|
||||
for(String pathname : swagger.getPaths().keySet()) {
|
||||
Path path = swagger.getPath(pathname);
|
||||
|
@ -12,3 +12,12 @@ To run the server, please execute the following:
|
||||
```
|
||||
mvn clean package jetty:run
|
||||
```
|
||||
|
||||
You can then view the swagger listing here:
|
||||
|
||||
```
|
||||
http://localhost:8080{{contextPath}}/swagger.json
|
||||
```
|
||||
|
||||
Note that if you have configured the `host` to be something other than localhost, the calls through
|
||||
swagger-ui will be directed to that host and not localhost!
|
Loading…
x
Reference in New Issue
Block a user