Class SchemaBuilder
java.lang.Object
org.eclipse.lemminx.customservice.synapse.schemagen.util.SchemaBuilder
- Direct Known Subclasses:
SchemaBuilderWithNamepaces
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JsonSchemaaddArrayToParent(JsonSchema parent, String id) protected JsonSchemaaddArrayToParentItemsArray(JsonSchema parent, String id) Add an array type object into parents items array.protected JsonSchemaaddObjectToParent(JsonSchema parent, String id) protected JsonSchemaaddObjectToParentItemsArray(JsonSchema parent, String id) protected JsonSchemaaddPrimitiveToParent(JsonSchema parent, String id, String value, SchemaBuilder.TypeEnum propertyValueType, Map<String, String> elementIdentifierMap) protected JsonSchemaaddPrimitiveToParentItemsArray(JsonSchema parent, String id, SchemaBuilder.TypeEnum propertyValueType) createSchema(String jsonString, FileType type) com.google.gson.JsonObjectcreateSchemaForArray(com.google.gson.JsonElement childElement, JsonSchema parent, String id, com.google.gson.JsonObject jsonObject) voidcreateSchemaForArrayRoot(com.google.gson.JsonArray jsonArray, JsonSchema parent) Creates the schema when the root is an arraycreateSchemaForObject(com.google.gson.JsonObject jsonObject, JsonSchema parent)
-
Field Details
-
AT_PREFIX
- See Also:
-
DOLLLAR_AT_PREFIX
- See Also:
-
DOLLAR_PREFIX
- See Also:
-
HASHCONTENT
- See Also:
-
CONTENT
- See Also:
-
XSI_TYPE_OLD
- See Also:
-
XSI_TYPE_READABLE
- See Also:
-
root
-
-
Constructor Details
-
SchemaBuilder
public SchemaBuilder()
-
-
Method Details
-
createSchema
-
createSchemaForObject
-
createSchemaForArrayRoot
Creates the schema when the root is an array- Parameters:
jsonArray-parent-
-
createSchemaForArray
public com.google.gson.JsonObject createSchemaForArray(com.google.gson.JsonElement childElement, JsonSchema parent, String id, com.google.gson.JsonObject jsonObject) -
addObjectToParent
-
addArrayToParent
-
addPrimitiveToParent
protected JsonSchema addPrimitiveToParent(JsonSchema parent, String id, String value, SchemaBuilder.TypeEnum propertyValueType, Map<String, String> elementIdentifierMap) -
addObjectToParentItemsArray
-
addArrayToParentItemsArray
Add an array type object into parents items array.- Parameters:
parent- parent schemaid- identifier of the new object- Returns:
- new schema
-
addPrimitiveToParentItemsArray
protected JsonSchema addPrimitiveToParentItemsArray(JsonSchema parent, String id, SchemaBuilder.TypeEnum propertyValueType)
-