{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://learn.math101.ca/data/content-submission-form.schema.json",
  "title": "Math101 Netlify contribution form payload",
  "description": "The raw string-valued fields sent by the public site-contribution HTML form. This transport payload is normalized and augmented with host metadata before editorial use.",
  "type": "object",
  "additionalProperties": false,
  "required": ["form-name", "schema_url", "kind", "experience_or_fact", "message", "privacy_acknowledged"],
  "properties": {
    "form-name": {"const": "site-contribution"},
    "schema_url": {"const": "https://learn.math101.ca/data/content-submission-form.schema.json"},
    "website-field": {"type": "string", "maxLength": 0},
    "kind": {"type": "string", "enum": ["question", "correction", "source_update", "guide_proposal", "lesson_proposal", "accessibility", "technical"]},
    "experience_or_fact": {"type": "string", "enum": ["official_fact", "research", "personal_experience", "question", "unsure"]},
    "page_url": {"type": "string", "maxLength": 500},
    "message": {"type": "string", "minLength": 10, "maxLength": 7000},
    "source_urls": {"type": "string", "maxLength": 4000, "description": "Up to ten proposed URLs, one per line; still untrusted until reviewed."},
    "name": {"type": "string", "maxLength": 100},
    "reply_email": {"type": "string", "maxLength": 200},
    "may_credit": {"const": "yes"},
    "may_quote_anonymously": {"const": "yes"},
    "privacy_acknowledged": {"const": "true"}
  }
}
