{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/merofoundry-com/json-schema/merofoundry-com-model-detail-response-schema.json",
  "title": "ModelDetailResponse",
  "description": "Schema for model detail responses including fields.",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/merofoundry-com-openapi.json#/components/schemas/ModelDetailResponse",
  "properties": {
    "applicationId": {
      "format": "uuid",
      "title": "Applicationid",
      "type": "string"
    },
    "createdAt": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Createdat"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "draftDiffersFromPublished": {
      "default": false,
      "title": "Draftdiffersfrompublished",
      "type": "boolean"
    },
    "draftSchemaVersion": {
      "title": "Draftschemaversion",
      "type": "integer"
    },
    "fields": {
      "items": {
        "$ref": "#/$defs/FieldResponse"
      },
      "title": "Fields",
      "type": "array"
    },
    "icon": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Icon"
    },
    "id": {
      "format": "uuid",
      "title": "Id",
      "type": "string"
    },
    "isSystem": {
      "title": "Issystem",
      "type": "boolean"
    },
    "label": {
      "title": "Label",
      "type": "string"
    },
    "name": {
      "title": "Name",
      "type": "string"
    },
    "pluralLabel": {
      "title": "Plurallabel",
      "type": "string"
    },
    "publishedSchemaVersion": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Publishedschemaversion"
    },
    "schemaState": {
      "title": "Schemastate",
      "type": "string"
    },
    "settings": {
      "additionalProperties": true,
      "title": "Settings",
      "type": "object"
    },
    "tenantId": {
      "format": "uuid",
      "title": "Tenantid",
      "type": "string"
    },
    "updatedAt": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Updatedat"
    },
    "workspaceId": {
      "format": "uuid",
      "title": "Workspaceid",
      "type": "string"
    }
  },
  "required": [
    "id",
    "tenantId",
    "workspaceId",
    "applicationId",
    "name",
    "label",
    "pluralLabel",
    "isSystem",
    "schemaState",
    "draftSchemaVersion"
  ],
  "type": "object",
  "$defs": {
    "FieldResponse": {
      "description": "Schema for field data in responses.",
      "properties": {
        "createdAt": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Createdat"
        },
        "defaultValue": {
          "title": "Defaultvalue"
        },
        "id": {
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "isRequired": {
          "title": "Isrequired",
          "type": "boolean"
        },
        "isUnique": {
          "title": "Isunique",
          "type": "boolean"
        },
        "label": {
          "title": "Label",
          "type": "string"
        },
        "modelId": {
          "format": "uuid",
          "title": "Modelid",
          "type": "string"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "position": {
          "title": "Position",
          "type": "integer"
        },
        "settings": {
          "additionalProperties": true,
          "title": "Settings",
          "type": "object"
        },
        "tenantId": {
          "format": "uuid",
          "title": "Tenantid",
          "type": "string"
        },
        "type": {
          "title": "Type",
          "type": "string"
        },
        "updatedAt": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Updatedat"
        },
        "workspaceId": {
          "format": "uuid",
          "title": "Workspaceid",
          "type": "string"
        }
      },
      "required": [
        "id",
        "tenantId",
        "workspaceId",
        "modelId",
        "name",
        "label",
        "type",
        "isRequired",
        "isUnique",
        "position"
      ],
      "title": "FieldResponse",
      "type": "object"
    }
  }
}