How to apply a type cast in a JSON Schema validation – PHP
I am trying to use JSON Schema to validate inputs to an API. The input follows a very simple schema: { "$schema": "https://json-schema.org/draft-07/schema", "type": "object", "properties": { "some_key": { "anyOf": [ { "type": "integer" }, { "type": "string", "pattern": "^(0|[1-9][0-9]*)$"…