Class Reader


  • public class Reader
    extends Object
    • 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)
      • getSubResource

        protected Class<?> getSubResource​(Method method)
      • getSubResourceWithJaxRsSubresourceLocatorSpecs

        protected Class<?> getSubResourceWithJaxRsSubresourceLocatorSpecs​(Method method)
      • extractTags

        protected Set<String> extractTags​(io.swagger.annotations.Api api)
      • parseMethod

        public io.swagger.models.Operation parseMethod​(Method method)
      • getOperationId

        protected String getOperationId​(String operationId)