How oai/openapi-specification works
Purpose and Scope
This repository is the source repository for the OpenAPI Specification (OAS): a language-neutral contract for describing HTTP APIs in YAML or JSON. It is a specification/documentation repository, not an API implementation or web application. Primary authored outputs are versioned Markdown specifications and supporting machine-readable schemas.
Primary Entry Points
• Repository orientation, participation, and published-spec links: README.md
• Current and historical normative specification sources: versions/3.2.0.md, versions/3.1.2.md, versions/3.0.4.md
• Specification build/render configuration: spec.config.json
• Node/Yarn project commands and dependencies: package.json
Versioned Specification Source of Truth
The versions/ directory is the central content model. Each release has a Markdown source, with some releases retaining separate editor-credit documents. Changes to these files define the published specification content and are expected to be rendered into authoritative HTML externally.
• versions/3.2.0.md
• versions/3.1.2.md
• versions/3.0.4.md
Schema and Compatibility Artifacts
Machine-readable JSON Schema validation is maintained alongside the prose specification. The active schema test surface is rooted in tests/schema/; legacy schemas and their examples are deliberately isolated under _archive_/ to preserve older OAS generations without participating in the main evolution path.
• tests/schema/oas-schema.mjs
• _archive_/schemas/v3.0/schema.yaml
• _archive_/schemas/v2.0/schema.json
Build, Rendering, and Publication Boundary
The repository delegates much of build, test, schema-publication, and release machinery to the external OAI/build-infra repository, included as a Git submodule. Local configuration supplies repository-specific build inputs; GitHub Actions invokes the shared infrastructure and publication workflow.
• .gitmodules
• spec.config.json
• .github/workflows/build-infra-integration.yaml
• .github/workflows/schema-publish.yaml
Validation Pipeline
A Node.js/Yarn runtime (version selected by .nvmrc) runs local validation and regression tests. The pipeline checks Markdown/spec rendering and schema behavior before publication. GitHub Actions additionally enforces Markdown quality and schema tests on repository changes.
• package.json
• tests/md2html/md2html.test.mjs
• vitest.config.mjs
• .github/workflows/validate-markdown.yaml
• .github/workflows/schema-tests.yaml
Specification Evolution and Governance Flow
Proposals capture candidate changes before or alongside specification edits; contributors follow repository governance and review procedures. The Technical Steering Committee and GitHub issue/PR workflow govern acceptance. Archived materials preserve superseded schemas, while proposals/ contains non-normative work-in-progress rather than released specification text.
• proposals/2025-03-20-URIs-for-Tags.md
• CONTRIBUTING.md
• MAINTAINERS.md
• GOVERNANCE.md
Main entry points: 3.2.0.md OAS 3.2.0 source · oas-schema.mjs Active OAS schema · md2html.test.mjs Markdown rendering tests · .gitmodules OAI build infrastructure
Components 20
Normative specification
Versioned Markdown is the released contract source.
- OAS 3.2.0 source · Current specification source.
versions/3.2.0.md - OAS 3.1.2 source · Historical released specification.
versions/3.1.2.md - OAS 3.0.4 source · Historical released specification.
versions/3.0.4.md - Active OAS schema · Machine-readable schema validation surface.
tests/schema/oas-schema.mjs - Archived OAS 3.0 schema · Preserved outside active evolution.
_archive_/schemas/v3.0/schema.yaml - Archived OAS 2.0 schema · Preserved outside active evolution.
_archive_/schemas/v2.0/schema.json
Validation and rendering
Local and CI checks verify specification and schema changes.
- Node/Yarn commands · Defines local dependencies and commands.
package.json - Markdown rendering tests
tests/md2html/md2html.test.mjs - Vitest configuration
vitest.config.mjs - Markdown validation CI
.github/workflows/validate-markdown.yaml - Schema test CI
.github/workflows/schema-tests.yaml
Shared build and publication
External shared infrastructure performs build and release work.
- Specification build config · Supplies repository-specific rendering inputs.
spec.config.json - OAI build infrastructure · Shared external build, release, and schema-publication machinery.
.gitmodules - Build infrastructure CI · Invokes the shared build infrastructure.
.github/workflows/build-infra-integration.yaml - Schema publication CI · Publishes schemas through shared infrastructure.
.github/workflows/schema-publish.yaml
Evolution and governance
Proposals and contributor process govern accepted changes.
- URI tags proposal · Non-normative candidate specification change.
proposals/2025-03-20-URIs-for-Tags.md - Contribution process
CONTRIBUTING.md - Maintainer review
MAINTAINERS.md - Technical governance
GOVERNANCE.md
Other components
- Repository orientation · Links participants to published specifications.
README.md
Connections 20
- Repository orientation → OAS 3.2.0 source: links current release
- OAS 3.1.2 source → OAS 3.2.0 source: historical lineage
- OAS 3.0.4 source → OAS 3.1.2 source: historical lineage
- Node/Yarn commands → Markdown rendering tests: runs
- Vitest configuration → Markdown rendering tests: configures
- OAS 3.2.0 source → Markdown rendering tests: rendered and checked
- Active OAS schema → Schema test CI: validated by
- Node/Yarn commands → Schema test CI: provides runtime
- OAS 3.2.0 source → Markdown validation CI: quality checked
- Specification build config → OAI build infrastructure: supplies build inputs
- Build infrastructure CI → OAI build infrastructure: invokes
- OAS 3.2.0 source → Build infrastructure CI: builds and renders
- Schema publication CI → OAI build infrastructure: uses publication machinery
- Active OAS schema → Schema publication CI: publishes
- URI tags proposal → OAS 3.2.0 source: may become normative edits
- Contribution process → URI tags proposal: guides submission
- Maintainer review → OAS 3.2.0 source: reviews changes
- Technical governance → Maintainer review: defines authority
- Archived OAS 3.0 schema → Active OAS schema: isolated from active path
- Archived OAS 2.0 schema → Active OAS schema: isolated from active path