Day 033 / APIs / JSON Schema

JSON Schema Starter

View source ↗Scroll to explore ↓
JSON Schema Starter project cover
/ Overview

A dependency-free Python CLI that turns one bounded local JSON object into a deterministic Draft 2020-12 starter schema for human review.

NameJSON Schema Starter

ClientIndependent daily build

IndustriesDeveloper and API tooling

DateDay 033 · October 2, 2026

/ Challenge

An example API payload is useful evidence, but manually translating nested objects and arrays into a first JSON Schema is repetitive. A single sample also cannot prove every optional field, string format or business rule.

/ Provided services

Clear thinking.
Practical delivery.

01

Conservative shape inference

Maps observed JSON values to schema types without guessing dates, emails, UUIDs or constraints that one sample cannot establish.

02

Reviewable object contracts

Sorts properties, marks observed fields as required and closes objects by default, with an explicit option to allow additional properties.

03

Honest evidence boundary

Treats empty and mixed arrays cautiously and documents that the generated result is a starting point, not a proven production contract.

JSON Schema Starter feature visual
/ Solution

JSON Schema Starter reads one bounded local JSON object and recursively creates a deterministic Draft 2020-12 starting schema. It distinguishes booleans from integers, handles nested objects and array shapes, rejects unlisted properties by default and clearly documents where human review is still required.

/ Impact

Draft 2020-12 starter output

Recursive object and array inference

Deterministic property ordering

Bounded local-only input

No speculative string formats

Twelve standard-library tests included

/ Tech stack

Python standard library

Argparse, pathlib, JSON, math and deterministic serialization provide the complete dependency-free workflow.

JSON Schema

Produces a Draft 2020-12 declaration with recursively inferred object, array and scalar shapes.

Unittest

Twelve tests cover scalar distinctions, nested objects, arrays, deterministic ordering, depth limits, invalid JSON and CLI output.

Next project

Webhook Signature Lab

View case study ↗