generated: '2026-09-28' method: derived generator: derive-data-model.py source: - openapi/noms-openapi.json notation: has_one = property $ref; has_many = array of $ref; belongs_to = _id field summary: entities: 25 entities_in_spec: 25 relationships: 20 entities: - name: BrandDetailSchema fields: 3 description: A brand item response. - name: BrandSchema fields: 2 description: 'A food brand: a stable short-id and the brand name.' - name: FoodDetailSchema fields: 18 description: A food **with its includable relations**. - name: FoodGroupSchema fields: 3 description: A canonical food group — a stable code plus a curated display name. - name: FoodImageSchema fields: 2 description: One image for a food. Images arrive in display order, so the array - name: FoodMarketCountrySchema fields: 1 description: One country a food is sold in, as an ISO 3166-1 alpha-2 code. - name: FoodNutrientSchema fields: 4 description: One nutrient measurement attached to a food, shaped ``{id, name, - name: FoodServingSizeSchema fields: 6 description: One serving definition, shaped ``{unit, descriptor, quantity, grams, - name: Item_BrandDetailSchema_ fields: 1 - name: Item_FoodDetailSchema_ fields: 1 - name: Item_FoodGroupSchema_ fields: 1 - name: Item_NutrientSchema_ fields: 1 - name: MarketChoice fields: 1 description: The market to scope the account to — one of `GET /v1/market`'s `available`. - name: MarketData fields: 3 description: The account's market selection and the markets it may choose from. - name: MarketResponse fields: 1 - name: NutrientSchema fields: 4 description: A canonical nutrient in the catalog, with its measurement unit and - name: PageLinks fields: 2 - name: PageMeta fields: 2 - name: Page_BrandDetailSchema_ fields: 3 - name: Page_FoodDetailSchema_ fields: 3 - name: Page_FoodGroupSchema_ fields: 3 - name: Page_NutrientSchema_ fields: 3 - name: Problem fields: 5 description: An **RFC 9457** problem document, served as `application/problem+json`. `type` is a stable, never-renamed URI you can branch on; the other core members are for humans. - name: UsageData fields: 6 description: The calling **account's** usage against its quota for the current window. - name: UsageResponse fields: 1 relationships: - from: FoodDetailSchema to: BrandSchema type: has_one via: brand - from: FoodDetailSchema to: FoodGroupSchema type: has_one via: food_group - from: Item_BrandDetailSchema_ to: BrandDetailSchema type: has_one via: data - from: Item_FoodDetailSchema_ to: FoodDetailSchema type: has_one via: data - from: Item_FoodGroupSchema_ to: FoodGroupSchema type: has_one via: data - from: Item_NutrientSchema_ to: NutrientSchema type: has_one via: data - from: MarketResponse to: MarketData type: has_one via: data - from: Page_BrandDetailSchema_ to: BrandDetailSchema type: has_many via: data - from: Page_BrandDetailSchema_ to: PageLinks type: has_one via: links - from: Page_BrandDetailSchema_ to: PageMeta type: has_one via: meta - from: Page_FoodDetailSchema_ to: FoodDetailSchema type: has_many via: data - from: Page_FoodDetailSchema_ to: PageLinks type: has_one via: links - from: Page_FoodDetailSchema_ to: PageMeta type: has_one via: meta - from: Page_FoodGroupSchema_ to: FoodGroupSchema type: has_many via: data - from: Page_FoodGroupSchema_ to: PageLinks type: has_one via: links - from: Page_FoodGroupSchema_ to: PageMeta type: has_one via: meta - from: Page_NutrientSchema_ to: NutrientSchema type: has_many via: data - from: Page_NutrientSchema_ to: PageLinks type: has_one via: links - from: Page_NutrientSchema_ to: PageMeta type: has_one via: meta - from: UsageResponse to: UsageData type: has_one via: data