Skip to content

Document magic.json contract in README#257

Open
Copilot wants to merge 5 commits into
mainfrom
copilot/update-readme-magic-json
Open

Document magic.json contract in README#257
Copilot wants to merge 5 commits into
mainfrom
copilot/update-readme-magic-json

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 5, 2026

README’s magic.json section was a single high-level paragraph and did not describe the file contract. This PR adds a concise, schema-aligned spec so contributors know what belongs in magic.json and how to produce it reliably.

  • What was missing

    • Clarifies magic.json purpose as Adafruit IO export metadata for built-in board components.
    • Explicitly links validation source: /boards/magic_schema.json.
  • Schema contract added

    • Documents required top-level keys: exportVersion, exportedBy, exportedAt, exportedFromDevice, components.
    • Documents required exportedFromDevice keys: board, firmwareVersion.
    • Documents required per-component keys: name, type.
    • Notes that component objects must match one schema variant (oneOf: pin/I2C/PWM/pixel/DS18X20/UART/servo/display).
  • Authoring guidance

    • Recommends configuring built-in components in Adafruit IO and exporting magic.json rather than hand-crafting.
    • Adds concrete example paths to existing magic.json files for reference.
  • Example (added format guidance)

    | `exportedAt` | string | Timestamp when the file was exported (typically an ISO 8601 UTC timestamp from Adafruit IO, e.g. `2023-11-13T19:41:29.465Z`). |
    | `type` | string | WipperSnapper component type identifier (for example `push_button`, `dimmable_led`, `neopixel`, or `lc709203f:voltage`). |

Copilot AI linked an issue Jun 5, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Update README.md to include magic.json details Document magic.json contract in README Jun 5, 2026
Copilot finished work on behalf of tyeth June 5, 2026 17:26
Copilot AI requested a review from tyeth June 5, 2026 17:27
@tyeth tyeth marked this pull request as ready for review June 5, 2026 19:17
tyeth added 2 commits June 5, 2026 20:35
Added section on visualizations and UI control customization.
Added recommendation for configuring components via settings cog.
@tyeth tyeth requested a review from brentru June 5, 2026 19:38
@tyeth
Copy link
Copy Markdown
Member

tyeth commented Jun 5, 2026

@brentru this is ready for review, and closes #241

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

README.md missing magic.json

2 participants