Skip to content

Commit

Permalink
feat: improved event defs + avro
Browse files Browse the repository at this point in the history
  • Loading branch information
ilee2u committed Sep 21, 2023
1 parent 8d3eb36 commit 6424a40
Show file tree
Hide file tree
Showing 7 changed files with 444 additions and 107 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"name": "CloudEvent",
"type": "record",
"doc": "Avro Event Format for CloudEvents created with openedx_events/schema",
"fields": [
{
"name": "exam_attempt_data",
"type": {
"name": "ExamAttemptData",
"type": "record",
"fields": [
{
"name": "user_id",
"type": "long"
},
{
"name": "course_key",
"type": "string"
},
{
"name": "usage_key",
"type": "string"
},
{
"name": "requesting_user",
"type": [
"null",
{
"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"
}
]
}
}
]
}
],
"default": null
},
{
"name": "credit_requirement_status",
"type": [
"null",
"string"
],
"default": null
}
]
}
}
],
"namespace": "org.openedx.learning.exam.attempt.errored.v1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"name": "CloudEvent",
"type": "record",
"doc": "Avro Event Format for CloudEvents created with openedx_events/schema",
"fields": [
{
"name": "exam_attempt_data",
"type": {
"name": "ExamAttemptData",
"type": "record",
"fields": [
{
"name": "user_id",
"type": "long"
},
{
"name": "course_key",
"type": "string"
},
{
"name": "usage_key",
"type": "string"
},
{
"name": "requesting_user",
"type": [
"null",
{
"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"
}
]
}
}
]
}
],
"default": null
},
{
"name": "credit_requirement_status",
"type": [
"null",
"string"
],
"default": null
}
]
}
}
],
"namespace": "org.openedx.learning.exam.attempt.rejected.v1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"name": "CloudEvent",
"type": "record",
"doc": "Avro Event Format for CloudEvents created with openedx_events/schema",
"fields": [
{
"name": "exam_attempt_data",
"type": {
"name": "ExamAttemptData",
"type": "record",
"fields": [
{
"name": "user_id",
"type": "long"
},
{
"name": "course_key",
"type": "string"
},
{
"name": "usage_key",
"type": "string"
},
{
"name": "requesting_user",
"type": [
"null",
{
"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"
}
]
}
}
]
}
],
"default": null
},
{
"name": "credit_requirement_status",
"type": [
"null",
"string"
],
"default": null
}
]
}
}
],
"namespace": "org.openedx.learning.exam.attempt.reset.v1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"name": "CloudEvent",
"type": "record",
"doc": "Avro Event Format for CloudEvents created with openedx_events/schema",
"fields": [
{
"name": "exam_attempt_data",
"type": {
"name": "ExamAttemptData",
"type": "record",
"fields": [
{
"name": "user_id",
"type": "long"
},
{
"name": "course_key",
"type": "string"
},
{
"name": "usage_key",
"type": "string"
},
{
"name": "requesting_user",
"type": [
"null",
{
"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"
}
]
}
}
]
}
],
"default": null
},
{
"name": "credit_requirement_status",
"type": [
"null",
"string"
],
"default": null
}
]
}
}
],
"namespace": "org.openedx.learning.exam.attempt.submitted.v1"
}
Loading

0 comments on commit 6424a40

Please sign in to comment.