updated readme, base path

This commit is contained in:
Tony Tam 2015-11-23 14:27:22 -10:00 committed by Alvin Zeng
parent 630def9d19
commit 0cb8e4ca69
2 changed files with 12 additions and 12 deletions

View File

@ -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);

View File

@ -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!