|
NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
|
JSON Schema 2020-12 validation shared by NeoGraph's MCP server, MCP client and Harness. More...
Go to the source code of this file.
Functions | |
| NEOGRAPH_API void | neograph::mcp::validate_json_schema (const json &schema, const std::string &path="$schema") |
Check that schema is a JSON Schema 2020-12 document this validator supports; throw std::invalid_argument naming the offending keyword. | |
| NEOGRAPH_API void | neograph::mcp::validate_json_value (const json &value, const json &schema, const std::string &subject="JSON value", const std::string &path="$") |
Validate value against schema (checked as above first). | |
JSON Schema 2020-12 validation shared by NeoGraph's MCP server, MCP client and Harness.
MCP 2025-11-25 ("JSON Schema Usage") makes 2020-12 the default dialect of every tool schema. Supported: the core, applicator, unevaluated and validation vocabularies, boolean schemas and local $ref (JSON Pointer fragments, $anchor names, $id resources in the same document); format and the content and meta-data keywords are annotations. A schema that names another dialect in $schema, uses $dynamicRef or $recursiveRef, references another document, or has a pattern std::regex cannot compile is refused by validate_json_schema().
Definition in file json_schema.h.
| NEOGRAPH_API void neograph::mcp::validate_json_value | ( | const json & | value, |
| const json & | schema, | ||
| const std::string & | subject = "JSON value", |
||
| const std::string & | path = "$" |
||
| ) |
Validate value against schema (checked as above first).
Throw std::invalid_argument whose message starts with "<subject> at <path>".
References neograph::mcp::validate_json_value().
Referenced by neograph::mcp::validate_json_value().