com.smartbear.swagger4j
Interface ApiDeclaration

All Known Implementing Classes:
ApiDeclarationImpl

public interface ApiDeclaration

Holds a Swagger API Declaration - see https://github.com/wordnik/swagger-core/wiki/API-Declaration


Method Summary
 Api addApi(String path)
          Adds a new API to this ApiDeclaration with the specified path
 Api getApi(String path)
          Gets the API at the specified path
 List<Api> getApis()
          Gets a list of APIs for this ApiDeclarations
 String getApiVersion()
           
 String getBasePath()
           
 String getResourcePath()
           
 String getSwaggerVersion()
           
 void removeApi(Api api)
          Removes the specified Api from this ApiDeclaration
 void setApiVersion(String apiVersion)
           
 void setBasePath(String basePath)
           
 void setResourcePath(String resourcedPath)
           
 void setSwaggerVersion(String swaggerVersion)
           
 

Method Detail

getSwaggerVersion

String getSwaggerVersion()

setSwaggerVersion

void setSwaggerVersion(String swaggerVersion)

getApiVersion

String getApiVersion()

setApiVersion

void setApiVersion(String apiVersion)

getBasePath

String getBasePath()

setBasePath

void setBasePath(String basePath)

getResourcePath

String getResourcePath()

setResourcePath

void setResourcePath(String resourcedPath)

getApis

List<Api> getApis()
Gets a list of APIs for this ApiDeclarations

Returns:
a list of Api objects
See Also:
Api

removeApi

void removeApi(Api api)
Removes the specified Api from this ApiDeclaration

Parameters:
api - the Api to remove
See Also:
Api

addApi

Api addApi(String path)
Adds a new API to this ApiDeclaration with the specified path

Parameters:
path - the path for the API to add
Returns:
the created API
See Also:
Api

getApi

Api getApi(String path)
Gets the API at the specified path

Parameters:
path - the path to the API
Returns:
the API at that path, null if none available
See Also:
Api


Copyright © 2013. All Rights Reserved.