Class DefaultJsonSchemaValidator
java.lang.Object
io.modelcontextprotocol.json.schema.jackson.DefaultJsonSchemaValidator
- All Implemented Interfaces:
JsonSchemaValidator
@Deprecated(forRemoval=true,
since="18.0.0")
public class DefaultJsonSchemaValidator
extends Object
implements JsonSchemaValidator
Deprecated, for removal: This API element is subject to removal in a future version.
Default implementation of the
JsonSchemaValidator interface. This class
provides methods to validate structured content against a JSON schema. It uses the
NetworkNT JSON Schema Validator library for validation.- Author:
- Christian Tzolov
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.modelcontextprotocol.json.schema.JsonSchemaValidator
JsonSchemaValidator.ValidationResponse -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.DefaultJsonSchemaValidator(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.Clears the schema cache.protected StringgenerateCacheKey(Map<String, Object> schema) Deprecated, for removal: This API element is subject to removal in a future version.Generates a cache key for the given schema map.intDeprecated, for removal: This API element is subject to removal in a future version.Returns the current size of the schema cache.Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
DefaultJsonSchemaValidator
public DefaultJsonSchemaValidator()Deprecated, for removal: This API element is subject to removal in a future version. -
DefaultJsonSchemaValidator
public DefaultJsonSchemaValidator(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
validate
public JsonSchemaValidator.ValidationResponse validate(Map<String, Object> schema, Object structuredContent) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
validatein interfaceJsonSchemaValidator
-
generateCacheKey
Deprecated, for removal: This API element is subject to removal in a future version.Generates a cache key for the given schema map.- Parameters:
schema- the schema map- Returns:
- a cache key string
-
clearCache
public void clearCache()Deprecated, for removal: This API element is subject to removal in a future version.Clears the schema cache. Useful for testing or memory management. -
getCacheSize
public int getCacheSize()Deprecated, for removal: This API element is subject to removal in a future version.Returns the current size of the schema cache.- Returns:
- the number of cached schemas
-
DefaultJsonSchemaValidatorinstead. Will be removed in 19.0.0.