Skip to content

Commit

Permalink
fix: generated avro schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
ilee2u committed Sep 19, 2023
1 parent 9c62c2d commit 98c6a66
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "CloudEvent",
"type": "record",
"doc": "Avro Event Format for CloudEvents created with openedx_events/schema",
"fields": [
{
"name": "course_staff_data",
"type": {
"name": "CourseStaffData",
"type": "record",
"fields": [
{
"name": "course_key",
"type": "string"
},
{
"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"
}
]
}
}
]
}
}
]
}
}
],
"namespace": "org.openedx.learning.user.add.course.staff.role.v1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "CloudEvent",
"type": "record",
"doc": "Avro Event Format for CloudEvents created with openedx_events/schema",
"fields": [
{
"name": "course_staff_data",
"type": {
"name": "CourseStaffData",
"type": "record",
"fields": [
{
"name": "course_key",
"type": "string"
},
{
"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"
}
]
}
}
]
}
}
]
}
}
],
"namespace": "org.openedx.learning.user.remove.course.staff.role.v1"
}
4 changes: 2 additions & 2 deletions openedx_events/learning/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class ProgramCertificateData:
certificate_available_date = attr.ib(type=datetime, default=None)


attr.s(frozen=True)
@attr.s(frozen=True)
class CourseStaffData:
"""
Attributes defined for the Open edX Authentication function to Add Users to a role.
Expand All @@ -308,4 +308,4 @@ class CourseStaffData:
user (UserData): User who will have the "Course Staff" role assigned/removed
"""
course_key = attr.ib(type=str)
user = attr.ib(UserData)
user = attr.ib(type=UserData)

0 comments on commit 98c6a66

Please sign in to comment.