Skip to content

Conversation

@agilevic
Copy link

@agilevic agilevic commented Nov 3, 2025

What kind of change does this PR introduce?

New blog post; invited to contribute by @jviotti
You can change the type to Engineering if more appropriate.

@agilevic agilevic requested a review from a team as a code owner November 3, 2025 21:21
@github-project-automation github-project-automation bot moved this to Ready to review in PR - Triage Group Nov 3, 2025
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Hi @agilevic! Thanks a lot for your contribution!

I noticed that the following required information is missing or incomplete: issue reference

Please update the PR description to include this information. You can find placeholders in the PR template for these items.

Thanks a lot!

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
website ✅ Ready (View Log) Visit Preview 2f91cdf

@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (4e1e90a) to head (2f91cdf).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1880   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        30           
  Lines          633       633           
  Branches       196       196           
=========================================
  Hits           633       633           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jviotti
Copy link
Member

jviotti commented Nov 4, 2025

@json-schema-org/docs-team @json-schema-org/tsc Can you help with your own reviews for this blog post? @agilevic and I have been talking for a while and SlashDB is a very nice "database gateway" that generates JSON Schema. I think it will be a great addition for the case studies!

@agilevic
Copy link
Author

agilevic commented Nov 6, 2025

@jviotti do you want to unblock this? There is no issue reference to give. Thanks.

@jviotti
Copy link
Member

jviotti commented Nov 6, 2025

No worries. Feel free to ignore that check. But let me ping the team again for reviews

Copy link
Member

@jdesrosiers jdesrosiers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me. My only concern is that I'm not a fan of the "type": [whatever, "null"] pattern and I'm concerned that people are going to read this article and think that's a recommended way to describe optional properties. I think it would be helpful to explain why you need to support two different ways for a property to not be present (defined with null or not defined) and note that this is not typical and not always the right approach.

As a style suggestion, I found the schemas hard to read because they span multiple screens that I need to scroll through. I suggest using,

"type": ["string", "null"]

instead of,

"type": [
  "string",
  "null"
]

This will make the schemas significantly more compact and I think easier to read.

{"http_code": 400, "description": "Could not parse JSON: The \"BirthDate\": error at node '/0/BirthDate': '01-01-2000' is not a 'date-time'"}
```

The validator used the `format` property of the `BirthDate` to check that the value was formatted as an IS0 8601 datetime string, and detected an error.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in ISO.

Suggested change
The validator used the `format` property of the `BirthDate` to check that the value was formatted as an IS0 8601 datetime string, and detected an error.
The validator used the `format` property of the `BirthDate` to check that the value was formatted as an ISO 8601 datetime string, and detected an error.

However, date-time uses RFC 3339, not ISO 8601.

Copy link
Member

@gregsdennis gregsdennis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall an interesting article. It's neat that you've been able to integrate JSON Schema this tightly into the DB.

I do have some comments, but they're largely editorial. The base content looks great. Thanks for writing this up.

excerpt: "As modern multi-model databases increasingly support JSON, it's time to explore what role JSON schema will play."
---

JSON Schema has become the backbone of modern API design—not just for describing data types, but for enforcing consistency, validating input, and communicating intent between systems. Beyond simple type declarations, schemas can capture constraints like string lengths, date formats, nullability, and even complex conditional logic.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think spaces around the em dash might make sense here since this is a less formal publication.

Google search:

Image

Now let's retrieve the schema for this record:
https://demo.slashdb.com/db/Chinook/Employee/EmployeeId/1.json?schema

```
Copy link
Member

@gregsdennis gregsdennis Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to try to reduce the height of this code block a bit. You can collapse short arrays and objects. You might also consider wrapping it in an expandable element (<details>).

https://demo.slashdb.com/db/Chinook/Employee.json?schema

```
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reduce/collapse

Comment on lines +270 to +276
To pull multiple records:

https://demo.slashdb.com/db/Chinook/Employee.json?limit=3

And the schema:

https://demo.slashdb.com/db/Chinook/Employee.json?schema
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be improved with some additional prose, e.g. "To pull multiple records, you'd use:", etc.

Then I'd put the links in code block. This doesn't seem like a link you want people to follow.

Comment on lines +439 to +441
One other parameter we can use with **SlashDB**'s schemas is the `cardinality` query string parameter:

https://demo.slashdb.com/db/Chinook/Employee.json?schema&cardinality=3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prose here is better, but I'd still put the link in a code block.


Now, the schema:

https://demo.slashdb.com/querydef/active-users.json?schema
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code block


https://demo.slashdb.com/querydef/active-users.json?schema

```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reduce/collapse


We see that the `pattern` attribute is present in several portions of the schema here. Used in conjunction with `string`, `pattern` allows you to specify a regular expression that a value must match against.

E.g - the `query_id` attribute, which is a unique string that identifies the query, must be no more than 128 characters long (`maxLength` property), and the string must match [this regular expression](https://regex101.com/r/2crKdN/2) - `^(?![xX][mM][lL])[a-zA-Z_][a-zA-Z0-9@_~-]`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"e.g." is typically not used at the beginning of a sentence. I recommend writing it out, e.g. "For example, ...".

Additionally, the em dash doesn't fit here.


E.g - the `query_id` attribute, which is a unique string that identifies the query, must be no more than 128 characters long (`maxLength` property), and the string must match [this regular expression](https://regex101.com/r/2crKdN/2) - `^(?![xX][mM][lL])[a-zA-Z_][a-zA-Z0-9@_~-]`.

We also see the `oneOf` attribute - used here to define that an attribute is either null/not present, or an array of `items` (e.g. the `read` or `write` properties).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

em dash consistency


### Conclusion: JSON Schema as a Bridge Between Data and APIs

What we’ve seen through SlashDB is more than just schema decoration—it’s JSON Schema acting as a **bridge** between relational data models and modern web APIs. By embedding constraints like `maxLength`, `format`, and `pattern` directly into schemas, SlashDB ensures that data integrity is preserved not only in the database but also at the API boundary.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

em dash consistency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready to review

Development

Successfully merging this pull request may close these issues.

4 participants