{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.bendowney.com/interview.schema.json",
  "title": "Ben Downey interview",
  "type": "object",
  "required": [
    "schema_version",
    "kind",
    "person",
    "urls",
    "skills",
    "sections",
    "answers"
  ],
  "properties": {
    "schema_version": {
      "type": "string"
    },
    "kind": {
      "const": "interview"
    },
    "title": {
      "type": "string"
    },
    "summary": {
      "type": "string"
    },
    "fit": {
      "type": "string"
    },
    "self_check": {
      "type": "string"
    },
    "person": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "headline": {
          "type": "string"
        },
        "site": {
          "type": "string"
        },
        "contact": {
          "type": "string"
        }
      }
    },
    "urls": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "how_to_read": {
      "type": "object"
    },
    "skill_scale": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "skills": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "rating",
          "scale_max"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "rating": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4
          },
          "scale_max": {
            "const": 4
          },
          "evidence": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "self_rated": {
            "type": "boolean"
          },
          "source": {
            "type": "string"
          }
        }
      }
    },
    "perspectives": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "position": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      }
    },
    "security": {
      "type": "object"
    },
    "resources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "code",
              "writing"
            ]
          },
          "cited_by": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "provenance": {
      "type": "object"
    },
    "sections": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "answers"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "answers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "answers": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "section",
          "label",
          "question",
          "answer",
          "url",
          "review"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^(q|sme|e|r)\\d+$"
          },
          "kind": {
            "enum": [
              "question",
              "exercise",
              "profile"
            ]
          },
          "section": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "answer": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "ratings": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "rating",
                "scale_max"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "rating": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 4
                },
                "scale_max": {
                  "const": 4
                },
                "evidence": {
                  "type": "string"
                }
              }
            }
          },
          "detail": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "limits": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "see_also": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "diagram": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "description": {
                "type": "string"
              }
            }
          },
          "terminal_output": {
            "type": "object",
            "properties": {
              "command": {
                "type": "string"
              },
              "date": {
                "type": "string"
              },
              "data": {
                "type": "string"
              },
              "text": {
                "type": "string"
              }
            }
          },
          "attribution": {
            "type": "object",
            "properties": {
              "me": {
                "type": "string"
              },
              "ai": {
                "type": "string"
              }
            }
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "title",
                "url"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              }
            }
          },
          "review": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        }
      }
    }
  }
}
