com.smartbear.swagger4j.impl
Class SwaggerFactoryImpl

java.lang.Object
  extended by com.smartbear.swagger4j.impl.SwaggerFactoryImpl
All Implemented Interfaces:
SwaggerFactory

public class SwaggerFactoryImpl
extends Object
implements SwaggerFactory

The default SwaggerFactory


Constructor Summary
SwaggerFactoryImpl()
           
 
Method Summary
 ApiDeclaration createApiDeclaration(String basePath, String resourcePath)
          Creates an empty ApiDeclaration with the specified basePath and resourcePath
 ResourceListing createResourceListing(String basePath)
          Creates an empty ResourceListing with the specified basePath to use for resolving contained API declaration references
 SwaggerReader createSwaggerReader()
          Creates a SwaggerReader that can read Swagger objects
 SwaggerWriter createSwaggerWriter(Constants.Format format)
          Creates a SwaggerWriter for the specified format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwaggerFactoryImpl

public SwaggerFactoryImpl()
Method Detail

createResourceListing

public ResourceListing createResourceListing(String basePath)
Description copied from interface: SwaggerFactory
Creates an empty ResourceListing with the specified basePath to use for resolving contained API declaration references

Specified by:
createResourceListing in interface SwaggerFactory
Parameters:
basePath - the basePath of the ResourceListing
Returns:
an empty ResourceListing object

createApiDeclaration

public ApiDeclaration createApiDeclaration(String basePath,
                                           String resourcePath)
Description copied from interface: SwaggerFactory
Creates an empty ApiDeclaration with the specified basePath and resourcePath

Specified by:
createApiDeclaration in interface SwaggerFactory
Parameters:
basePath - used to resolve API paths defined in this declaration
resourcePath - path to the actual resource described in the declaration
Returns:
an empty ApiDeclaration

createSwaggerReader

public SwaggerReader createSwaggerReader()
Description copied from interface: SwaggerFactory
Creates a SwaggerReader that can read Swagger objects

Specified by:
createSwaggerReader in interface SwaggerFactory
Returns:
a SwaggerReader

createSwaggerWriter

public SwaggerWriter createSwaggerWriter(Constants.Format format)
Description copied from interface: SwaggerFactory
Creates a SwaggerWriter for the specified format

Specified by:
createSwaggerWriter in interface SwaggerFactory
Parameters:
format - the format to use when writing, either json or xml
Returns:
a SwaggerWriter


Copyright © 2013. All Rights Reserved.