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 String |
prettyPrint(String json)
Pretty print the json.
|
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 displayName,
String kind,
Boolean required,
String type,
String defaultValue,
String description,
Boolean deprecated,
Boolean secret,
String group,
String label,
boolean enumType,
Set<String> enums,
boolean oneOfType,
Set<String> oneOffTypes,
boolean asPredicate,
String optionalPrefix,
String prefix,
boolean multiValue) |
public static String toJson(String name, String displayName, String kind, Boolean required, String type, String defaultValue, String description, Boolean deprecated, Boolean secret, String group, String label, boolean enumType, Set<String> enums, boolean oneOfType, Set<String> oneOffTypes, boolean asPredicate, String optionalPrefix, String prefix, boolean multiValue)
public static String prettyPrint(String json)
json
- existing jsonpublic static String getType(String type, boolean enumType)
type
- the java typepublic static String getPrimitiveType(String name)
name
- the java typeApache Camel