com.smartbear.swagger4j.impl
Class SwaggerReaderImpl

java.lang.Object
  extended by com.smartbear.swagger4j.impl.SwaggerReaderImpl
All Implemented Interfaces:
SwaggerReader

public class SwaggerReaderImpl
extends Object
implements SwaggerReader

Default SwaggerReader implementation

See Also:
SwaggerReader

Constructor Summary
SwaggerReaderImpl()
           
 
Method Summary
 ApiDeclaration readApiDeclaration(Reader reader, Constants.Format format)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwaggerReaderImpl

public SwaggerReaderImpl()
Method Detail

readResourceListing

public ResourceListing readResourceListing(URI uri)
                                    throws IOException
Description copied from interface: SwaggerReader
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.

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

readResourceListing

public ResourceListing readResourceListing(SwaggerSource source)
                                    throws IOException
Description copied from interface: SwaggerReader
Reads a Resource Listing and all contained API Declarations from the specified SwaggerSource

Specified by:
readResourceListing in interface SwaggerReader
Parameters:
source - the SwaggerSource providing the Resource Listing and its API Declarations
Returns:
the created ResourceListing
Throws:
IOException

readApiDeclaration

public ApiDeclaration readApiDeclaration(URI uri)
                                  throws IOException
Description copied from interface: SwaggerReader
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)

Specified by:
readApiDeclaration in interface SwaggerReader
Parameters:
uri - the URI of the API declaration document (with either json or xml extension)
Returns:
Throws:
IOException

readApiDeclaration

public ApiDeclaration readApiDeclaration(Reader reader,
                                         Constants.Format format)
                                  throws IOException
Throws:
IOException


Copyright © 2013. All Rights Reserved.