{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/genko-me/json-schema/genko-me-schema-response-schema.json",
  "title": "SchemaResponse",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/genko-me-openapi.json#/components/schemas/SchemaResponse",
  "type": "object",
  "required": [
    "workspace",
    "apis"
  ],
  "properties": {
    "workspace": {
      "type": "string",
      "description": "The workspace slug"
    },
    "apis": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ApiDefinition"
      }
    }
  },
  "$defs": {
    "ApiDefinition": {
      "type": "object",
      "required": [
        "name",
        "endpoint",
        "kind",
        "fields"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "The API's display name"
        },
        "endpoint": {
          "type": "string",
          "description": "The API's endpoint name"
        },
        "kind": {
          "type": "string",
          "enum": [
            "list",
            "object"
          ],
          "description": "list is list kind, object is object kind"
        },
        "fields": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FieldDefinition"
          }
        }
      }
    },
    "FieldDefinition": {
      "type": "object",
      "description": "The field definition. Returned as-is from what was saved in the admin UI, so keys not documented here may be included.",
      "required": [
        "id",
        "name",
        "type",
        "required"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The field ID (the key in the delivery response)"
        },
        "name": {
          "type": "string",
          "description": "The field's display name"
        },
        "type": {
          "type": "string",
          "enum": [
            "text",
            "textarea",
            "richtext",
            "image",
            "images",
            "datetime",
            "boolean",
            "select",
            "reference",
            "references",
            "number",
            "file",
            "extension"
          ]
        },
        "required": {
          "type": "boolean"
        },
        "settings": {
          "type": "object",
          "description": "Settings specific to each field type",
          "properties": {
            "multiple": {
              "type": "boolean",
              "description": "Whether select allows multiple selections"
            },
            "options": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The options for select"
            },
            "referenceApi": {
              "type": "string",
              "description": "The endpoint of the API referenced by reference/references"
            }
          },
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    }
  }
}