Skip to content

Conversation

@serpent213
Copy link

Fixes parameter-level Schema attribute handling to support both object and array notation for properties parameters.

Resolves two related schema generation issues:

  1. Parameter-level Schema attributes with 'definition' key now preserve PHP signature defaults when the definition omits one. Previously defaults were lost when using full definition overrides.

  2. Schema merging removes inferred type constraints when anyOf/oneOf/allOf is present WITHOUT an explicit type in the dominant schema. This prevents conflicts where inferred "type": "array" from PHP type hints conflicts with anyOf allowing object notation, while respecting explicit type declarations.

Includes test fixtures and integration coverage for parameter- and method-level anyOf schemas.

P.S.: composer lint was NOT run, as it reformats a bunch of files on my system...

Fixes parameter-level Schema attribute handling to support both
object and array notation for properties parameters.

Two related schema generation issues resolved:

1. Parameter-level Schema attributes with 'definition' key now
   preserve PHP signature defaults when the definition omits one.
   Previously defaults were lost when using full definition overrides.

2. Schema merging removes inferred type constraints when anyOf/oneOf/allOf
   is present WITHOUT an explicit type in the dominant schema. This
   prevents conflicts where inferred "type": "array" from PHP type hints
   conflicts with anyOf allowing object notation, while respecting
   explicit type declarations.

Includes test fixtures and integration coverage for parameter- and
method-level anyOf schemas.
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