microsoft / microsoft/AdaptiveCards

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

Open
#9,274 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Schema Bug
Dominant language
C#
Stars
2k
Forks
595
Avg merge
1d 19h
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the adaptive-card.json schema linked in the issue and locate its source in the repository. Compare the declared Draft-06 metadata with the JSON Schema release notes, then validate the schema with a modern validator such as AJV. Done means the schema passes validation with the correct Draft-06 identifier.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.