microsoft / microsoft/AdaptiveCards

AC Typed Schema files not valid JSON Schema

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

Nobody has claimed this yet.

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

Description

Why bother providing jsonschema definitions for AdaptiveCard and friends (and advertising it prominently) when the schema's aren't actually valid?

Discussed in https://github.com/microsoft/AdaptiveCards/discussions/8943

Originally posted by jamesthurley June 26, 2024
For example this file:

https://github.com/microsoft/AdaptiveCards/blob/main/schemas/src/enums/ImageSize.json

Says it uses this schema:

https://raw.githubusercontent.com/microsoft/AdaptiveCards/6f39aedce45864ae1067ed44a5551dc973790bb5/source/nodejs/typed-schema/schema/lib/Type.json

But it isn't valid against that schema. It contains an extra description property, and is missing the type property. Have the schemas for the ac-typed-schema JSON been abandoned? Would a PR to update them be appreciated?

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 with schemas/src/enums/ImageSize.json and the referenced source/nodejs/typed-schema/schema/lib/Type.json, then validate the example against that schema. Compare the other advertised AC typed-schema files for the same mismatches. Done means the typed-schema JSON files conform to their definitions, including required properties and no undeclared properties.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.