com.github.kongchen.swagger.docgen.mustache.MustacheApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swagger-maven-plugin Show documentation
Show all versions of swagger-maven-plugin Show documentation
A maven build plugin which helps you generate API document during build phase
package com.github.kongchen.swagger.docgen.mustache;
import com.github.kongchen.swagger.docgen.util.Utils;
import com.wordnik.swagger.model.ApiDescription;
import java.util.LinkedList;
import java.util.List;
public class MustacheApi {
private final String description;
private String path;
private final String url;
private final List operations = new LinkedList();
public MustacheApi(String basePath, ApiDescription api) {
this.path = api.path();
if (this.path != null && !this.path.startsWith("/")) {
this.path = "/" + this.path;
}
this.url = basePath + api.path();
this.description = Utils.getStrInOption(api.description());
}
public void addOperation(MustacheOperation operation) {
operations.add(operation);
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getUrl() {
return url;
}
public List getOperations() {
return operations;
}
public String getDescription() {
return description;
}
}