From 4fca038830e3ac9660b486b22650b5847e87cd74 Mon Sep 17 00:00:00 2001 From: Rowanne Kabalan Date: Wed, 1 Nov 2023 20:45:08 +0000 Subject: [PATCH 1/2] Remove deprecated recipe atom --- js/main.js | 1 - thrift/src/main/thrift/atoms/recipe.thrift | 67 ---------------------- thrift/src/main/thrift/contentatom.thrift | 9 ++- 3 files changed, 4 insertions(+), 73 deletions(-) delete mode 100644 thrift/src/main/thrift/atoms/recipe.thrift diff --git a/js/main.js b/js/main.js index f6a9803..72511cf 100644 --- a/js/main.js +++ b/js/main.js @@ -5,6 +5,5 @@ exports.interactiveTypes = require('../generated/gen-nodejs/interactive_types') exports.mediaTypes = require('../generated/gen-nodejs/media_types'); exports.quizTypes = require('../generated/gen-nodejs/quiz_types'); exports.reviewTypes = require('../generated/gen-nodejs/review_types'); -exports.recipeTypes = require('../generated/gen-nodejs/recipe_types'); exports.shared = require('../generated/gen-nodejs/shared_types'); exports.chartAtom = require('../generated/gen-nodejs/chartatom_types'); diff --git a/thrift/src/main/thrift/atoms/recipe.thrift b/thrift/src/main/thrift/atoms/recipe.thrift deleted file mode 100644 index 9b0c8af..0000000 --- a/thrift/src/main/thrift/atoms/recipe.thrift +++ /dev/null @@ -1,67 +0,0 @@ -namespace * contentatom.recipe -namespace java com.gu.contentatom.thrift.atom.recipe -#@namespace scala com.gu.contentatom.thrift.atom.recipe -#@namespace typescript _at_guardian.content_atom_model.recipe - -include "shared.thrift" - -struct Tags { - 1: required list cuisine - 2: required list category - 3: required list celebration - 4: required list dietary -} - -struct Time { - 1: optional i16 preparation - 2: optional i16 cooking -} - -struct Serves { - 1: required string type - 2: required i16 from - 3: required i16 to - 4: optional string unit -} - -struct Range { - 1: required i16 from - 2: required i16 to -} - -struct Ingredient { - 1: required string item - 2: optional string comment - // 3: optional double quantity - 4: optional Range quantityRange - 5: optional string unit - 6: optional string dietaryInfo - 7: optional Range caloryRange -} - - -struct IngredientsList { - 1: optional string title - 2: required list ingredients -} - -struct RecipeStep { - 1: optional string name - 2: optional string text - 3: optional shared.Image image - 4: optional string link -} - -struct RecipeAtom { - 1: required string title - 2: required Tags tags - 3: required Time time - 4: optional Serves serves - 5: required list ingredientsLists - 6: required list steps - 7: required list credits - 8: required list images - 9: optional string sourceArticleId - 10: optional string description - 11: optional list recipeSteps -} diff --git a/thrift/src/main/thrift/contentatom.thrift b/thrift/src/main/thrift/contentatom.thrift index 6d881fc..9dffc64 100644 --- a/thrift/src/main/thrift/contentatom.thrift +++ b/thrift/src/main/thrift/contentatom.thrift @@ -11,7 +11,6 @@ include "atoms/interactive.thrift" include "atoms/profile.thrift" include "atoms/qanda.thrift" include "atoms/review.thrift" -include "atoms/recipe.thrift" include "atoms/timeline.thrift" include "atoms/commonsdivision.thrift" include "atoms/chart.thrift" @@ -29,8 +28,8 @@ enum AtomType { CTA = 4, INTERACTIVE = 5, REVIEW = 6, - RECIPE = 7, - // STORYQUESTIONS = 8, DEPRECATED +//RECIPE = 7, DEPRECATED +//STORYQUESTIONS = 8, DEPRECATED QANDA = 9, PROFILE = 10, GUIDE = 11, @@ -49,8 +48,8 @@ union AtomData { 5: cta.CTAAtom cta 6: interactive.InteractiveAtom interactive 7: review.ReviewAtom review - 8: recipe.RecipeAtom recipe - // 9: storyquestions.StoryQuestionsAtom storyquestions DEPRECATED +//8: recipe.RecipeAtom recipe +//9: storyquestions.StoryQuestionsAtom storyquestions DEPRECATED 10: qanda.QAndAAtom qanda 11: guide.GuideAtom guide 12: profile.ProfileAtom profile From 0840bdbd85f874e9228b8ee3230f3832b099b7d1 Mon Sep 17 00:00:00 2001 From: Rowanne Kabalan Date: Wed, 8 Nov 2023 16:47:36 +0000 Subject: [PATCH 2/2] Add comment --- thrift/src/main/thrift/contentatom.thrift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thrift/src/main/thrift/contentatom.thrift b/thrift/src/main/thrift/contentatom.thrift index 9dffc64..63934c6 100644 --- a/thrift/src/main/thrift/contentatom.thrift +++ b/thrift/src/main/thrift/contentatom.thrift @@ -28,7 +28,7 @@ enum AtomType { CTA = 4, INTERACTIVE = 5, REVIEW = 6, -//RECIPE = 7, DEPRECATED +//RECIPE = 7, DEPRECATED in favour of Recipe Element //STORYQUESTIONS = 8, DEPRECATED QANDA = 9, PROFILE = 10, @@ -48,7 +48,7 @@ union AtomData { 5: cta.CTAAtom cta 6: interactive.InteractiveAtom interactive 7: review.ReviewAtom review -//8: recipe.RecipeAtom recipe +//8: recipe.RecipeAtom recipe DEPRECATED //9: storyquestions.StoryQuestionsAtom storyquestions DEPRECATED 10: qanda.QAndAAtom qanda 11: guide.GuideAtom guide