com.github.kongchen.swagger.docgen
类 AbstractDocumentSource
java.lang.Object
com.github.kongchen.swagger.docgen.AbstractDocumentSource
- 直接已知子类:
- MavenDocumentSource, RemoteDocumentSource, SpringMavenDocumentSource
public abstract class AbstractDocumentSource
- extends Object
Created with IntelliJ IDEA.
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected final LogAdapter LOG
serviceDocument
protected com.wordnik.swagger.model.ResourceListing serviceDocument
mapper
protected com.fasterxml.jackson.databind.ObjectMapper mapper
overridingModels
protected String overridingModels
AbstractDocumentSource
public AbstractDocumentSource(LogAdapter logAdapter,
String outputPath,
String outputTpl,
String swaggerOutput,
String mustacheFileRoot,
boolean useOutputFlatStructure1,
String overridingModels,
String apiSortComparator)
loadDocuments
public abstract void loadDocuments()
throws Exception,
GenerateException
- 抛出:
Exception
GenerateException
getBasePath
public String getBasePath()
setBasePath
public void setBasePath(String basePath)
getApiVersion
public String getApiVersion()
setApiVersion
public void setApiVersion(String apiVersion)
getOutputTemplate
public OutputTemplate getOutputTemplate()
getApiInfo
public ApiSourceInfo getApiInfo()
setApiInfo
public void setApiInfo(ApiSourceInfo apiInfo)
acceptDocument
protected void acceptDocument(com.wordnik.swagger.model.ApiListing doc)
getValidDocuments
public List<com.wordnik.swagger.model.ApiListing> getValidDocuments()
toSwaggerDocuments
public void toSwaggerDocuments(String swaggerUIDocBasePath)
throws GenerateException
- 抛出:
GenerateException
loadOverridingModels
public void loadOverridingModels()
throws GenerateException
- 抛出:
GenerateException
resourcePathToFilename
protected String resourcePathToFilename(String resourcePath)
writeContent
protected void writeContent(OutputStream out,
com.fasterxml.jackson.databind.JsonNode tree)
throws IOException
- Serializes json tree and writes to stream.
- 参数:
out - OutputStream of where to write output totree - the jsonNode representation of the swagger spec
- 抛出:
IOException - if there is a problem writing to output stream
createFile
protected File createFile(File dir,
String outputResourcePath)
throws IOException
- 抛出:
IOException
prepareMustacheTemplate
public OutputTemplate prepareMustacheTemplate()
throws GenerateException
- 抛出:
GenerateException
toDocuments
public void toDocuments()
throws GenerateException
- 抛出:
GenerateException
getApiSortComparator
public Comparator<MustacheApi> getApiSortComparator()
Copyright © 2015. All Rights Reserved.