Package io.modelcontextprotocol.spec
Interface JsonSchemaValidator
- All Known Implementing Classes:
DefaultJsonSchemaValidator
public interface JsonSchemaValidator
Interface for validating structured content against a JSON schema. This interface
defines a method to validate structured content based on the provided output schema.
- Author:
- Christian Tzolov
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordRepresents the result of a validation operation. -
Method Summary
-
Method Details
-
validate
JsonSchemaValidator.ValidationResponse validate(Map<String, Object> schema, Map<String, Object> structuredContent) Validates the structured content against the provided JSON schema.- Parameters:
schema- The JSON schema to validate against.structuredContent- The structured content to validate.- Returns:
- A ValidationResponse indicating whether the validation was successful or not.
-