com.smartbear.swagger4j
Interface SwaggerReader

All Known Implementing Classes:
SwaggerReaderImpl

public interface SwaggerReader

Reads Swagger objects from a URI or a generic SwaggerSource


Method Summary
 ApiDeclaration readApiDeclaration(URI uri)
          Reads an API Declaration from the specified URI - use this is you have standalone API Declarations.
 ResourceListing readResourceListing(SwaggerSource source)
          Reads a Resource Listing and all contained API Declarations from the specified SwaggerSource
 ResourceListing readResourceListing(URI uri)
          Reads a Resource Listing and all contained API Declarations from the specified URI.
 

Method Detail

readResourceListing

ResourceListing readResourceListing(URI uri)
                                    throws IOException
Reads a Resource Listing and all contained API Declarations from the specified URI. The format will be based on the extension of the URI (.json or .xml). Use the SwaggerSource version of this method for more flexible format extrapolation.

Parameters:
uri - the URI of the starting api-docs document (with either json or xml extension)
Returns:
the created ResourceListing
Throws:
IOException

readApiDeclaration

ApiDeclaration readApiDeclaration(URI uri)
                                  throws IOException
Reads an API Declaration from the specified URI - use this is you have standalone API Declarations. The format will be based on the extension of the URI (.json or .xml)

Parameters:
uri - the URI of the API declaration document (with either json or xml extension)
Returns:
Throws:
IOException

readResourceListing

ResourceListing readResourceListing(SwaggerSource source)
                                    throws IOException
Reads a Resource Listing and all contained API Declarations from the specified SwaggerSource

Parameters:
source - the SwaggerSource providing the Resource Listing and its API Declarations
Returns:
the created ResourceListing
Throws:
IOException


Copyright © 2013. All Rights Reserved.