Skip to content

Bases, starters, RFC 9457 across the catalog, and a home for the rule catalog - #33

Merged
kinlane merged 4 commits into
gh-pagesfrom
bases-and-rfc9457
Aug 17, 2026
Merged

kinlane merged 4 commits into
gh-pagesfrom
bases-and-rfc9457

Conversation

@kinlane

@kinlane kinlane commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

#32 merged while this was in flight, so the rest of #9 lands here. Builds on the layout fix that shipped in #32 — without it these base pages would not render.

Reuse across the base APIs

accounts, images and videos were description-and-tags stubs with no OpenAPI and no repo. All three now exist:

Repo Covers
api-commons/accounts list, create, read, merge-patch, close
api-commons/images upload, metadata, renditions, deletion
api-commons/videos upload, transcoding, renditions, captions, webhooks

Each ships an OpenAPI 3.1, an APIs.json index, a README, and Apache-2.0.

The RFC 9457 error components are byte-identical across all three, composed from one shared block rather than written three times. Adopt more than one base and your clients parse a single error format. That is the reuse the issue asked for.

All three lint clean under the ruleset, and under spectral:oas apart from oas3-api-servers — deliberate, since a base template has no server and a placeholder would only trip oas3-server-not-example.com. Building them surfaced three real defects, now fixed: two operations missing descriptions, and a Conflict response in images that no operation could return.

Design choices carried into the bases rather than left implicit: merge-patch with the null-means-delete trap documented on the patch schema; conditional writes via ETag/If-Match/412; two-step upload so a failed upload doesn't lose metadata; renditions requested rather than enumerated; alt on images and captions as a first-class sub-resource on videos; webhooks on videos, because video isn't ready when the upload finishes.

RFC 7807 → RFC 9457

The catalog cited an RFC obsoleted in July 2023 22 times, with zero references to its replacement.

Fixed at the source — spotlight-validator/rules/all-rules.yaml and rules/spotlight-recommended.yaml — then regenerated with scripts/generate-spotlight.py, since _data/spotlight_rules.json is generated and a direct edit would be overwritten on the next build.

rules/sources/* was deliberately not touched. Those are harvested third-party rulesets (team-digitale and others). Rewriting them would misrepresent what those vendors actually publish.

Three 7807 mentions remain on purpose, in the phrasing "RFC 9457, which obsoleted RFC 7807" — history, not a stale citation.

Also: rules/index.html advertised 733 rules; the committed data has held 740 since the agentic-access rules landed.

Site

  • _base/problem-details-for-http-apis.md — url moves to RFC 9457, and a Spectral Ruleset entry joins the others
  • _base/accounts|images|videos.md — rebuilt from stubs, each pointing at its OpenAPI, APIs.json, repo, and the ruleset
  • _common/error-codes.md — three problem-details rules under governance_rules, ruleset and base under tools
  • README — the ruleset in the tools table, the three bases in the specs list

One layout fix, needed for any of it to render. _layouts/base.html rendered only GitHubGist and GitHubRepository, giving every repo the hard-coded text "Visit this Base on GitHub". The ruleset would have shown up as a second one, and OpenAPI/APIsJSON properties would have been dropped silently. Replaced with a Resources list. Same class of trap as the _common layout: the layout renders a fixed set, so new frontmatter is invisible until the layout learns it.

One caveat to hand on — RESOLVED, see below

spotlight-validator has no live remote — its origin is recorded as origin-defunct. The source-side RFC fix exists only in the local checkout. The generated output is committed here, but the next person to regenerate from a fresh clone will reintroduce the 7807 text unless that repo gets a home.

Related

🤖 Generated with Claude Code


Added since this PR opened

spotlight-validator has a home again

The caveat above is resolved. api-commons/spotlight-validator 404'd with no rename redirect — the local checkout was the only copy of the 740-rule catalog behind /rules/ and /rulesets/.

Restored to api-commons/spotlight-validator, private. All 60 commits plus the RFC pass are pushed. Private rather than public on purpose: the repo was removed from the org at some point, so republishing is a decision to take deliberately, not a side effect of restoring a backup. Flip it if you want. Scanned before pushing — no credentials in the working tree or across the history.

generate-spotlight.py now checks for the sibling checkout up front and exits with instructions, instead of throwing a FileNotFoundError deep in the run. That silent path is exactly how a corrected catalog gets reverted. The README records the dependency and that the generated files must not be hand-edited.

Starters

Closes #13. Closes #14.

New repo: api-commons/starters, surfaced here as a /starters/ collection alongside /base/.

Starter Spec
Starter OpenAPI OpenAPI 3.1 — one resource, RFC 9457 errors
Starter APIs.json APIs.json 0.22 — one index, one API
Starter JSON Schema JSON Schema 2020-12

On #13: it's titled "Starter OpenAPI" but its body is an APIs.json document. Rather than guess which half was the mistake, both ship — they're different layers and both were missing. The body was specificationVersion: 0.18; this is written against 0.22, the current schema.

Starter is not base, and the section says so. A starter is the smallest document still correct and worth copying; a base is a full working template for a real domain. The two link to each other.

The starter OpenAPI returns zero findings under both spectral:oas and the Problem Details ruleset. Deliberate — whatever you build on it starts from zero, so the first warning you see is one you introduced. Writing it caught two defects in my own first draft: 401 and 429 were sharing a generic problem response, so neither carried the header its status code requires.

validate.py checks more than well-formedness, with no Node dependency: the JSON Schema starter's own examples are validated against the properties they sit on; the APIs.json starter validates against the schema fetched live from apis-json/api-json rather than a vendored copy that would drift; and the OpenAPI starter's Problem schema is checked against RFC 9457 member types.

Site plumbing: a starters collection in _config.yml and a starters layout derived from the base layout. Verified the other six collections still build and the base pages are unaffected.

kinlane and others added 3 commits August 17, 2026 16:53
… the catalog

Finishes the last line of #9 — "reuse across all the base APIs we are
developing" — and fixes the 7807 staleness flagged in this PR's own notes.

THE THREE BASES. accounts, images and videos were description-and-tags stubs
with no OpenAPI and no repo. All three now exist:

  api-commons/accounts   list, create, read, merge-patch, close
  api-commons/images     upload, metadata, renditions, deletion
  api-commons/videos     upload, transcoding, renditions, captions, webhooks

Each ships an OpenAPI 3.1, an APIs.json index, a README and Apache-2.0.

The RFC 9457 error components are byte-identical across all three, composed
from one shared block rather than written three times. Adopt more than one base
and clients parse a single error format. That is the reuse the issue asked for.

All three lint CLEAN under the Problem Details ruleset, and under spectral:oas
apart from oas3-api-servers — deliberate, since a base template has no server
and a placeholder would only trip oas3-server-not-example.com. Building them
surfaced three real defects, now fixed: two operations missing descriptions and
a Conflict response in images that no operation could return.

Design choices carried into the bases rather than left implicit: merge-patch
with the null-means-delete trap documented on the patch schema; conditional
writes via ETag/If-Match/412; two-step upload so a failed upload does not lose
metadata; renditions requested rather than enumerated; alt on images and
captions as a first-class sub-resource on videos; and webhooks on videos,
because video is not ready when the upload finishes and polling a status field
is what every implementation regrets.

RFC 7807 -> RFC 9457. The catalog cited an RFC obsoleted in July 2023, 22 times,
with zero references to its replacement. Fixed at the SOURCE — spotlight-validator
rules/all-rules.yaml and rules/spotlight-recommended.yaml — then regenerated with
scripts/generate-spotlight.py, since _data/spotlight_rules.json is generated and
a direct edit would be overwritten on the next build.

rules/sources/* was deliberately NOT touched. Those are harvested third-party
rulesets (team-digitale and others); rewriting them would misrepresent what
those vendors actually publish.

Three 7807 mentions remain on purpose, in the phrasing "RFC 9457, which
obsoleted RFC 7807" — that is history, not a stale citation.

Also: rules/index.html advertised 733 rules; the committed data has held 740
since the agentic-access rules landed.

CAVEAT for whoever picks this up. spotlight-validator has no live remote (its
origin is recorded as origin-defunct), so the source-side fix exists only in the
local checkout. The generated output is committed here, but the next person to
regenerate from a fresh clone will reintroduce the 7807 text unless that repo
gets a home.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…lently

spotlight-validator had no live remote — its origin 404s with no rename
redirect, and the local checkout was the only copy of the 740-rule catalog
behind apicommons.org/rules/ and /rulesets/.

Restored to github.com/api-commons/spotlight-validator, PRIVATE. All 60 commits
plus the RFC 7807 -> RFC 9457 pass are pushed. Private rather than public
deliberately: the repo was removed from the org at some point, so republishing
it is a decision to take on purpose, not a side effect of restoring a backup.
Flip it if you want it public. Scanned before pushing — no credentials in the
working tree or across the history.

generate-spotlight.py now checks for the sibling checkout up front and exits
with instructions instead of throwing a FileNotFoundError deep in the run. That
silent path is exactly how a corrected catalog gets reverted: regenerate from a
machine without the checkout and the output is rebuilt from whatever is on disk.

README records the dependency and that the generated files must not be
hand-edited.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Closes #13 and #14. New repo: api-commons/starters, surfaced here as a
/starters/ collection alongside /base/.

  Starter OpenAPI       OpenAPI 3.1, one resource, RFC 9457 errors
  Starter APIs.json     APIs.json 0.22, one index, one API
  Starter JSON Schema   JSON Schema 2020-12

ON #13. The issue is titled "Starter OpenAPI" but its body is an APIs.json
document. Rather than guess which half was the mistake, both ship — they are
different layers and both were missing. The body was specificationVersion 0.18;
this is written against 0.22, the current schema.

Starter is not base, and the section says so. A starter is the smallest document
still correct and worth copying; a base is a full working template for a real
domain. /starters/ links across to /base/ and back.

The starter OpenAPI returns ZERO findings under both spectral:oas and the API
Commons Problem Details ruleset. Deliberate: whatever someone builds on it starts
from zero, so the first warning they see is one they introduced. A starter that
ships with warnings teaches people to ignore warnings.

Site plumbing: a `starters` collection in _config.yml and a starters layout
derived from the base layout with the right link text. Verified the other six
collections still build and the base pages are unaffected.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@kinlane kinlane changed the title Give accounts, images and videos an OpenAPI, and retire RFC 7807 from the catalog Bases, starters, RFC 9457 across the catalog, and a home for the rule catalog Aug 17, 2026
New repo: api-commons/spectral-fhir-ruleset — 15 grounded rules for HL7 FHIR
R4/R5 RESTful APIs, following the OWASP and Problem Details pattern.

Registered in Ruleset Commons separately (api-commons/ruleset-commons#2).

Refs #11.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.

Starter JSON Schema Starter OpenAPI

1 participant