From d4bc79fa4305022d2b0c7433e8c0fbe355d817de Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Fri, 13 Dec 2024 16:01:34 +0100 Subject: [PATCH] refactor: regenerate avro schemas for latest forum payload --- ...arning+forum+thread+created+v1_schema.avsc | 122 ++++++++++++------ ...ad+response+comment+created+v1_schema.avsc | 122 ++++++++++++------ ...rum+thread+response+created+v1_schema.avsc | 122 ++++++++++++------ 3 files changed, 243 insertions(+), 123 deletions(-) diff --git a/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+forum+thread+created+v1_schema.avsc b/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+forum+thread+created+v1_schema.avsc index 115810a5..7588caba 100644 --- a/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+forum+thread+created+v1_schema.avsc +++ b/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+forum+thread+created+v1_schema.avsc @@ -9,54 +9,18 @@ "name": "DiscussionThreadData", "type": "record", "fields": [ - { - "name": "anonymous", - "type": "boolean" - }, - { - "name": "anonymous_to_peers", - "type": "boolean" - }, { "name": "body", "type": "string" }, - { - "name": "category_id", - "type": "long" - }, - { - "name": "category_name", - "type": "string" - }, { "name": "commentable_id", "type": "string" }, - { - "name": "group_id", - "type": "long" - }, { "name": "id", - "type": "long" - }, - { - "name": "team_id", - "type": "long" - }, - { - "name": "thread_type", "type": "string" }, - { - "name": "title", - "type": "string" - }, - { - "name": "title_truncated", - "type": "boolean" - }, { "name": "truncated", "type": "boolean" @@ -107,12 +71,88 @@ "name": "course_id", "type": "string" }, + { + "name": "thread_type", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "anonymous", + "type": [ + "null", + "boolean" + ], + "default": null + }, + { + "name": "anonymous_to_peers", + "type": [ + "null", + "boolean" + ], + "default": null + }, + { + "name": "title", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "title_truncated", + "type": [ + "null", + "boolean" + ], + "default": null + }, + { + "name": "group_id", + "type": [ + "null", + "long" + ], + "default": null + }, + { + "name": "team_id", + "type": [ + "null", + "long" + ], + "default": null + }, + { + "name": "category_id", + "type": [ + "null", + "long" + ], + "default": null + }, + { + "name": "category_name", + "type": [ + "null", + "string" + ], + "default": null + }, { "name": "discussion", - "type": { - "type": "map", - "values": "string" - } + "type": [ + "null", + { + "type": "map", + "values": "string" + } + ], + "default": null }, { "name": "user_course_roles", @@ -132,7 +172,7 @@ "name": "options", "type": { "type": "map", - "values": "string" + "values": "boolean" } } ] diff --git a/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+forum+thread+response+comment+created+v1_schema.avsc b/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+forum+thread+response+comment+created+v1_schema.avsc index b6da14a0..e6526f20 100644 --- a/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+forum+thread+response+comment+created+v1_schema.avsc +++ b/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+forum+thread+response+comment+created+v1_schema.avsc @@ -9,54 +9,18 @@ "name": "DiscussionThreadData", "type": "record", "fields": [ - { - "name": "anonymous", - "type": "boolean" - }, - { - "name": "anonymous_to_peers", - "type": "boolean" - }, { "name": "body", "type": "string" }, - { - "name": "category_id", - "type": "long" - }, - { - "name": "category_name", - "type": "string" - }, { "name": "commentable_id", "type": "string" }, - { - "name": "group_id", - "type": "long" - }, { "name": "id", - "type": "long" - }, - { - "name": "team_id", - "type": "long" - }, - { - "name": "thread_type", "type": "string" }, - { - "name": "title", - "type": "string" - }, - { - "name": "title_truncated", - "type": "boolean" - }, { "name": "truncated", "type": "boolean" @@ -107,12 +71,88 @@ "name": "course_id", "type": "string" }, + { + "name": "thread_type", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "anonymous", + "type": [ + "null", + "boolean" + ], + "default": null + }, + { + "name": "anonymous_to_peers", + "type": [ + "null", + "boolean" + ], + "default": null + }, + { + "name": "title", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "title_truncated", + "type": [ + "null", + "boolean" + ], + "default": null + }, + { + "name": "group_id", + "type": [ + "null", + "long" + ], + "default": null + }, + { + "name": "team_id", + "type": [ + "null", + "long" + ], + "default": null + }, + { + "name": "category_id", + "type": [ + "null", + "long" + ], + "default": null + }, + { + "name": "category_name", + "type": [ + "null", + "string" + ], + "default": null + }, { "name": "discussion", - "type": { - "type": "map", - "values": "string" - } + "type": [ + "null", + { + "type": "map", + "values": "string" + } + ], + "default": null }, { "name": "user_course_roles", @@ -132,7 +172,7 @@ "name": "options", "type": { "type": "map", - "values": "string" + "values": "boolean" } } ] diff --git a/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+forum+thread+response+created+v1_schema.avsc b/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+forum+thread+response+created+v1_schema.avsc index 5b06e4c1..e7bf42d5 100644 --- a/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+forum+thread+response+created+v1_schema.avsc +++ b/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+forum+thread+response+created+v1_schema.avsc @@ -9,54 +9,18 @@ "name": "DiscussionThreadData", "type": "record", "fields": [ - { - "name": "anonymous", - "type": "boolean" - }, - { - "name": "anonymous_to_peers", - "type": "boolean" - }, { "name": "body", "type": "string" }, - { - "name": "category_id", - "type": "long" - }, - { - "name": "category_name", - "type": "string" - }, { "name": "commentable_id", "type": "string" }, - { - "name": "group_id", - "type": "long" - }, { "name": "id", - "type": "long" - }, - { - "name": "team_id", - "type": "long" - }, - { - "name": "thread_type", "type": "string" }, - { - "name": "title", - "type": "string" - }, - { - "name": "title_truncated", - "type": "boolean" - }, { "name": "truncated", "type": "boolean" @@ -107,12 +71,88 @@ "name": "course_id", "type": "string" }, + { + "name": "thread_type", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "anonymous", + "type": [ + "null", + "boolean" + ], + "default": null + }, + { + "name": "anonymous_to_peers", + "type": [ + "null", + "boolean" + ], + "default": null + }, + { + "name": "title", + "type": [ + "null", + "string" + ], + "default": null + }, + { + "name": "title_truncated", + "type": [ + "null", + "boolean" + ], + "default": null + }, + { + "name": "group_id", + "type": [ + "null", + "long" + ], + "default": null + }, + { + "name": "team_id", + "type": [ + "null", + "long" + ], + "default": null + }, + { + "name": "category_id", + "type": [ + "null", + "long" + ], + "default": null + }, + { + "name": "category_name", + "type": [ + "null", + "string" + ], + "default": null + }, { "name": "discussion", - "type": { - "type": "map", - "values": "string" - } + "type": [ + "null", + { + "type": "map", + "values": "string" + } + ], + "default": null }, { "name": "user_course_roles", @@ -132,7 +172,7 @@ "name": "options", "type": { "type": "map", - "values": "string" + "values": "boolean" } } ]