
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 java.util.LinkedList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.wordnik.swagger.core.DocumentationEndPoint;
public class MustacheApi {
int apiIndex;
String path;
String url;
List operations = new LinkedList();
@JsonIgnore
private int opIndex = 1;
public MustacheApi(String basePath, DocumentationEndPoint api) {
this.path = api.getPath();
if (this.path != null && !this.path.startsWith("/")) {
this.path = "/" + this.path;
}
this.url = basePath + api.getPath();
}
public void addOperation(MustacheOperation operation) {
operation.setOpIndex(this.opIndex++);
operations.add(operation);
}
public int getApiIndex() {
return apiIndex;
}
public void setApiIndex(int apiIndex) {
this.apiIndex = apiIndex;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public List getOperations() {
return operations;
}
public void setOperations(List operations) {
this.operations = operations;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy