Skip to content
New issue

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

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

Already on GitHub? Sign in 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 3 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
38 changes: 38 additions & 0 deletions models/src/main/thrift/content/schemaorg.thrift
emdash-ie marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
namespace scala com.gu.contentapi.client.model.schemaorg
#@namespace typescript _at_guardian.content_api_models.schemaorg


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
}
9 changes: 9 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 "schemaorg.thrift"

namespace scala com.gu.contentapi.client.model.v1
#@namespace typescript _at_guardian.content_api_models.v1
Expand Down Expand Up @@ -1683,6 +1684,10 @@ struct ContentChannel {

}

struct SchemaOrg {
1: optional list<schemaorg.SchemaRecipe> recipe
}

emdash-ie marked this conversation as resolved.
Show resolved Hide resolved
struct Content {

/*
Expand Down Expand Up @@ -1824,6 +1829,10 @@ struct Content {
*/
28: optional list<ContentChannel> channels

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

struct NetworkFront {
Expand Down
Loading