From 00d74338d3e420ef5c58e79ffaff6f9736393cc5 Mon Sep 17 00:00:00 2001 From: ilee2u Date: Mon, 26 Aug 2024 15:40:07 -0400 Subject: [PATCH] test: added avro schemas --- .../{0016 => 0016-idv-attempt-events.rst} | 2 +- ...arning+idv_attempt+approved+v1_schema.avsc | 71 +++++++++++++++++++ ...earning+idv_attempt+created+v1_schema.avsc | 71 +++++++++++++++++++ ...learning+idv_attempt+denied+v1_schema.avsc | 71 +++++++++++++++++++ ...earning+idv_attempt+pending+v1_schema.avsc | 71 +++++++++++++++++++ 5 files changed, 285 insertions(+), 1 deletion(-) rename docs/decisions/{0016 => 0016-idv-attempt-events.rst} (91%) create mode 100644 openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+approved+v1_schema.avsc create mode 100644 openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+created+v1_schema.avsc create mode 100644 openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+denied+v1_schema.avsc create mode 100644 openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+pending+v1_schema.avsc diff --git a/docs/decisions/0016 b/docs/decisions/0016-idv-attempt-events.rst similarity index 91% rename from docs/decisions/0016 rename to docs/decisions/0016-idv-attempt-events.rst index c53f7370..f16dce68 100644 --- a/docs/decisions/0016 +++ b/docs/decisions/0016-idv-attempt-events.rst @@ -40,6 +40,6 @@ Event Definitions: Consequences ************ -* `persona_integration` will emit events via the event bus to send information without needing a response. +* The `verify_student` app will emit events via the event bus to send information without needing a response. * These events are dynamic, in that they can also be consumed by other services/applications as needed in the future. diff --git a/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+approved+v1_schema.avsc b/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+approved+v1_schema.avsc new file mode 100644 index 00000000..db555bff --- /dev/null +++ b/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+approved+v1_schema.avsc @@ -0,0 +1,71 @@ +{ + "name": "CloudEvent", + "type": "record", + "doc": "Avro Event Format for CloudEvents created with openedx_events/schema", + "fields": [ + { + "name": "idv_attempt", + "type": { + "name": "VerificationAttemptData", + "type": "record", + "fields": [ + { + "name": "user", + "type": { + "name": "UserData", + "type": "record", + "fields": [ + { + "name": "id", + "type": "long" + }, + { + "name": "is_active", + "type": "boolean" + }, + { + "name": "pii", + "type": { + "name": "UserPersonalData", + "type": "record", + "fields": [ + { + "name": "username", + "type": "string" + }, + { + "name": "email", + "type": "string" + }, + { + "name": "name", + "type": "string" + } + ] + } + } + ] + } + }, + { + "name": "name", + "type": "string" + }, + { + "name": "status", + "type": "string" + }, + { + "name": "expiration_date", + "type": "string" + }, + { + "name": "inquiry_id", + "type": "string" + } + ] + } + } + ], + "namespace": "org.openedx.learning.idv_attempt.approved.v1" +} \ No newline at end of file diff --git a/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+created+v1_schema.avsc b/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+created+v1_schema.avsc new file mode 100644 index 00000000..fe418fd6 --- /dev/null +++ b/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+created+v1_schema.avsc @@ -0,0 +1,71 @@ +{ + "name": "CloudEvent", + "type": "record", + "doc": "Avro Event Format for CloudEvents created with openedx_events/schema", + "fields": [ + { + "name": "idv_attempt", + "type": { + "name": "VerificationAttemptData", + "type": "record", + "fields": [ + { + "name": "user", + "type": { + "name": "UserData", + "type": "record", + "fields": [ + { + "name": "id", + "type": "long" + }, + { + "name": "is_active", + "type": "boolean" + }, + { + "name": "pii", + "type": { + "name": "UserPersonalData", + "type": "record", + "fields": [ + { + "name": "username", + "type": "string" + }, + { + "name": "email", + "type": "string" + }, + { + "name": "name", + "type": "string" + } + ] + } + } + ] + } + }, + { + "name": "name", + "type": "string" + }, + { + "name": "status", + "type": "string" + }, + { + "name": "expiration_date", + "type": "string" + }, + { + "name": "inquiry_id", + "type": "string" + } + ] + } + } + ], + "namespace": "org.openedx.learning.idv_attempt.created.v1" +} \ No newline at end of file diff --git a/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+denied+v1_schema.avsc b/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+denied+v1_schema.avsc new file mode 100644 index 00000000..947d6e78 --- /dev/null +++ b/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+denied+v1_schema.avsc @@ -0,0 +1,71 @@ +{ + "name": "CloudEvent", + "type": "record", + "doc": "Avro Event Format for CloudEvents created with openedx_events/schema", + "fields": [ + { + "name": "idv_attempt", + "type": { + "name": "VerificationAttemptData", + "type": "record", + "fields": [ + { + "name": "user", + "type": { + "name": "UserData", + "type": "record", + "fields": [ + { + "name": "id", + "type": "long" + }, + { + "name": "is_active", + "type": "boolean" + }, + { + "name": "pii", + "type": { + "name": "UserPersonalData", + "type": "record", + "fields": [ + { + "name": "username", + "type": "string" + }, + { + "name": "email", + "type": "string" + }, + { + "name": "name", + "type": "string" + } + ] + } + } + ] + } + }, + { + "name": "name", + "type": "string" + }, + { + "name": "status", + "type": "string" + }, + { + "name": "expiration_date", + "type": "string" + }, + { + "name": "inquiry_id", + "type": "string" + } + ] + } + } + ], + "namespace": "org.openedx.learning.idv_attempt.denied.v1" +} \ No newline at end of file diff --git a/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+pending+v1_schema.avsc b/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+pending+v1_schema.avsc new file mode 100644 index 00000000..6b7e6376 --- /dev/null +++ b/openedx_events/event_bus/avro/tests/schemas/org+openedx+learning+idv_attempt+pending+v1_schema.avsc @@ -0,0 +1,71 @@ +{ + "name": "CloudEvent", + "type": "record", + "doc": "Avro Event Format for CloudEvents created with openedx_events/schema", + "fields": [ + { + "name": "idv_attempt", + "type": { + "name": "VerificationAttemptData", + "type": "record", + "fields": [ + { + "name": "user", + "type": { + "name": "UserData", + "type": "record", + "fields": [ + { + "name": "id", + "type": "long" + }, + { + "name": "is_active", + "type": "boolean" + }, + { + "name": "pii", + "type": { + "name": "UserPersonalData", + "type": "record", + "fields": [ + { + "name": "username", + "type": "string" + }, + { + "name": "email", + "type": "string" + }, + { + "name": "name", + "type": "string" + } + ] + } + } + ] + } + }, + { + "name": "name", + "type": "string" + }, + { + "name": "status", + "type": "string" + }, + { + "name": "expiration_date", + "type": "string" + }, + { + "name": "inquiry_id", + "type": "string" + } + ] + } + } + ], + "namespace": "org.openedx.learning.idv_attempt.pending.v1" +} \ No newline at end of file