Skip to content

feat!: support PureQL specification 0.1.0-preview.3.0.0 - #94

Merged
kudima03 merged 1 commit into
mainfrom
feat/spec-0.1.0-preview.3.0.0
Nov 24, 2026
Merged

kudima03 merged 1 commit into
mainfrom
feat/spec-0.1.0-preview.3.0.0

Conversation

@kudima03

Copy link
Copy Markdown
Owner

Summary

  • Moves the src/Tests/PureQL-Specification submodule from 0.1.0-preview.2.0.1 (b58f906) to 0.1.0-preview.3.0.0 (7df998c), and updates the comment in the test csproj that names the pinned tag.
  • The transformer needs no source change for 3.0.0. It reads the flat $defs generically, and all 2592 definitions (1712 new, none removed) come through Microsoft.OpenApi unchanged on both targets: net11.0 (Microsoft.OpenApi 3.11.0) and net10.0 (2.13.0). The only rewrites are the documented ones (boolean subschemas, a non-string const turned into enum). The one other difference is that 12 empty "required": [] arrays are dropped, and those never required anything.
  • New tests in SpecificationTests:
    • KeepsEveryOccurrenceOfKeyword checks that each JSON Schema keyword the specification uses appears as often in the emitted components as in the specification. This covers the keywords that are new or more widely used in 3.0.0: dependentRequired, minProperties, maxItems, minContains / maxContains, uniqueItems, contains, if / then / else, pattern and others.
    • KeepsEveryConstOrEnum checks the same for const and enum taken together, since one turns into the other.
  • README now names the tested specification 0.1.0-preview.3.0.0. CHANGELOG has a 0.1.0-preview.1.0.0 section.

Versioning

Specification 3.0.0 is a breaking release: some queries that 2.0.1 accepted no longer match the emitted schema (for example dateAddDays with left / right, or "skip": 0). Following the repo's preview rules, that is a PREV_MAJOR bump, so the next release is 0.1.0-preview.1.0.0. The public API of PureQLQueryDocumentTransformer is unchanged, so package validation against 0.1.0-preview.0.5.0 still passes.

Checks run locally

  • dotnet build --no-restore -warnaserror: 0 warnings
  • dotnet format --verify-no-changes, dotnet csharpier check .: clean
  • dotnet test: 55 passed (net11.0). The suite also passes against the net10.0 build of the library.
  • dotnet stryker --mutation-level Complete --break-at 64: 64.52 %

🤖 Generated with Claude Code

Move the specification submodule to tag 0.1.0-preview.3.0.0 and test the
transformer against it. The transformer already emits every definition of
3.0.0 unchanged; new tests check that no JSON Schema keyword the
specification uses (dependentRequired, minProperties, maxItems,
minContains / maxContains, if / then / else, ...) is lost on the way
through Microsoft.OpenApi.

BREAKING CHANGE: the emitted schema follows specification 3.0.0, whose
tightened constraints reject some queries 0.1.0-preview.2.0.1 accepted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
PureQL.CSharp.Model.OpenAPI.Schema 97% 91% 124 ➖
Summary 97% (261 / 268) 91% (111 / 122) 124 ➖

Minimum allowed line rate is 40%

@kudima03
kudima03 merged commit 011defd into main Nov 24, 2026
1 check passed
@kudima03
kudima03 deleted the feat/spec-0.1.0-preview.3.0.0 branch November 24, 2026 08:18
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