Skip to content

CCIP-App/schedule-json-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@ccip-app/schedule-json-validator

Canonical OPass Schedule JSON contract and validator.

OPass Schedule JSON is the interchange format consumed by OPass apps. Google Sheets, Pretalx, and other systems are input sources; converters for those systems should emit OPass Schedule JSON and validate it with this package.

Validate a schedule

Run the CLI directly with npx:

npx --yes @ccip-app/schedule-json-validator schedule.json

Use strict mode when a generated schedule is about to be published:

npx --yes @ccip-app/schedule-json-validator --strict schedule.json

The CLI exits with 0 when the schedule is valid and 1 when validation fails. In base mode, warnings are reported but do not fail validation. Strict mode promotes warnings to failures.

In a local checkout, run the bundled CLI directly:

node bin/opass-schedule-validate.js schedule.json

Use as a library

import { validateSchedule } from "@ccip-app/schedule-json-validator"

const result = validateSchedule(schedule)
if (!result.valid) {
  console.error(result.errors)
}

Format contract

The human-readable contract lives in docs/opass-schedule-contract.md. The machine-readable shape contract lives in schemas/opass-schedule.v1.schema.json.

The schema intentionally allows extra properties. Required fields follow the app-compatible schedule contract. Semantic checks such as session.room referencing rooms[].id live in the validator; type, speaker, and tag reference misses are warnings unless strict mode is enabled.

Ecosystem roles

  • schedule-json-validator: schedule contract, schema, fixtures, and validator
  • schedule-json-generator: Google Sheets to OPass Schedule converter
  • schedule-json-generator-action: GitHub Action wrapper for generated schedules
  • Android, iOS, and KMP apps: reference consumers for render-required fields

Fixtures

The examples/ directory contains small conformance fixtures:

  • examples/minimal.valid.json: smallest app-compatible schedule fixture
  • examples/invalid-missing-room.json: broken required reference fixture
  • examples/warnings-unknown-refs.json: fallback-compatible warning fixture

Development

npm test

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors