Class DataDictionaryToJsonSchemaConverter

java.lang.Object
com.flowable.platform.common.datadictionary.json.DataDictionaryToJsonSchemaConverter

public class DataDictionaryToJsonSchemaConverter extends Object
  • Constructor Details

    • DataDictionaryToJsonSchemaConverter

      public DataDictionaryToJsonSchemaConverter()
  • Method Details

    • convertToJsonSchema

      public static tools.jackson.databind.node.ObjectNode convertToJsonSchema(tools.jackson.databind.ObjectMapper objectMapper, DataDictionaryModel model, String typeName)
      Converts a specific type within a DataDictionaryModel to a JSON Schema object. Intra-dictionary type references are resolved using the model's type collection.
    • convertTypeToPropertySchema

      public static tools.jackson.databind.node.ObjectNode convertTypeToPropertySchema(tools.jackson.databind.ObjectMapper objectMapper, DictionaryType dictionaryType)
      Converts a DictionaryType to a property-level JSON Schema node (without $schema wrapper). Useful for embedding into a larger schema (e.g. as a property in an agent operation schema).
    • convertTypeToPropertySchema

      public static tools.jackson.databind.node.ObjectNode convertTypeToPropertySchema(tools.jackson.databind.ObjectMapper objectMapper, DictionaryType dictionaryType, Function<TypeRef, DictionaryType> externalTypeResolver)
      Converts a DictionaryType to a property-level JSON Schema node, using the given resolver to look up cross-dictionary TypeRefs that are not part of the entry type's own model.
    • convertToJsonSchema

      protected static tools.jackson.databind.node.ObjectNode convertToJsonSchema(tools.jackson.databind.ObjectMapper objectMapper, DictionaryType dictionaryType, Map<String, DictionaryType> allTypes)
    • populateTypeSchema

      protected static void populateTypeSchema(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, DictionaryType dictionaryType, DataDictionaryToJsonSchemaConverter.Context context)
    • populateObjectSchema

      protected static void populateObjectSchema(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, HasTypeProperties objectType, DataDictionaryToJsonSchemaConverter.Context context)
    • populateArraySchema

      protected static void populateArraySchema(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, ArrayDictionaryType arrayType, DataDictionaryToJsonSchemaConverter.Context context)
    • populatePropertySchema

      protected static void populatePropertySchema(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, TypeProperty property, DataDictionaryToJsonSchemaConverter.Context context)
    • populateInlineObjectSchema

      protected static void populateInlineObjectSchema(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, Map<String, TypeProperty> nestedProperties, DataDictionaryToJsonSchemaConverter.Context context)
    • populateTypeRefSchema

      protected static void populateTypeRefSchema(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, TypeRef typeRef, DataDictionaryToJsonSchemaConverter.Context context)
    • visitedKey

      protected static String visitedKey(TypeRef typeRef)
    • applyBaseType

      protected static void applyBaseType(tools.jackson.databind.node.ObjectNode target, String type)
    • applyEmptyObjectSchema

      protected static void applyEmptyObjectSchema(tools.jackson.databind.node.ObjectNode target)
    • makeNullable

      protected static void makeNullable(tools.jackson.databind.node.ObjectNode target)
    • applyLabel

      protected static void applyLabel(tools.jackson.databind.node.ObjectNode target, String label)
    • applyDescription

      protected static void applyDescription(tools.jackson.databind.node.ObjectNode target, String aiDescription, String description)
    • applyExample

      protected static void applyExample(tools.jackson.databind.node.ObjectNode target, String example)
    • applyConstraints

      protected static void applyConstraints(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, Collection<Constraint> constraints)