{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pipeshub/json-schema/pipeshub-aimodel-field-schema-schema.json",
  "title": "AIModelFieldSchema",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pipeshub-ai-models-providers-api-openapi.yml#/components/schemas/AIModelFieldSchema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Field key used in configuration payloads"
    },
    "displayName": {
      "type": "string",
      "description": "Human-readable label"
    },
    "fieldType": {
      "type": "string",
      "description": "Input type hint (TEXT, SECRET, URL, NUMBER, SELECT, TOGGLE)"
    },
    "required": {
      "type": "boolean"
    },
    "defaultValue": {
      "type": [
        "string",
        "null"
      ]
    },
    "placeholder": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "isSecret": {
      "type": "boolean"
    },
    "options": {
      "type": "array",
      "description": "Available options when fieldType is SELECT",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      }
    },
    "validation": {
      "type": "object",
      "description": "Validation constraints (e.g. min, max, pattern)",
      "additionalProperties": true
    }
  }
}