com.smartbear.swagger4j
Interface SwaggerSource

All Known Implementing Classes:
URISwaggerSource

public interface SwaggerSource

Generic interface for abstracting the source of a swagger definition - allowing Swagger definitions to be read from a non path-based storage (databases, etc)


Method Summary
 Constants.Format getFormat()
          Gets the format of the Swagger objects returned by this Source
 Reader readApiDeclaration(String basePath, String path)
          Gets a Reader for an API Declaration with the specified path.
 Reader readResourceListing()
          Gets a Reader for the ResourceListing of this SwaggerSource
 

Method Detail

readResourceListing

Reader readResourceListing()
                           throws IOException
Gets a Reader for the ResourceListing of this SwaggerSource

Returns:
a Reader for the Swagger Resource Listing
Throws:
IOException

readApiDeclaration

Reader readApiDeclaration(String basePath,
                          String path)
                          throws IOException
Gets a Reader for an API Declaration with the specified path. Generally this path will be taken from the path of containing Resource Listings API

Parameters:
basePath -
path - the path of the API Declaration
Returns:
a Reader for the API Declaration
Throws:
IOException

getFormat

Constants.Format getFormat()
Gets the format of the Swagger objects returned by this Source

Returns:
the format of the Swagger objects returned by this Source


Copyright © 2013. All Rights Reserved.