Skip to content

Should recipeIngredient be a member of an array called ingredients or recipeIngredients? #2628

@jamidwyer

Description

@jamidwyer

On the schema for Recipe, recipeIngredient shows expected type "Text" and the description says it's "A single ingredient used in the recipe, e.g. sugar, flour or garlic. Supersedes ingredients." But in the JSON-LD example, recipeIngredient is shown as an array:

  "recipeIngredient": [
    "3 or 4 ripe bananas, smashed",
    "1 egg",
    "3/4 cup of sugar"
  ]

Clarifying that ingredients is an array with recipeIngredient members could be a first step toward a more programmatically useful structure like:

  "ingredients": [
    {
        "recipeIngredient": {
            "quantity": "3-4",
            "name": "banana", 
            "comment": "ripe, smashed"
        }
    },
    {
        "recipeIngredient": {
            "quantity": "1", 
            "name": "egg"
        }
    },
    {
        "recipeIngredient": {
            "quantity": "3/4",
            "unit": "cup", 
            "name": "sugar"
        }
    }
  ]

I'd be happy to make a pull request if adding ingredients or recipeIngredients as a parent to an array of recipeIngredient members is the correct thing to do. I'm very new to this project, so apologies in advance if I've misunderstood something. Credit to the discussion here for pointing to the NYT post on quantity, unit, and name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    no-issue-activityDiscuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions