com.smartbear.swagger4j
Interface SwaggerWriter

All Known Implementing Classes:
SwaggerWriterImpl

public interface SwaggerWriter

Writes Swagger objects to writers or a generic SwaggerStore


Method Summary
 Constants.Format getFormat()
          Gets the format of this SwaggerWriter
 void writeApiDeclaration(ApiDeclaration declaration, Writer writer)
          Writes the specified ApiDeclaration to the specified Writer in the configured format
 void writeResourceListing(ResourceListing listing, Writer writer)
          Writes the specified ResourceListing to the specified Writer in the configured format
 void writeSwagger(SwaggerStore store, ResourceListing resourceListing)
          Writes an entire Swagger definition (both ResourceListing and referred ApiDeclarations) to a generic SwaggerStore
 

Method Detail

writeApiDeclaration

void writeApiDeclaration(ApiDeclaration declaration,
                         Writer writer)
                         throws IOException
Writes the specified ApiDeclaration to the specified Writer in the configured format

Parameters:
declaration - the declaration to write
writer - the writer to write to
Throws:
IOException

writeResourceListing

void writeResourceListing(ResourceListing listing,
                          Writer writer)
                          throws IOException
Writes the specified ResourceListing to the specified Writer in the configured format

Parameters:
listing - the listing to write
writer - the writer to write to
Throws:
IOException

getFormat

Constants.Format getFormat()
Gets the format of this SwaggerWriter

Returns:
the format used by this writer when writing Swagger definitions

writeSwagger

void writeSwagger(SwaggerStore store,
                  ResourceListing resourceListing)
                  throws IOException
Writes an entire Swagger definition (both ResourceListing and referred ApiDeclarations) to a generic SwaggerStore

Parameters:
store - the SwaggerStore to write to
resourceListing - the ResourceListing to write
Throws:
IOException


Copyright © 2013. All Rights Reserved.