diff --git a/models/src/main/thrift/content/schema_org.thrift b/models/src/main/thrift/content/schema_org.thrift new file mode 100644 index 0000000..49a3bef --- /dev/null +++ b/models/src/main/thrift/content/schema_org.thrift @@ -0,0 +1,41 @@ +namespace scala com.gu.contentapi.client.model.schemaorg +#@namespace typescript _at_guardian.content_api_models.schemaorg + +struct SchemaOrg { + 1: optional list recipe +} + +struct SchemaRecipe { + 1: required string _at_context + 2: required string _at_type + 3: optional string name + 4: optional string description + 5: optional string image + 6: optional string datePublished + 7: optional string url + 8: optional list recipeCategory + 9: optional list recipeCuisine + 10: optional list recipeIngredient + 11: optional list recipeInstructions + 12: optional list recipeYield + 13: optional string prepTime + 14: optional string cookTime + 15: optional string totalTime + 16: optional AuthorInfo author + 17: optional string suitableForDiet + 18: optional string cookingMethod +} + +struct RecipeStep { + 1: required string _at_type + 2: required string text + 3: optional string name + 4: optional string url + 5: optional list image +} + +struct AuthorInfo { + 1: required string _at_type + 2: required string name + 3: optional list sameAs +} diff --git a/models/src/main/thrift/content/v1.thrift b/models/src/main/thrift/content/v1.thrift index f48f8aa..a835608 100644 --- a/models/src/main/thrift/content/v1.thrift +++ b/models/src/main/thrift/content/v1.thrift @@ -1,6 +1,7 @@ include "story_package_article.thrift" include "contentatom.thrift" include "entity.thrift" +include "schema_org.thrift" namespace scala com.gu.contentapi.client.model.v1 #@namespace typescript _at_guardian.content_api_models.v1 @@ -1824,6 +1825,10 @@ struct Content { */ 28: optional list channels + /* + * Schema.org compatible data + */ + 29: optional schema_org.SchemaOrg schemaOrg } struct NetworkFront {