✔️ JSON Schemamedium
3. Constrain a number's range
Write a schema for an object with a required "port" that is an integer between 0 and 65535 (inclusive).
How to approach this
Beyond types, JSON Schema constrains VALUES: "minimum" and "maximum" bound a number. Combine type: "integer" with minimum: 0 and maximum: 65535. A valid port passes; a port above 65535, or a string, must fail.
schema.json