{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/valjeanspecialty/json-schema/valjeanspecialty-guide-schema.json",
  "title": "Guide",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/valjeanspecialty-openapi.yaml#/components/schemas/Guide",
  "allOf": [
    {
      "$ref": "#/$defs/GuideSummary"
    },
    {
      "type": "object",
      "properties": {
        "updated_at": {
          "type": "string",
          "format": "date-time"
        },
        "appetite": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string"
              },
              "fit": {
                "type": "string",
                "enum": [
                  "good",
                  "possible",
                  "unlikely",
                  "unknown"
                ]
              },
              "headline": {
                "type": "string"
              },
              "market_count_label": {
                "type": "string"
              }
            },
            "required": [
              "state",
              "fit",
              "headline",
              "market_count_label"
            ]
          }
        },
        "needs": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "level": {
                "type": "string",
                "enum": [
                  "required",
                  "sometimes",
                  "helpful"
                ]
              },
              "kind": {
                "type": "string"
              },
              "answer": {
                "$ref": "#/$defs/AnswerSpec"
              },
              "help": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "confirmed": {
                "type": "boolean",
                "description": "False: Valjean's typical list, not yet confirmed with an underwriter; say \"typically\"."
              }
            },
            "required": [
              "key",
              "label",
              "level",
              "kind",
              "answer",
              "help",
              "confirmed"
            ]
          }
        },
        "disclaimer": {
          "type": "string"
        }
      },
      "required": [
        "updated_at",
        "appetite",
        "needs",
        "disclaimer"
      ]
    }
  ],
  "$defs": {
    "AnswerSpec": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "How to answer. \"file\" means upload a document instead.",
          "enum": [
            "text",
            "number",
            "money",
            "percent",
            "yes_no",
            "choice",
            "date",
            "file"
          ]
        },
        "options": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "For type \"choice\": the allowed answers."
        }
      },
      "required": [
        "type"
      ]
    },
    "GuideSummary": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "class": {
          "type": "string"
        },
        "line": {
          "type": "string"
        },
        "line_name": {
          "type": "string"
        },
        "naics_prefixes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "keywords": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "key",
        "name",
        "class",
        "line",
        "line_name",
        "naics_prefixes",
        "keywords"
      ]
    }
  }
}