Schema warnings for what seems to be a valid json schema

 

I have a json schema that I think is valid, but many warnings are surfaced in the editor.   I searched may web sites and tried to validate the schema several waya.  The schema seems to be valid.  I am actually able to use this schema to validate many input files - although I know that's not a definitive test….

Here is the schema - it's a bit long:

{
  "_description": "Architecture Schema Definition",
  "_purpose": "JSON Schema specification for architecture manifest files. Defines the structure, validation rules, and type constraints for architecture diagrams and components.",
  "_version": "2.0",
  "_features": ["Component definitions", "Relationship modeling", "Environment specifications", "Decision records", "Visual layout extensions"],
  "_file": "src/arch-schema2.json",

  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.org/schemas/architecture.schema.json",
  "title": "Technology Solution Architecture Manifest",
  "type": "object",
  "additionalProperties": false,
  "required": ["schemaVersion", "metadata", "components"],
  "properties": {
    "schemaVersion": {
      "type": "string",
      "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:[-+].*)?$",
      "description": "SemVer for this manifest format (not your product version)."
    },
    "metadata": {
      "type": "object",
      "additionalProperties": false,
      "required": ["name", "created"],
      "properties": {
        "name": { "type": "string", "minLength": 1 },
        "description": { "type": "string" },
        "owners": {
          "type": "array",
          "items": { "type": "string", "minLength": 1 },
          "uniqueItems": true
        },
        "created": { "type": "string", "format": "date-time" },
        "modified": { "type": "string", "format": "date-time" },
        "tags": { "$ref": "#/$defs/tags" },
        "links": {
          "type": "array",
          "items": { "$ref": "#/$defs/link" }
        }
      }
    },
    "components": {
      "type": "array",
      "minItems": 1,
      "items": { "$ref": "#/$defs/component" },
      "description": "List of components. Each component.id SHOULD be globally unique."
    },
    "relationships": {
      "type": "array",
      "items": { "$ref": "#/$defs/relationship" }
    },
    "environments": {
      "type": "array",
      "items": { "$ref": "#/$defs/environment" }
    },
    "decisions": {
      "description": "Architecture Decision Records (ADRs) or decision log entries.",
      "type": "array",
      "items": { "$ref": "#/$defs/decision" }
    },
    "views": {
      "description": "Optional named views (e.g., C4 context/container/component), selecting subsets of nodes/edges.",
      "type": "array",
      "items": { "$ref": "#/$defs/view" }
    },
    "extensions": {
      "description": "Free-form vendor/project-specific fields kept separate from the core. 'visual' is a standardized optional namespace.",
      "type": "object",
      "properties": {
        "visual": { "$ref": "#/$defs/visualExtension" }
      },
      "additionalProperties": true
    }
  },

  "$defs": {
    "identifier": {
      "type": "string",
      "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{1,63}$",
      "description": "Short, URL/CLI-friendly id (2–64 chars)."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-zA-Z0-9_.-]{1,64}$"
      },
      "uniqueItems": true
    },
    "link": {
      "type": "object",
      "additionalProperties": false,
      "required": ["rel", "href"],
      "properties": {
        "rel": { "type": "string", "minLength": 1 },
        "href": { "type": "string", "format": "uri" },
        "title": { "type": "string" }
      }
    },

    "component": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "name", "type"],
      "properties": {
        "id": { "$ref": "#/$defs/identifier" },
        "name": { "type": "string", "minLength": 1 },
        "type": {
          "type": "string",
          "enum": [
            "person", "system", "externalSystem",
            "container", "service", "function",
            "component", "library", "module",
            "database", "cache", "queue", "topic", "storage",
            "api", "gateway", "proxy", "loadBalancer",
            "ui", "mobileApp", "device",
            "secret", "config"
          ]
        },
        "description": { "type": "string" },
        "owner": { "type": "string" },
        "version": {
          "type": "string",
          "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:[-+].*)?$",
          "description": "SemVer for the component version (optional)."
        },
        "lifecycle": { "type": "string", "enum": ["experimental", "beta", "ga", "deprecated", "retired"] },
        "tags": { "$ref": "#/$defs/tags" },
        "tech": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "language": { "type": "string" },
            "framework": { "type": "string" },
            "platform": { "type": "string" }
          }
        },
        "interfaces": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "provides": {
              "type": "array",
              "items": { "$ref": "#/$defs/interface" }
            },
            "requires": {
              "type": "array",
              "items": { "$ref": "#/$defs/interface" }
            }
          }
        },
        "props": {
          "type": "object",
          "description": "Arbitrary structured properties (non-validating).",
          "additionalProperties": true
        }
      }
    },

    "interface": {
      "type": "object",
      "additionalProperties": false,
      "required": ["name"],
      "properties": {
        "name": { "type": "string", "minLength": 1 },
        "protocol": {
          "type": "string",
          "enum": ["http", "https", "grpc", "tcp", "udp", "amqp", "mqtt", "kafka", "sqs", "sns", "eventbridge", "custom"]
        },
        "endpoint": { "type": "string", "description": "Path/URL/topic/queue name as applicable." },
        "port": { "type": "integer", "minimum": 1, "maximum": 65535 },
        "messageSchemaRef": { "type": "string", "description": "URI or identifier to a message/schema." },
        "sla": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "latencyMsP95": { "type": "number", "minimum": 0 },
            "availabilityPct": { "type": "number", "minimum": 0, "maximum": 100 },
            "throughputPerSec": { "type": "number", "minimum": 0 }
          }
        }
      },
      "allOf": [
        {
          "if": {
            "properties": { "protocol": { "enum": ["http", "https", "grpc", "tcp", "udp"] } },
            "required": ["protocol"]
          },
          "then": { "required": ["port"] }
        },
        {
          "if": {
            "properties": { "protocol": { "enum": ["http", "https", "grpc", "amqp", "mqtt", "kafka", "sqs", "sns", "eventbridge"] } },
            "required": ["protocol"]
          },
          "then": { "required": ["endpoint"] }
        }
      ]
    },

    "relationship": {
      "type": "object",
      "additionalProperties": false,
      "required": ["source", "target", "type"],
      "properties": {
        "id": { "$ref": "#/$defs/identifier" },
        "source": { "$ref": "#/$defs/identifier" },
        "target": { "$ref": "#/$defs/identifier" },
        "type": {
          "type": "string",
          "enum": [
            "uses", "calls", "reads", "writes",
            "publishes", "subscribes",
            "depends_on", "connects_to",
            "authenticates_via", "replicates_to"
          ]
        },
        "description": { "type": "string" },
        "technology": { "type": "string", "description": "Protocol/tech used for the relationship (e.g., HTTPS, gRPC, Kafka)." },
        "nonFunctional": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "ratePerSec": { "type": "number", "minimum": 0 },
            "payloadBytes": { "type": "number", "minimum": 0 },
            "sloAvailabilityPct": { "type": "number", "minimum": 0, "maximum": 100 }
          }
        },
        "tags": { "$ref": "#/$defs/tags" }
      },
      "description": "Connection semantics between components. Hosting/containment is modeled via environments/deployment nodes."
    },

    "environment": {
      "type": "object",
      "additionalProperties": false,
      "required": ["name", "nodes"],
      "properties": {
        "name": { "type": "string", "minLength": 1, "description": "e.g., dev, qa, staging, prod, us-east-1" },
        "description": { "type": "string" },
        "tags": { "$ref": "#/$defs/tags" },
        "nodes": {
          "type": "array",
          "items": { "$ref": "#/$defs/deploymentNode" }
        }
      },
      "description": "Authoritative source for hosting/containment. Do not model containment via relationships."
    },

    "deploymentNode": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "kind"],
      "properties": {
        "id": { "$ref": "#/$defs/identifier" },
        "name": { "type": "string" },
        "kind": {
          "type": "string",
          "enum": ["kubernetes", "container", "vm", "serverless", "edge", "databaseService", "cacheService", "messageBroker", "cdn", "custom"]
        },
        "location": { "type": "string", "description": "Cloud region, DC, or zone." },
        "hosts": {
          "type": "array",
          "items": { "$ref": "#/$defs/hostedComponent" }
        },
        "props": {
          "type": "object",
          "additionalProperties": true
        }
      }
    },

    "hostedComponent": {
      "type": "object",
      "additionalProperties": false,
      "required": ["componentRef"],
      "properties": {
        "componentRef": { "$ref": "#/$defs/identifier" },
        "replicas": { "type": "integer", "minimum": 1, "default": 1 },
        "resources": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "cpu": { "type": "string", "description": "e.g., 500m, 2 cores" },
            "memory": { "type": "string", "description": "e.g., 512Mi, 4Gi" },
            "storage": { "type": "string" }
          }
        },
        "env": {
          "type": "object",
          "additionalProperties": { "type": "string" }
        }
      }
    },

    "decision": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "title", "status", "date"],
      "properties": {
        "id": { "$ref": "#/$defs/identifier" },
        "title": { "type": "string", "minLength": 1 },
        "status": { "type": "string", "enum": ["proposed", "accepted", "rejected", "deprecated", "superseded"] },
        "date": { "type": "string", "format": "date" },
        "context": { "type": "string" },
        "decision": { "type": "string" },
        "consequences": { "type": "string" },
        "tags": { "$ref": "#/$defs/tags" }
      }
    },

    "view": {
      "type": "object",
      "additionalProperties": false,
      "required": ["name"],
      "properties": {
        "name": { "type": "string", "minLength": 1 },
        "description": { "type": "string" },
        "componentIds": {
          "type": "array",
          "items": { "$ref": "#/$defs/identifier" },
          "uniqueItems": true
        },
        "relationshipIds": {
          "type": "array",
          "items": { "$ref": "#/$defs/identifier" },
          "uniqueItems": true,
          "description": "If omitted and deriveEdges=true, edges are derived from components."
        },
        "tags": { "$ref": "#/$defs/tags" },
        "deriveEdges": {
          "type": "boolean",
          "default": true,
          "description": "If true and relationshipIds are not specified, derive edges that connect included components."
        }
      }
    },

    "visualExtension": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "layout": {
          "type": "object",
          "patternProperties": {
            "^[a-zA-Z][a-zA-Z0-9_-]{1,63}$": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "x": { "type": "number" },
                "y": { "type": "number" },
                "width": { "type": "number", "minimum": 0 },
                "height": { "type": "number", "minimum": 0 }
              },
              "required": ["x", "y"]
            }
          },
          "additionalProperties": false
        },
        "viewport": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "x": { "type": "number" },
            "y": { "type": "number" },
            "zoom": { "type": "number", "minimum": 0.01, "maximum": 16 }
          },
          "required": ["x", "y", "zoom"]
        }
      }
    }
  }
}

one of the warnings are as follows:

 

 

I've also added this to the mappings config as follows:

No errors or warnings show when editing the test-architecture.json file.

Not sure where to go fro here….

0

Please could you share a .json file that reproduces the issue?

0

I'm getting the same thing in Android Studio. The validator thinks ALL uses of “description” must be only a string. When we can't use such a common property as “description” in our JSON files but only in the Schema there's a problem. This is a BIG bug.

0

I see similar incorrect validation warnings in IntelliJ  2025.2.5 with a very simple example:



{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "type": "string",
  "enum": [
    "ONE"
  ]
}

IntelliJ IDEA 2025.2.5 (Ultimate Edition)
Build #IU-252.28238.7, built on November 19, 2025
Source revision: 7059016f3609e
Runtime version: 21.0.9+10-b1038.76 aarch64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 14.7.8
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 14
Metal Rendering is ON
Registry:
 ide.experimental.ui=true
Non-Bundled Plugins:
 JavaScriptDebugger (252.28238.33)
 com.intellij.notebooks.core (252.28238.9)
 Subversion (252.28238.33)
 com.intellij.copyright (252.28238.33)
 org.editorconfig.editorconfigjetbrains (252.28238.22)
 org.jetbrains.plugins.yaml (252.28238.33)
 org.toml.lang (252.28238.9)
 com.intellij.kubernetes (252.28238.33)
 net.aybat.x509.plugin (3.1)
 com.intellij.properties (252.28238.9)
 com.intellij.velocity (252.28238.9)
 org.jetbrains.plugins.spotbugs (1.2.8)
 CheckStyle-IDEA (5.115.0)
 com.intellij.swagger (252.28238.33)
 com.jetbrains.restClient (252.28238.33)
 gherkin (252.25557.23)
 intellij.jupyter (252.28238.22)
 Docker (252.28238.33)
 PlantUML integration (7.13.0-IJ2023.2)
 org.jetbrains.plugins.gitlab (252.28238.33-IU)
 org.jetbrains.plugins.github (252.28238.33-IU)
 JavaScript (252.28238.29)
 com.intellij.react (252.28238.29)
 org.jetbrains.plugins.vue (252.28238.32)
 com.github.copilot (1.5.61-243)
 com.intellij.mcpServer (252.28238.29)
 org.sonarlint.idea (11.6.0.83783)
 org.jetbrains.security.package-checker (252.28238.22)
 com.intellij.microservices.ui (252.28238.33)
Kotlin: 252.28238.7-IJ

 

0

This issue is tracked at IJPL-196556. Please vote for this ticket to get notified of any progress.

0

请先登录再写评论。