Class AnnotationsUtils


  • public abstract class AnnotationsUtils
    extends Object
    • Constructor Detail

      • AnnotationsUtils

        public AnnotationsUtils()
    • Method Detail

      • hasSchemaAnnotation

        public static boolean hasSchemaAnnotation​(Schema schema)
      • equals

        public static boolean equals​(Schema thisSchema,
                                     Schema thatSchema)
      • hasArrayAnnotation

        public static boolean hasArrayAnnotation​(ArraySchema array)
      • getArraySchema

        public static Optional<ArraySchema> getArraySchema​(ArraySchema arraySchema,
                                                           com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
      • getArraySchema

        public static Optional<ArraySchema> getArraySchema​(ArraySchema arraySchema,
                                                           Components components,
                                                           com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                           boolean openapi31)
      • getArraySchema

        public static Optional<Schema> getArraySchema​(ArraySchema arraySchema,
                                                      Components components,
                                                      com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                      boolean openapi31,
                                                      Schema existingSchema)
      • getArraySchema

        public static Optional<Schema> getArraySchema​(ArraySchema arraySchema,
                                                      Components components,
                                                      com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                      boolean openapi31,
                                                      Schema existingSchema,
                                                      boolean processSchemaImplementation)
      • getSchemaFromAnnotation

        public static Optional<Schema> getSchemaFromAnnotation​(Schema schema,
                                                               com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
      • getSchemaFromAnnotation

        public static Optional<Schema> getSchemaFromAnnotation​(Schema schema,
                                                               com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                               boolean openapi31)
      • getSchemaFromAnnotation

        public static Optional<Schema> getSchemaFromAnnotation​(Schema schema,
                                                               Components components,
                                                               com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
      • getSchemaFromAnnotation

        public static Optional<Schema> getSchemaFromAnnotation​(Schema schema,
                                                               Components components,
                                                               com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                               boolean openapi31)
      • getSchemaFromAnnotation

        public static Optional<Schema> getSchemaFromAnnotation​(Schema schema,
                                                               Components components,
                                                               com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                               boolean openapi31,
                                                               Schema existingSchema)
      • resolveSchemaFromType

        public static Schema resolveSchemaFromType​(Class<?> schemaImplementation,
                                                   Components components,
                                                   com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
      • resolveSchemaFromType

        public static Schema resolveSchemaFromType​(Class<?> schemaImplementation,
                                                   Components components,
                                                   com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                   boolean openapi31)
      • resolveSchemaFromType

        public static Schema resolveSchemaFromType​(Class<?> schemaImplementation,
                                                   Components components,
                                                   com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                   boolean openapi31,
                                                   Schema schemaAnnotation,
                                                   ArraySchema arrayAnnotation,
                                                   ModelConverterContext context)
      • getTags

        public static Optional<Set<Tag>> getTags​(Tag[] tags,
                                                 boolean skipOnlyName)
      • getInfo

        public static Optional<Info> getInfo​(Info info,
                                             boolean openapi31)
      • getLinks

        public static Map<String,​Link> getLinks​(Link[] links,
                                                      boolean openapi31)
      • getLink

        public static Optional<Link> getLink​(Link link,
                                             boolean openapi31)
      • getHeaders

        public static Optional<Map<String,​Header>> getHeaders​(Header[] annotationHeaders,
                                                                    com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
      • getHeaders

        public static Optional<Map<String,​Header>> getHeaders​(Header[] annotationHeaders,
                                                                    com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                                    boolean openapi31)
      • getHeaders

        public static Optional<Map<String,​Header>> getHeaders​(Header[] annotationHeaders,
                                                                    Components components,
                                                                    com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                                    boolean openapi31)
      • getHeader

        public static Optional<Header> getHeader​(Header header,
                                                 com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
      • getHeader

        public static Optional<Header> getHeader​(Header header,
                                                 Components components,
                                                 com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
      • getHeader

        public static Optional<Header> getHeader​(Header header,
                                                 com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                 boolean openapi31)
      • getHeader

        public static Optional<Header> getHeader​(Header header,
                                                 Components components,
                                                 com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                 boolean openapi31)
      • setHeaderExplode

        public static void setHeaderExplode​(Header header,
                                            Header h)
      • addEncodingToMediaType

        public static void addEncodingToMediaType​(MediaType mediaType,
                                                  Encoding encoding,
                                                  com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
      • addEncodingToMediaType

        public static void addEncodingToMediaType​(MediaType mediaType,
                                                  Encoding encoding,
                                                  com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                  boolean openapi31)
      • getSchemaType

        public static Type getSchemaType​(Schema schema)
      • getSchemaType

        public static Type getSchemaType​(Schema schema,
                                         boolean nullIfNotFound)
      • clone

        public static Schema clone​(Schema schema,
                                   boolean openapi31)
      • getContent

        public static Optional<Content> getContent​(Content[] annotationContents,
                                                   String[] classTypes,
                                                   String[] methodTypes,
                                                   Schema schema,
                                                   Components components,
                                                   com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                   boolean openapi31)
      • getSchema

        public static Optional<? extends Schema> getSchema​(Content annotationContent,
                                                           Components components,
                                                           com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
      • getSchema

        public static Optional<? extends Schema> getSchema​(Content annotationContent,
                                                           Components components,
                                                           com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                           boolean openapi31)
      • getSchema

        public static Optional<? extends Schema> getSchema​(Schema schemaAnnotation,
                                                           ArraySchema arrayAnnotation,
                                                           boolean isArray,
                                                           Class<?> schemaImplementation,
                                                           Components components,
                                                           com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation)
      • getSchema

        public static Optional<? extends Schema> getSchema​(Schema schemaAnnotation,
                                                           ArraySchema arrayAnnotation,
                                                           boolean isArray,
                                                           Class<?> schemaImplementation,
                                                           Components components,
                                                           com.fasterxml.jackson.annotation.JsonView jsonViewAnnotation,
                                                           boolean openapi31)
      • getSchemaAnnotation

        public static Schema getSchemaAnnotation​(com.fasterxml.jackson.databind.introspect.Annotated a)
      • getSchemaDeclaredAnnotation

        public static Schema getSchemaDeclaredAnnotation​(com.fasterxml.jackson.databind.introspect.Annotated a)
      • getSchemaAnnotation

        public static Schema getSchemaAnnotation​(Class<?> cls)
      • getSchemaDeclaredAnnotation

        public static Schema getSchemaDeclaredAnnotation​(Class<?> cls)
      • getSchemaAnnotation

        public static Schema getSchemaAnnotation​(Annotation... annotations)
      • getArraySchemaAnnotation

        public static ArraySchema getArraySchemaAnnotation​(Annotation... annotations)
      • getAnnotation

        public static <T> T getAnnotation​(Class<T> cls,
                                          Annotation... annotations)
      • updateAnnotation

        public static void updateAnnotation​(Class<?> clazz,
                                            Schema newAnnotation)
      • mergeSchemaAnnotations

        public static Annotation mergeSchemaAnnotations​(Annotation[] ctxAnnotations,
                                                        com.fasterxml.jackson.databind.JavaType type)
      • mergeSchemaAnnotations

        public static Annotation mergeSchemaAnnotations​(Annotation[] ctxAnnotations,
                                                        com.fasterxml.jackson.databind.JavaType type,
                                                        boolean contextWins)
      • mergeSchemaAnnotations

        public static Schema mergeSchemaAnnotations​(Schema master,
                                                    Schema patch)