fix: make the enrollment v2 schema match with API returns - #39120
Draft
Faraz32123 wants to merge 1 commit into
Draft
Faraz32123 wants to merge 1 commit into
Faraz32123 wants to merge 1 commit into
Conversation
Two places where the published schema disagreed with the actual responses, both of which any generated client hits: The course date fields are null for courses with no dates set, but weren't declared nullable, so clients were told they're always present and blew up parsing null. The enrollment_allowed GET returns a plain list, but @action inherits the viewset's pagination_class, so drf-spectacular published a paginated envelope for it. The endpoint itself is unchanged — only the schema was wrong.
This was referenced Sep 17, 2026
Open
Faraz32123
added a commit
to edly-io/openedx-platform-sdk
that referenced
this pull request
Sep 17, 2026
- regen_sdk.sh now takes PLATFORM_DIR or the schema URLs explicitly instead of inferring them, and prefixes the schema filenames per service - moved the auth.py round-trip out of `sed -i ''` (BSD-only, failed on Linux after the tree was already removed) and into postprocess_sdk.py - post-processing fails when a step patches nothing, and schema merges report their collisions, so a schema change can't quietly invalidate a fix - the three platform schema workarounds name their exit path: openedx/openedx-platform#39120 for the two response-shape bugs, openedx/openedx-platform#39121 for the spurious path parameter - pinned the workflow actions to SHAs and recorded the platform revision from the platform checkout rather than github.sha - dropped the two unenroll request body models the API never accepts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
related PR: edly-io/openedx-platform-sdk#1
Make the enrollment v2 schema match what the API returns
Two places where the published schema disagreed with the actual responses.
Found while generating an SDK client — any generated client hits both.
enrollment_start,enrollment_end,course_startandcourse_endare null when a course has no dates set,but weren't declared nullable, so clients blew up parsing null.
GET .../enrollment_allowed/returns a plain list, but
@actioninherits the viewset'spagination_class. Fixed withpagination_class=None.No behaviour change — both fix the schema, not the endpoints.