Repository navigation
Generate remaining schema keywords (#157) - #142
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
rasuvaeff
force-pushed
the
feat/157-if-then-else
branch
from
October 11, 2026 17:15
1b86362 to
fe7c6bb
Compare
`patternProperties` says that the value under a name answers the schema of the patterns that name matches. The compiler built the value once for the whole map and paired it with keys drawn independently, so every name received the schema compiled for whichever name came first: an object whose `^a` member carried a boolean and whose `z$` member carried a string. Two of every three generated objects were rejected by the contract's own validator. The name and the value it declares are now drawn together, through `Gen::uniqueArrayOf` keyed by name. `Gen::dictOf()` cannot express this: it draws keys and values from separate arbitraries. Also raises the mutation score over the #157 keywords - the extended array bounds, the dependent-trigger masks, the direction-owned properties, the refusal messages, and the type a structural keyword implies - each pinned by the answer it produces rather than by the class of exception it throws.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add constructive generation for the remaining OpenAPI 3.1 schema keywords from issue #157:
prefixItemstuples andcontainswithminContains/maxContainsdependentRequiredand simpledependentSchemaspresence combinationsunevaluatedPropertiesandunevaluatedItemsclosuresUnsupported combinations fail closed as
UnsupportedGeneration; generated values stay JSON-compatible and are encoded with the same schema-aware path used by materialization.This PR depends on the contract changes in rasuvaeff/openapi-contract#173 (merge that PR first so the development-contract CI job can validate the new generator paths).
Validation
composer build: passedbin/record-openapi-corpus --check: 540 cases current