public final class JsonSchemaHelper extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getPrimitiveType(String name)
Gets the JSon schema primitive type.
|
static String |
getType(String type,
boolean enumType)
Gets the JSon schema type.
|
static List<Map<String,String>> |
parseJsonSchema(String group,
String json,
boolean parseProperties)
Parses the json schema to split it into a list or rows, where each row contains key value pairs with the metadata
|
static String |
sanitizeDescription(String javadoc,
boolean summary)
Sanitizes the javadoc to removed invalid characters so it can be used as json description
|
static String |
toJson(String name,
String kind,
Boolean required,
String type,
String defaultValue,
String description,
Boolean deprecated,
String group,
String label,
boolean enumType,
Set<String> enums,
boolean oneOfType,
Set<String> oneOffTypes,
String optionalPrefix,
String prefix,
boolean multiValue) |
public static String toJson(String name, String kind, Boolean required, String type, String defaultValue, String description, Boolean deprecated, String group, String label, boolean enumType, Set<String> enums, boolean oneOfType, Set<String> oneOffTypes, String optionalPrefix, String prefix, boolean multiValue)
public static String getType(String type, boolean enumType)
type
- the java typepublic static String getPrimitiveType(String name)
name
- the java typepublic static String sanitizeDescription(String javadoc, boolean summary)
javadoc
- the javadocpublic static List<Map<String,String>> parseJsonSchema(String group, String json, boolean parseProperties)
group
- the group to parse from such as component, componentProperties, or properties.json
- the jsonApache Camel