Class Reader

    • Method Detail

      • getOpenAPI

        public OpenAPI getOpenAPI()
      • getOpenApiTags

        protected Set<Tag> getOpenApiTags()
      • getComponents

        protected Components getComponents()
      • getPaths

        protected Paths getPaths()
      • read

        public OpenAPI read​(Class<?> cls)
        Scans a single class for Swagger annotations - does not invoke ReaderListeners
      • read

        public OpenAPI read​(Set<Class<?>> classes)
        Scans a set of classes for both ReaderListeners and OpenAPI annotations. All found listeners will be instantiated before any of the classes are scanned for OpenAPI annotations - so they can be invoked accordingly.
        Parameters:
        classes - a set of classes to scan
        Returns:
        the generated OpenAPI definition
      • resolveApplicationPath

        protected String resolveApplicationPath()
      • applyPathParamsPatterns

        protected void applyPathParamsPatterns​(Operation operation,
                                               Map<String,​String> patternsMap)
      • processContent

        protected Content processContent​(Content content,
                                         Schema<?> schema,
                                         javax.ws.rs.Consumes methodConsumes,
                                         javax.ws.rs.Consumes classConsumes)
      • processRequestBody

        protected void processRequestBody​(Parameter requestBodyParameter,
                                          Operation operation,
                                          javax.ws.rs.Consumes methodConsumes,
                                          javax.ws.rs.Consumes classConsumes,
                                          List<Parameter> operationParameters,
                                          Annotation[] paramAnnotations,
                                          Type type,
                                          com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                          Map<String,​Encoding> encoding)
      • parseMethod

        public Operation parseMethod​(Method method,
                                     List<Parameter> globalParameters,
                                     com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
      • resolveEmptyContent

        protected Content resolveEmptyContent​(javax.ws.rs.Produces classProduces,
                                              javax.ws.rs.Produces methodProduces)
      • resolveResponseSchemaFromReturnType

        protected void resolveResponseSchemaFromReturnType​(Operation operation,
                                                           ApiResponse[] responses,
                                                           Schema<?> schema,
                                                           javax.ws.rs.Produces classProduces,
                                                           javax.ws.rs.Produces methodProduces)
      • setOperationObjectFromApiOperationAnnotation

        protected void setOperationObjectFromApiOperationAnnotation​(Operation operation,
                                                                    Operation apiOperation,
                                                                    javax.ws.rs.Produces methodProduces,
                                                                    javax.ws.rs.Produces classProduces,
                                                                    javax.ws.rs.Consumes methodConsumes,
                                                                    javax.ws.rs.Consumes classConsumes,
                                                                    com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
      • getOperationId

        protected String getOperationId​(String operationId)
      • getParametersListFromAnnotation

        protected Optional<List<Parameter>> getParametersListFromAnnotation​(Parameter[] parameters,
                                                                            javax.ws.rs.Consumes classConsumes,
                                                                            javax.ws.rs.Consumes methodConsumes,
                                                                            Operation operation,
                                                                            com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
      • getParameters

        protected ResolvedParameter getParameters​(Type type,
                                                  List<Annotation> annotations,
                                                  Operation operation,
                                                  javax.ws.rs.Consumes classConsumes,
                                                  javax.ws.rs.Consumes methodConsumes,
                                                  com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
      • isOperationHidden

        protected boolean isOperationHidden​(Method method)
      • isMethodOverridden

        protected boolean isMethodOverridden​(Method method,
                                             Class<?> cls)
      • setApplication

        public void setApplication​(javax.ws.rs.core.Application application)
      • ignoreOperationPath

        protected boolean ignoreOperationPath​(String path,
                                              String parentPath)
      • ignoreOperationPathStrict

        protected boolean ignoreOperationPathStrict​(String path,
                                                    String parentPath)
      • getSubResourceWithJaxRsSubresourceLocatorSpecs

        protected Class<?> getSubResourceWithJaxRsSubresourceLocatorSpecs​(Method method)