Skip to content

Add the specification, schema and README - #2

Merged
kinlane merged 6 commits into
mainfrom
add-specification-and-schema
Oct 15, 2026
Merged

kinlane merged 6 commits into
mainfrom
add-specification-and-schema

Conversation

@kinlane

@kinlane kinlane commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Closes #1

Adds the ruleset specification and JSON Schema, carried over from the OpenLint community's earlier draft in api-commons.

  • SPECIFICATION.md: the format as implemented today, without extension. Status: draft. Formalizing it continues in discussion #13.
  • schema/v1/ruleset.schema.json: JSON Schema draft 2020-12
  • README.md: what this is, its status, where things go, the open spec discussions, and the eight principles Joost proposed in Precise definitions for the casing and alphabetical functions #13 for writing the formal specification
  • LICENSE: Apache-2.0, as with Spectral

Changes from the earlier draft:

  • the schema's $id is now https://spec.openlint.org/schema/v1/ruleset.schema.json, to match Precise definitions for the casing and alphabetical functions #13's proposal that releases live on spec.openlint.org. Decide this before merging: once people reference an $id, it can't move. spec.openlint.org doesn't exist yet. Serving it from this repo through GitHub Pages would keep the schema in one place.
  • the status notes say the document will be rewritten to Precise definitions for the casing and alphabetical functions #13's principles, and that its one MUST describes the reference implementation for now; it isn't normative yet
  • adds the oas3_2 and aas3_1 formats, which openlint/openlint now registers
  • notes that openlint:openapi built-ins are proposed (discussion Link open questions to the discussions that cover them #6), not yet part of the format
  • quotes "off" in an extends example, because YAML 1.1 parsers read a bare off as false
  • fixes "three points" (there are four) in the conformance notes

Checks: the schema is valid draft 2020-12. It accepts every example in the spec, an apisyouwonthate fixture from openlint/openlint, and the new formats. It rejects 7 malformed rulesets: empty, bare given, a $schema key, a numeric shorthand, a missing then, an unknown root key, and a string alias.

AI use: Claude carried the documents over, made the changes above, and ran the checks.

🤖 Generated with Claude Code

kinlane and others added 2 commits October 6, 2026 10:54
Carried over from api-commons/spotlight-spec. Schema $id moves to
https://openlint.org/schema/v1/ruleset.schema.json; adds the oas3_2 and
aas3_1 formats now registered in openlint/openlint.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
moorh-ibm

This comment was marked as duplicate.

@rickymoorhouse rickymoorhouse left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had an initial read through these and all looks good - couldn't spot anything that looked out of place to me

Comment thread SPECIFICATION.md Resolved
Comment thread SPECIFICATION.md Resolved
Comment thread SPECIFICATION.md Resolved
Comment thread SPECIFICATION.md Resolved
Comment thread SPECIFICATION.md Resolved
Comment thread SPECIFICATION.md Resolved
Comment thread SPECIFICATION.md Resolved
kinlane and others added 3 commits October 15, 2026 03:46
Co-authored-by: Jakub Rożek <[email protected]>
Co-authored-by: Jakub Rożek <[email protected]>
…me behavior

- true/false change only the enabled state; severity is untouched
  (verified: openlint mergers/rules.ts:28); unknown rule is an error (:9)
- truthy/falsy follow ECMAScript truthiness (functions/src/truthy.ts)
- unreferencedReusableObject is scoped to the documents being linted
- circular and missing aliases are errors (alias.ts:52, :58); override
  aliases merge by name (mergers/rulesets.ts:39)
- override globs follow minimatch for now
- format detection noted as implementation-defined
- new 'Runtime behavior (to be specified)' section: resolution,
  inheritance and merge order, cycles

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kinlane
kinlane merged commit 41f7225 into main Oct 15, 2026
@joostfarla
joostfarla deleted the add-specification-and-schema branch October 22, 2026 13:54
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.

Add the specification, schema and README

4 participants