From 1db9e6854c242e1dea591d0bf5ee150cdf55f6ba Mon Sep 17 00:00:00 2001 From: Chaitanya Date: Mon, 22 Dec 2025 22:41:40 +0530 Subject: [PATCH 1/3] docs: add practical examples for oneOf, anyOf, and allOf --- pages/learn/json-schema-examples.md | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/pages/learn/json-schema-examples.md b/pages/learn/json-schema-examples.md index d775d0fdc..0896cd109 100644 --- a/pages/learn/json-schema-examples.md +++ b/pages/learn/json-schema-examples.md @@ -22,6 +22,44 @@ In this page, you will find examples illustrating different use cases to help yo - [Movie](#movie) - [User profile](#user-profile) +- [Choosing between oneOf, anyOf, and allOf](#choosing-between-oneof-anyof-and-allof) +## Choosing between oneOf, anyOf, and allOf + +When combining schemas, `oneOf`, `anyOf`, and `allOf` behave differently. +The examples below show common real-world scenarios and pitfalls. + +### anyOf — at least one schema must match + +```json +{ + "anyOf": [ + { "type": "string" }, + { "type": "number" } + ] +} +``` + +### oneOf — exactly one schema must match + +```json +{ + "oneOf": [ + { "type": "number", "minimum": 0 }, + { "type": "number", "maximum": 100 } + ] +} +``` + +### allOf — all schemas must match + +```json +{ + "allOf": [ + { "type": "string" }, + { "minLength": 5 } + ] +} +``` ## Address From dbd3e9f4c9d73ee89eb9e3f37460af8b0f87e78c Mon Sep 17 00:00:00 2001 From: Chaitanya Date: Tue, 23 Dec 2025 09:27:54 +0530 Subject: [PATCH 2/3] fix: resolve hydration warning caused by img alt text mismatch --- pages/index.page.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pages/index.page.tsx b/pages/index.page.tsx index 8d3c9bce9..aa947eef0 100644 --- a/pages/index.page.tsx +++ b/pages/index.page.tsx @@ -844,8 +844,7 @@ const Home = (props: any) => { The Realtime Unified API
-for Accounting integrations Date: Tue, 23 Dec 2025 09:33:47 +0530 Subject: [PATCH 3/3] chore: remove unrelated docs changes from hydration fix PR --- pages/learn/json-schema-examples.md | 38 ----------------------------- 1 file changed, 38 deletions(-) diff --git a/pages/learn/json-schema-examples.md b/pages/learn/json-schema-examples.md index 0896cd109..d775d0fdc 100644 --- a/pages/learn/json-schema-examples.md +++ b/pages/learn/json-schema-examples.md @@ -22,44 +22,6 @@ In this page, you will find examples illustrating different use cases to help yo - [Movie](#movie) - [User profile](#user-profile) -- [Choosing between oneOf, anyOf, and allOf](#choosing-between-oneof-anyof-and-allof) -## Choosing between oneOf, anyOf, and allOf - -When combining schemas, `oneOf`, `anyOf`, and `allOf` behave differently. -The examples below show common real-world scenarios and pitfalls. - -### anyOf — at least one schema must match - -```json -{ - "anyOf": [ - { "type": "string" }, - { "type": "number" } - ] -} -``` - -### oneOf — exactly one schema must match - -```json -{ - "oneOf": [ - { "type": "number", "minimum": 0 }, - { "type": "number", "maximum": 100 } - ] -} -``` - -### allOf — all schemas must match - -```json -{ - "allOf": [ - { "type": "string" }, - { "minLength": 5 } - ] -} -``` ## Address