Class JsonSubTypesResolver

    • Constructor Detail

      • JsonSubTypesResolver

        public JsonSubTypesResolver()
    • Method Detail

      • findTargetTypeOverrides

        public List<com.fasterxml.classmate.ResolvedType> findTargetTypeOverrides​(MemberScope<?,​?> property)
        Look-up applicable subtypes for the given field/method if there is a JsonSubTypes annotation.
        Parameters:
        property - targeted field/method
        Returns:
        list of annotated subtypes (or null if there is no JsonSubTypes annotation)
      • lookUpSubtypesFromAnnotation

        public List<com.fasterxml.classmate.ResolvedType> lookUpSubtypesFromAnnotation​(com.fasterxml.classmate.ResolvedType declaredType,
                                                                                       com.fasterxml.jackson.annotation.JsonSubTypes subtypesAnnotation,
                                                                                       TypeContext context)
        Mapping the declared erased types from the annotation to resolved types. Returns null if annotation is null/not present.
        Parameters:
        declaredType - supertype encountered while generating a schema
        subtypesAnnotation - annotation to derive applicable subtypes from.
        context - type context for proper type resolution
        Returns:
        resolved annotated subtypes (or null if given annotation is null)
      • provideCustomPropertySchemaDefinition

        public CustomPropertyDefinition provideCustomPropertySchemaDefinition​(MemberScope<?,​?> scope,
                                                                              SchemaGenerationContext context)
        Providing custom schema definition for field/method in case of a per-property override of the applicable subtypes or how they are serialized.
        Parameters:
        scope - targeted field or method
        context - generation context
        Returns:
        applicable custom per-property override schema definition (may be null)