Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Recipe schema org thrift #237

Merged
merged 4 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions models/src/main/thrift/content/schema_org.thrift
Original file line number Diff line number Diff line change
@@ -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<SchemaRecipe> 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<string> recipeCategory
9: optional list<string> recipeCuisine
10: optional list<string> recipeIngredient
11: optional list<RecipeStep> recipeInstructions
12: optional list<string> 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<string> image
}

struct AuthorInfo {
1: required string _at_type
2: required string name
3: optional list<string> sameAs
}
5 changes: 5 additions & 0 deletions models/src/main/thrift/content/v1.thrift
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -1824,6 +1825,10 @@ struct Content {
*/
28: optional list<ContentChannel> channels

/*
* Schema.org compatible data
*/
29: optional schema_org.SchemaOrg schemaOrg
}

struct NetworkFront {
Expand Down
Loading