Skip to content

Fix required field generation for wrapped and unwrapped resource collections#1064

Open
RaphaelHardFork wants to merge 3 commits intoknuckleswtf:v5from
RaphaelHardFork:required-flag-on-collections
Open

Fix required field generation for wrapped and unwrapped resource collections#1064
RaphaelHardFork wants to merge 3 commits intoknuckleswtf:v5from
RaphaelHardFork:required-flag-on-collections

Conversation

@RaphaelHardFork
Copy link
Copy Markdown

This PR fixes incorrect required placement in generated OpenAPI schemas for resource collections.

Previously, required was added at the array level (data.required) instead of the item level (data.items.required).

It also adds support for generating required fields for top-level unwrapped resource collections when using JsonResource::withoutWrapping().

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.

2 participants