Skip to content

[12.x] Json schema nullable#57181

Merged
taylorotwell merged 4 commits into
laravel:12.xfrom
Katalam:json-schema-nullable
Sep 29, 2025
Merged

[12.x] Json schema nullable#57181
taylorotwell merged 4 commits into
laravel:12.xfrom
Katalam:json-schema-nullable

Conversation

@Katalam

@Katalam Katalam commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

Based on opis.io Json Schema, there is a nullable Type.
A type can be nullable if set so. I extended the serializer to check for nullable and conditionally replace the type of the schema with an array to extend it to be nullable.

Additionally the required function has a new argument to conditionally add required within method chaining.

@taylorotwell taylorotwell merged commit 0c88bb2 into laravel:12.x Sep 29, 2025
63 checks passed
@Katalam Katalam deleted the json-schema-nullable branch September 29, 2025 09:50
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