{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/receptapi/json-schema/receptapi-ingredient-schema.json",
  "title": "Ingredient",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/receptapi-openapi.json#/components/schemas/Ingredient",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string"
    },
    "name_sv": {
      "type": "string"
    },
    "category": {
      "type": "string",
      "enum": [
        "frukt_gront",
        "kott_chark",
        "fisk",
        "mejeri",
        "skafferi",
        "frys",
        "brod",
        "dryck",
        "ovrigt"
      ]
    },
    "allergens": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Allergen"
      }
    },
    "default_unit": {
      "type": [
        "string",
        "null"
      ]
    },
    "density_g_per_dl": {
      "type": [
        "number",
        "null"
      ]
    },
    "livsmedelsverket_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "aliases": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "recipe_count": {
      "type": "integer"
    },
    "url": {
      "type": "string",
      "format": "uri"
    }
  },
  "$defs": {
    "Allergen": {
      "type": "string",
      "enum": [
        "gluten",
        "kraftdjur",
        "agg",
        "fisk",
        "jordnotter",
        "soja",
        "mjolk",
        "notter",
        "selleri",
        "senap",
        "sesam",
        "svaveldioxid",
        "lupin",
        "blotdjur"
      ]
    }
  }
}