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.


字段摘要
protected  LogAdapter LOG
           
protected  com.fasterxml.jackson.databind.ObjectMapper mapper
           
protected  String overridingModels
           
protected  com.wordnik.swagger.model.ResourceListing serviceDocument
           
 
构造方法摘要
AbstractDocumentSource(LogAdapter logAdapter, String outputPath, String outputTpl, String swaggerOutput, String mustacheFileRoot, boolean useOutputFlatStructure1, String overridingModels, String apiSortComparator)
           
 
方法摘要
protected  void acceptDocument(com.wordnik.swagger.model.ApiListing doc)
           
protected  File createFile(File dir, String outputResourcePath)
           
 ApiSourceInfo getApiInfo()
           
 Comparator<MustacheApi> getApiSortComparator()
           
 String getApiVersion()
           
 String getBasePath()
           
 OutputTemplate getOutputTemplate()
           
 List<com.wordnik.swagger.model.ApiListing> getValidDocuments()
           
abstract  void loadDocuments()
           
 void loadOverridingModels()
           
 OutputTemplate prepareMustacheTemplate()
           
protected  String resourcePathToFilename(String resourcePath)
           
 void setApiInfo(ApiSourceInfo apiInfo)
           
 void setApiVersion(String apiVersion)
           
 void setBasePath(String basePath)
           
 void toDocuments()
           
 void toSwaggerDocuments(String swaggerUIDocBasePath)
           
protected  void writeContent(OutputStream out, com.fasterxml.jackson.databind.JsonNode tree)
          Serializes json tree and writes to stream.
 
从类 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 to
tree - 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.