feat: offline-first event firmware metadata (JSON schema + bundled asset)#5920
Merged
Conversation
Define the offline-first contract for event-specific firmware metadata (HAMVENTION, OPEN_SAUCE, DEFCON, BURNING_MAN): a JSON Schema and a bundled seed asset. Mirrors the device_links.json envelope shape so a future GET /resource/eventFirmware response can drop-in replace the bundled file. This is the data contract only; wiring it into the app (model + loader + repository, migrating the hardcoded EventEdition.kt) and the upstream REST endpoint are deliberately follow-up work. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reword the top-level description: it implied an enum-keyed object ('keyed
within each record') vs the actual array-of-records, and over-claimed a
byte-identical 'frozen copy / drop-in replace' that sat awkwardly next to
strict additionalProperties. Now states the envelope is shared with a future
API and the schema is the authoring contract, bumped as the shape evolves.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Defines the offline-first data contract for event-specific firmware editions (Hamvention, Open Sauce, DEFCON, Burning Man), so the app can later drive event-specific UI/UX from data instead of the hardcoded
EventEdition.ktmapping. This PR is the contract only — no app wiring and no upstream API endpoint yet (both deliberately follow-up).🌟 New Features
schemas/event_firmware.schema.json— JSON Schema (draft 2020-12) defining the contract: a{version, generatedAt, source, editions[]}envelope (mirroringdevice_links.json) where each record carriesedition(theFirmwareEditionproto enum name),displayName,welcomeMessage, plus optionaleventStart/eventEnd,timeZone,location,iconUrl,accentColor, and labeledlinks.androidApp/src/main/assets/event_firmware.json— bundled seed data for the 4 current editions.displayName/welcomeMessagereuse today's values;eventStart/eventEnd/accentColorare best-effort seed placeholders (events recur yearly — the upstream sync will own them);iconUrlisnull(no hosted icons yet).Design notes
GET /resource/eventFirmwareresponse will use and deserializes cleanly into a@Serializablemodel later.editionis a regexpattern, not a fixed enum list, so adding a new event needs no schema change.welcomeMessageis a plain English string — this intentionally drops the Crowdin per-language localization the string resources provided; documented in the schema, to be revisited with the upstream API.Not in this PR (follow-ups)
EventEdition.kt) and the upstream REST endpoint.BundledAssetReaderseam) — split into its own task, to land before the event-API wiring.additionalProperties/requiredstrictness once a real API + CI snapshot validation exist.🧹 Testing Performed
ajv(draft 2020-12); a negative control (typo'd key) is correctly rejected byadditionalProperties:false.jqthat the 4editionkeys are realFirmwareEditionnames and all fields are present.🤖 Generated with Claude Code