{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/frihet-io/json-schema/frihet-io-product-schema.json",
  "title": "Product",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/frihet-io-products-api-openapi.yml#/components/schemas/Product",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    {
      "$ref": "#/$defs/ProductCreate"
    }
  ],
  "$defs": {
    "ProductCreate": {
      "type": "object",
      "required": [
        "name",
        "unitPrice"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Product or service name"
        },
        "unitPrice": {
          "type": "number",
          "description": "Unit price"
        },
        "description": {
          "type": "string",
          "description": "Product description"
        },
        "taxRate": {
          "type": "number",
          "minimum": 0,
          "maximum": 100,
          "description": "Default tax rate percentage"
        }
      }
    }
  }
}