Skip to content

fix: validate draft 2019-09 schemas in jsonSchemaAdapter - #485

Merged
punkpeye merged 1 commit into
punkpeye:mainfrom
remote-controlled-man:codex/prflow-955ad08ea547
Nov 2, 2026
Merged

punkpeye merged 1 commit into
punkpeye:mainfrom
remote-controlled-man:codex/prflow-955ad08ea547

Conversation

@remote-controlled-man

Copy link
Copy Markdown
Contributor

An explicitly declared draft-2019-09 schema currently fails on the first jsonSchemaAdapter validation with no schema with key or ref, even for valid data. The default AJV class only includes draft-07 support.

Select the existing AJV 2019 entry point for this dialect. As with draft-2020-12, normalize HTTP and trailing-fragment URI forms only in the compiled copy, preserving the caller's advertised schema.

Add regressions for all four URI forms, valid tuples, tuple types and extra items, dependentRequired, and unevaluatedProperties. Existing default/draft-07 and draft-2020-12 coverage remains in place.

Validation on Node 24:

  • pnpm build
  • pnpm lint (Prettier, ESLint, TypeScript, JSR publish dry-run)
  • pnpm test: 1,345 passed across 81 files
  • pnpm test:openapi: 15 passed (the existing PostHog spec pin-drift warning was emitted)
  • Built ESM and CommonJS exports: accept valid draft-2019-09 data and reject missing dependencies and unevaluated properties

AI assistance: prepared with OpenAI Codex.

Copilot AI balanced review requested due to automatic review settings October 30, 2026 08:53

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@punkpeye
punkpeye merged commit 5849926 into punkpeye:main Nov 2, 2026
2 checks passed
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 4.23.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants