Skip to content

Generate remaining schema keywords (#157) - #142

Merged
rasuvaeff merged 9 commits into
masterfrom
feat/157-if-then-else
Oct 11, 2026
Merged

rasuvaeff merged 9 commits into
masterfrom
feat/157-if-then-else

Conversation

@rasuvaeff

Copy link
Copy Markdown
Owner

Summary

Add constructive generation for the remaining OpenAPI 3.1 schema keywords from issue #157:

  • bounded prefixItems tuples and contains with minContains/maxContains
  • dependentRequired and simple dependentSchemas presence combinations
  • unevaluatedProperties and unevaluatedItems closures

Unsupported 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: passed
  • 990 generator tests passed
  • Psalm and PHP CS Fixer passed
  • bin/record-openapi-corpus --check: 540 cases current

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8cdeb4c5-2ff5-411e-a5e7-1d0325587c48

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rasuvaeff
rasuvaeff force-pushed the feat/157-if-then-else branch from 1b86362 to fe7c6bb Compare October 11, 2026 17:15
`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.
@rasuvaeff
rasuvaeff merged commit 07de3f3 into master Oct 11, 2026
12 checks passed
@rasuvaeff
rasuvaeff deleted the feat/157-if-then-else branch October 12, 2026 05:32
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