Skip to content

internal/codegen: draft-04 extractor for the archived 2.0 and 3.0 schemas #441

Description

@erraggy

Epic D — Derive the field/version matrix and generate from it · Size L · Release v1.61.0 · Blocked by: 438 · Lower priority — may slip

Scope

Per decision D-001, OAS 2.0 and 3.0 get exactly what upstream publishes, and nothing is authored to fill the gap:

Version Artifact Lines Draft
2.0 _archive_/schemas/v2.0/schema.json 1,606 draft-04
3.0 _archive_/schemas/v3.0/schema.yaml 1,031 draft-04

Both are archived, both live on main rather than a v3.X-dev branch, and the 2.0 schema is third-party in origin (swagger.io).

Why a second extractor path

D1 targets JSON Schema 2020-12. These are draft-04 — different keyword set, different $ref semantics, no unevaluatedProperties, no if/then, required spelled differently in places. The 2020-12 extractor cannot read them, so this is a second path feeding the same matrix, not a parameter on the first.

Explicitly droppable

Deliberately last in the epic. It blocks nothing — no other issue in this project depends on 2.0 or 3.0 matrix coverage. D-001 sets priority explicitly forward-looking: 3.1, 3.2, 3.3 and future versions first.

If it slips past v1.61.0, nothing downstream is affected.

Acceptance

  • The archived 2.0 and 3.0 schemas feed the same checked-in matrix that D1 produces for 3.1+.
  • 3.0's six pass fixtures stay green.
  • The 2.0-only asymmetries survive extraction rather than being normalized away — in particular that OAS 2.0 places no charset constraint on definitions keys, unlike 3.x Components (see fixer.charsetForVersion), and that 2.0 spells discriminator as a bare string.

Files

internal/codegen/ (draft-04 extractor path)


Design: 2026-08-01-spec-conformance-gap-design.md · Plan: 2026-08-01-spec-conformance-gap-plan.md

Metadata

Metadata

Assignees

Labels

codegenGenerated code and extractors under internal/codegenenhancementNew feature or requestoas2.0Issues related to Swagger (OpenAPI Specification 2.0)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions