MatchAPI Core 1.0.0 is defined as a JSON Schema using JSON Schema Draft 2020-12.
The schema file is:
schema/matchapi-core-1.0.0.json
The schema identifier is:
https://matchapi.org/schema/matchapi-core-1.0.0.json
Schema validation checks that a MatchAPI dictionary has the correct JSON structure.
It checks, for example, that:
format constraints, such as uuid, date-time, and regex, are structurally valid, depending on validator support.Schema validation does not prove that:
Some of these checks require application-level validation beyond JSON Schema.
A MatchAPI dictionary must contain:
name
version
content
The root object uses:
"additionalProperties": false
Many nested objects also use unevaluatedProperties: false.
This means a validator should reject unsupported properties in those objects. Implementation-specific information should be represented through schema-defined mechanisms such as additionalData, where available.
See:
examples/minimal-api.matchapi.json
MatchAPI does not require a specific validator or programming language.
Use any validator that supports JSON Schema Draft 2020-12.
At a high level, the validation process is:
schema/matchapi-core-1.0.0.json.For published dictionaries, use at least two checks:
The second check is outside the scope of the core JSON Schema, but it is important for production use.
Cause:
Typical fix:
additionalData where supported.typeRef in a fieldField definitions require typeRef.
Typical fix:
{
"name": "ClOrdID",
"typeRef": {
"name": "String"
}
}
content in a message, component, or groupComplex elements require content.
Typical fix:
{
"name": "Heartbeat",
"msgType": "0",
"direction": "both",
"content": []
}
The only permitted message direction values are:
in, out, both
The only permitted data type values are:
primitive, derived, enum, array, composite, bitset