← All schemas

example.product

deprecated
Canonical URL
https://schematalog.com/api/schemas/example.product/versions/1.0 (opens in a new tab)
Published
22 August 2026 23:11

Superseded by: https://schemas.example.com/product/v2.json

Properties

ParameterDescriptionType RequiredNullableDefaultExample
in_stock Boolean Optional true
price Number Optional
sku String Required

Definition

{
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "required": [
    "sku"
  ],
  "properties": {
    "sku": {
      "type": "string"
    },
    "price": {
      "type": "number",
      "minimum": 0
    },
    "in_stock": {
      "type": "boolean",
      "default": true
    }
  },
  "$id": "https://schematalog.com/api/schemas/example.product/versions/1.0",
  "title": "example.product",
  "deprecated": true
}
$id: https://schematalog.com/api/schemas/example.product/versions/1.0
$schema: https://json-schema.org/draft/2020-12/schema
deprecated: true
properties:
  in_stock:
    default: true
    type: boolean
  price:
    minimum: 0
    type: number
  sku:
    type: string
required:
- sku
title: example.product
type: object
from __future__ import annotations

from typing import Optional

from pydantic import BaseModel, confloat


class ExampleProduct(BaseModel):
    sku: str
    price: Optional[confloat(ge=0.0)] = None
    in_stock: Optional[bool] = True
{
  "type": "record",
  "name": "ExampleProduct",
  "fields": [
    {
      "name": "sku",
      "type": "string"
    },
    {
      "name": "price",
      "type": [
        "null",
        "double"
      ],
      "default": null
    },
    {
      "name": "in_stock",
      "type": [
        "null",
        "boolean"
      ],
      "default": null
    }
  ],
  "namespace": "example.product"
}