Class CustomDefinition

    • Constructor Detail

      • CustomDefinition

        public CustomDefinition​(com.fasterxml.jackson.databind.node.ObjectNode value)
        Constructor for a custom definition that should follow the standard behaviour in regards to be inlined or mentioned in the "definitions".
        Parameters:
        value - generated custom definition
      • CustomDefinition

        public CustomDefinition​(com.fasterxml.jackson.databind.node.ObjectNode value,
                                boolean meantToBeInline)
        Constructor for a custom definition.
        Parameters:
        value - generated custom definition
        meantToBeInline - whether the definition should be inlined even if it occurs multiple times; otherwise applying standard behaviour
      • CustomDefinition

        public CustomDefinition​(com.fasterxml.jackson.databind.node.ObjectNode value,
                                CustomDefinition.DefinitionType definitionType,
                                CustomDefinition.AttributeInclusion attributeInclusion)
        Constructor for a custom definition.
        Parameters:
        value - generated custom definition
        definitionType - whether the definition should be inlined even if it occurs multiple times; otherwise applying standard behaviour
        attributeInclusion - whether additional attributes should be applied on top of this custom definition
    • Method Detail

      • getValue

        public com.fasterxml.jackson.databind.node.ObjectNode getValue()
        Getter for the actual custom definition.
        Returns:
        node containing the custom definition
      • getDefinitionType

        public CustomDefinition.DefinitionType getDefinitionType()
        Getter for the associated definition type.
        Returns:
        indication whether a custom definition should always be inlined or follow the standard behaviour
      • isMeantToBeInline

        public final boolean isMeantToBeInline()
        Getter for the flag indicating whether this custom definition should be inlined even if it occurs multiple times.
        Returns:
        whether this custom definition should be inlined even if it occurs multiple times
      • shouldAlwaysProduceDefinition

        public final boolean shouldAlwaysProduceDefinition()
        Getter for the flag indicating whether this custom definition should always be included in the SchemaKeyword.TAG_DEFINITIONS even if it occurs only once.
        Returns:
        whether an occurrence of this custom definition should always be replaced by a reference
        Since:
        4.27.0
      • getAttributeInclusion

        public CustomDefinition.AttributeInclusion getAttributeInclusion()
        Getter for the associated extent of additional attributes being collected and applied.
        Returns:
        indication whether the normal attribute collection should be performed and any attributes should be added to the custom definition
      • shouldIncludeAttributes

        public boolean shouldIncludeAttributes()