com.smartbear.swagger4j
Class FileSwaggerStore

java.lang.Object
  extended by com.smartbear.swagger4j.FileSwaggerStore
All Implemented Interfaces:
SwaggerStore

public class FileSwaggerStore
extends Object
implements SwaggerStore

Simple file-based implementation of the SwaggerStore interface - for writing Swagger definitions to the local file system


Constructor Summary
FileSwaggerStore(String path)
           
 
Method Summary
 Writer createResource(String path)
          Create a resource with the specified path
 String getApiDocsPath()
          Gets the path of the generated api-docs root definition
static String writeSwagger(String path, ResourceListing resourceListing, Constants.Format format)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSwaggerStore

public FileSwaggerStore(String path)
Method Detail

createResource

public Writer createResource(String path)
                      throws IOException
Description copied from interface: SwaggerStore
Create a resource with the specified path

Specified by:
createResource in interface SwaggerStore
Parameters:
path - the path of the resource to create
Returns:
a Writer to which the resource can be written
Throws:
IOException

getApiDocsPath

public String getApiDocsPath()
Gets the path of the generated api-docs root definition

Returns:
the path of the generated api-docs root definition

writeSwagger

public static String writeSwagger(String path,
                                  ResourceListing resourceListing,
                                  Constants.Format format)
                           throws IOException
Throws:
IOException


Copyright © 2013. All Rights Reserved.