Skip to content

Spec: add generated JSON version and CI check - #6

Open
bluefuton wants to merge 1 commit into
trunkfrom
add-json-spec
Open

bluefuton wants to merge 1 commit into
trunkfrom
add-json-spec

Conversation

@bluefuton

Copy link
Copy Markdown
Contributor

Summary

Adds a JSON version of the spec alongside spec.yml, plus a CI check that keeps the two in sync.

Changes

  • Add spec.json, generated from spec.yml with @redocly/cli bundle.
  • Add .github/workflows/spec.yml, which on every PR and push to trunk:
    • lints spec.yml
    • regenerates spec.json and fails if it differs from the committed file
  • Add redocly.yaml, extending the recommended ruleset but disabling rules that don't fit the Akismet API:
    • security-defined: the API key is a form/query parameter, not an OpenAPI security scheme
    • operation-4xx-response: Akismet returns 200 with plain-text bodies (e.g. invalid) rather than 4xx
    • info-license
  • Document the JSON version and regeneration command in the README.

Redocly is pinned to 2.55.0 so local and CI output match.

Testing

  • npx @redocly/cli@2.55.0 lint spec.yml passes.
  • npx @redocly/cli@2.55.0 bundle spec.yml -o spec.json produces no diff.
  • Check the Spec workflow passes on this PR.

Notes

Whichever of this and #5 merges second will need spec.json regenerated, since #5 changes spec.yml.

Generate spec.json from spec.yml with Redocly, and add a workflow that lints the spec and fails if spec.json is out of date.
@bluefuton bluefuton self-assigned this Sep 30, 2026
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.

1 participant