← Schemas Academy

Build the solution · 1 / 5

Require the delivery identifier

Reject deliveries that cannot be tracked.

YOUR TASK

Make this happen

2 steps
  1. Build the delivery JSON Schema with a required nonempty trackingId string and additionalProperties false.

  2. Check the complete solution, then inspect any unmet requirements.

Read the starter files

main.cococo

external_schema "supplier" {
  name = "Supplier delivery contract"
  format = "JSON_SCHEMA"
  sourceText = file("contract.json")
}

contract.json

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Supplier delivery",
  "type": "object",
  "additionalProperties": false,
  "properties": {},
  "required": []
}

Reference: schemas · authoringschemas · external-schemas