AdaptiveCards icon indicating copy to clipboard operation
AdaptiveCards copied to clipboard

[Authoring] JSON Schema specification violation: Using backward-incompatible "id" instead of "$id"

Open dimovpetar opened this issue 2 months ago • 0 comments

Target Application

any

Application Operating System

Windows

Schema Version

1.4

Problem Description

The Adaptive Cards JSON Schema at https://adaptivecards.io/schemas/adaptive-card.json contains a specification violation that causes validation errors in modern JSON Schema validators.

{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "id": "http://adaptivecards.io/schemas/adaptive-card.json"
}

The schema declares itself as JSON Schema Draft-06, but it uses the backward-incompatible "id" property instead of the correct "$id" property required by Draft-06 specification. See https://json-schema.org/draft-06/json-schema-release-notes#backwards-incompatible-changes

Expected Outcome

Since the schema declares Draft-06, it should use:

{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "$id": "https://adaptivecards.io/schemas/adaptive-card.json"
}

Actual Outcome

Modern JSON Schema validators (like AJV) reject the schema because:

  1. They see "$schema": "http://json-schema.org/draft-06/schema#" and expect Draft-06 syntax
  2. They encounter the backward-incompatible "id" property instead of "$id"
  3. This triggers validation errors since "id" is not valid in Draft-06+ meta-schemas

Card JSON

The issue is not related to specific card manifest, but to the cards schema itself.

Repro Steps

No response

dimovpetar avatar Oct 21 '25 13:10 dimovpetar