Class DataDictionaryToJsonSchemaConverter
java.lang.Object
com.flowable.platform.common.datadictionary.json.DataDictionaryToJsonSchemaConverter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidapplyBaseType(tools.jackson.databind.node.ObjectNode target, String type) protected static voidapplyConstraints(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, Collection<Constraint> constraints) protected static voidapplyDescription(tools.jackson.databind.node.ObjectNode target, String aiDescription, String description) protected static voidapplyEmptyObjectSchema(tools.jackson.databind.node.ObjectNode target) protected static voidapplyExample(tools.jackson.databind.node.ObjectNode target, String example) protected static voidapplyLabel(tools.jackson.databind.node.ObjectNode target, String label) static tools.jackson.databind.node.ObjectNodeconvertToJsonSchema(tools.jackson.databind.ObjectMapper objectMapper, DataDictionaryModel model, String typeName) Converts a specific type within aDataDictionaryModelto a JSON Schema object.protected static tools.jackson.databind.node.ObjectNodeconvertToJsonSchema(tools.jackson.databind.ObjectMapper objectMapper, DictionaryType dictionaryType, Map<String, DictionaryType> allTypes) static tools.jackson.databind.node.ObjectNodeconvertTypeToPropertySchema(tools.jackson.databind.ObjectMapper objectMapper, DictionaryType dictionaryType) Converts aDictionaryTypeto a property-level JSON Schema node (without $schema wrapper).static tools.jackson.databind.node.ObjectNodeconvertTypeToPropertySchema(tools.jackson.databind.ObjectMapper objectMapper, DictionaryType dictionaryType, Function<TypeRef, DictionaryType> externalTypeResolver) Converts aDictionaryTypeto a property-level JSON Schema node, using the given resolver to look up cross-dictionaryTypeRefs that are not part of the entry type's own model.protected static voidmakeNullable(tools.jackson.databind.node.ObjectNode target) protected static voidpopulateArraySchema(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, ArrayDictionaryType arrayType, DataDictionaryToJsonSchemaConverter.Context context) protected static voidpopulateInlineObjectSchema(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, Map<String, TypeProperty> nestedProperties, DataDictionaryToJsonSchemaConverter.Context context) protected static voidpopulateObjectSchema(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, HasTypeProperties objectType, DataDictionaryToJsonSchemaConverter.Context context) protected static voidpopulatePropertySchema(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, TypeProperty property, DataDictionaryToJsonSchemaConverter.Context context) protected static voidpopulateTypeRefSchema(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, TypeRef typeRef, DataDictionaryToJsonSchemaConverter.Context context) protected static voidpopulateTypeSchema(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, DictionaryType dictionaryType, DataDictionaryToJsonSchemaConverter.Context context) protected static StringvisitedKey(TypeRef typeRef)
-
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 aDataDictionaryModelto 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 aDictionaryTypeto 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 aDictionaryTypeto a property-level JSON Schema node, using the given resolver to look up cross-dictionaryTypeRefs 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
-
applyBaseType
-
applyEmptyObjectSchema
protected static void applyEmptyObjectSchema(tools.jackson.databind.node.ObjectNode target) -
makeNullable
protected static void makeNullable(tools.jackson.databind.node.ObjectNode target) -
applyLabel
-
applyDescription
-
applyExample
-
applyConstraints
protected static void applyConstraints(tools.jackson.databind.ObjectMapper objectMapper, tools.jackson.databind.node.ObjectNode target, Collection<Constraint> constraints)
-