JSON Schemas 1.0

The three schemas of ledigt.org 1.0, JSON Schema draft 2020-12. They are served as application/json with Access-Control-Allow-Origin: *. The specification is a draft, so the schemas can change; see the changelog.

  • index.schema.json – Index file. The entry point of a publisher: who it is, the license, and either feed references or inline listings.
  • feed.schema.json – Feed file. One file with the listings of one category.
  • listing.schema.json – Listing. One listing. Referenced by the two schemas above.

The schemas' $id values use https://ledigt.org/schema/1.0/…, and the index and feed schemas refer to listing.schema.json by a relative reference. To validate offline, load all three files and register them under their $id.

A file must pass its schema and follow the rules in the specification. Some rules cannot be expressed in JSON Schema: id unique across all files of a publisher, dates that exist in the calendar, and count. /api/validate?url=<domain or URL> checks those too, for a published file.

På svenska: så validerar du som leverantör.