Skip to content

fix(jsonschema): handle partial update required properties - #8484

Closed
JakovKnezovicc wants to merge 1 commit into
api-platform:mainfrom
JakovKnezovicc:fix/json-schema-partial-update
Closed

fix(jsonschema): handle partial update required properties#8484
JakovKnezovicc wants to merge 1 commit into
api-platform:mainfrom
JakovKnezovicc:fix/json-schema-partial-update

Conversation

@JakovKnezovicc

Copy link
Copy Markdown
Contributor
Q A
Branch? 4.3
Tickets -
License MIT
Doc PR -

Why

A POST and a standard PUT can reuse the same schema definition when their input requirements match. However, a PUT configured with standard_put: false represents a partial update, so it must not inherit the required properties
from that shared definition.

What changed

The schema factory now identifies non-standard PUT operations as partial updates. Only those schemas receive a distinct .partial definition name and omit required properties. Standard PUT and POST schemas continue reusing the
same definition when appropriate.

Result

The generated schema reflects the configured PUT behavior accurately without creating unnecessary duplicate definitions. Tests cover both definition reuse and partial-update behavior.

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