Package io.swagger.jaxrs
Class Reader
- java.lang.Object
-
- io.swagger.jaxrs.Reader
-
public class Reader extends Object
-
-
Constructor Summary
Constructors Constructor Description Reader(io.swagger.models.Swagger swagger)Reader(io.swagger.models.Swagger swagger, ReaderConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringextractOperationMethod(io.swagger.annotations.ApiOperation apiOperation, Method method, Iterator<SwaggerExtension> chain)protected Set<String>extractTags(io.swagger.annotations.Api api)ReaderConfiggetConfig()protected StringgetOperationId(String operationId)protected Class<?>getSubResource(Method method)protected Class<?>getSubResourceWithJaxRsSubresourceLocatorSpecs(Method method)io.swagger.models.SwaggergetSwagger()io.swagger.models.OperationparseMethod(Method method)io.swagger.models.Swaggerread(Class<?> cls)Scans a single class for Swagger annotations - does not invoke ReaderListenersprotected io.swagger.models.Swaggerread(Class<?> cls, String parentPath, String parentMethod, boolean isSubresource, String[] parentConsumes, String[] parentProduces, Map<String,io.swagger.models.Tag> parentTags, List<io.swagger.models.parameters.Parameter> parentParameters)io.swagger.models.Swaggerread(Set<Class<?>> classes)Scans a set of classes for both ReaderListeners and Swagger annotations.protected io.swagger.models.parameters.ParameterreadImplicitParam(io.swagger.annotations.ApiImplicitParam param)protected voidreadInfoConfig(io.swagger.annotations.SwaggerDefinition config)protected voidreadSwaggerConfig(Class<?> cls, io.swagger.annotations.SwaggerDefinition config)
-
-
-
Constructor Detail
-
Reader
public Reader(io.swagger.models.Swagger swagger)
-
Reader
public Reader(io.swagger.models.Swagger swagger, ReaderConfig config)
-
-
Method Detail
-
getSwagger
public io.swagger.models.Swagger getSwagger()
-
read
public io.swagger.models.Swagger read(Set<Class<?>> classes)
Scans a set of classes for both ReaderListeners and Swagger annotations. All found listeners will be instantiated before any of the classes are scanned for Swagger annotations - so they can be invoked accordingly.- Parameters:
classes- a set of classes to scan- Returns:
- the generated Swagger definition
-
read
public io.swagger.models.Swagger read(Class<?> cls)
Scans a single class for Swagger annotations - does not invoke ReaderListeners
-
read
protected io.swagger.models.Swagger read(Class<?> cls, String parentPath, String parentMethod, boolean isSubresource, String[] parentConsumes, String[] parentProduces, Map<String,io.swagger.models.Tag> parentTags, List<io.swagger.models.parameters.Parameter> parentParameters)
-
readImplicitParam
protected io.swagger.models.parameters.Parameter readImplicitParam(io.swagger.annotations.ApiImplicitParam param)
-
readSwaggerConfig
protected void readSwaggerConfig(Class<?> cls, io.swagger.annotations.SwaggerDefinition config)
-
readInfoConfig
protected void readInfoConfig(io.swagger.annotations.SwaggerDefinition config)
-
getSubResourceWithJaxRsSubresourceLocatorSpecs
protected Class<?> getSubResourceWithJaxRsSubresourceLocatorSpecs(Method method)
-
parseMethod
public io.swagger.models.Operation parseMethod(Method method)
-
extractOperationMethod
public String extractOperationMethod(io.swagger.annotations.ApiOperation apiOperation, Method method, Iterator<SwaggerExtension> chain)
-
getConfig
public ReaderConfig getConfig()
-
-