microsoft / microsoft/AdaptiveCards

[Authoring] "captionSources" schema throws an exception

Open
#8,610 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

AdaptiveCardVisualizer (WinUI3)

Application Operating System

Windows

Schema Version

1.6

Problem Description

In the schema for Media's "captionSources" type, the line "required": false, (link) throws an exception.

Exception thrown: 'Newtonsoft.Json.Schema.JSchemaReaderException' in Newtonsoft.Json.Schema.dll
Unexpected token encountered when reading value for 'required'. 
Expected StartArray, got Boolean. Path 'definitions.Media.properties.captionSources.required', 
line 1490, position 27.

I believe the field should be "isRequired" rather than required.

Expected Outcome

No exception.

Actual Outcome

Exception.

Card JSON
(Any card in the Visualizer)
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

Open schemas/1.6.0/adaptive-card.json around definitions.Media.properties.captionSources.required and compare nearby schema properties with the validator's expected keyword. Verify the correction by loading the 1.6 schema and opening any card in AdaptiveCardVisualizer; done means no schema exception is thrown.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, json
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.