Summary
scripts/test/openapi_spec_check.sh (run by CI's python-checks job) regenerates the OpenAPI spec and diffs it against openapi/specs/{v0,v1,v2}.yaml. On main this currently fails because the checked-in specs are out of date.
Verified locally by running manage.py generate_openapi_spec against plain main and diffing against openapi/specs/.
Missing from the checked-in specs
POST /api/v0/orders/refund-requests/ endpoint (orders_refund_requests_create)
RefundRequest / RefundRequestRequest schemas
RefundReasonEnum schema
refund_eligible: boolean field on the relevant order/serializer schemas
These all trace back to the refund-request feature added in #3810 ("Add learner refund request workflow"), which apparently didn't regenerate the OpenAPI specs before merging (or CI's openapi-diff check didn't catch it — it only diffs the PR's own branch changes, not a full regen against the same command openapi_spec_check.sh uses).
Impact
This is currently failing CI's python-checks job on every open PR based on main, independent of PR content.
Fix
Run:
python manage.py generate_openapi_spec --directory=openapi/specs --fail-on-warn
and commit the regenerated v0.yaml, v1.yaml, v2.yaml.
Related
Filed alongside #3831 / #3832, a separate unrelated main-branch CI breakage (duplicate ECOMMERCE_DEFAULT_PAYMENT_GATEWAY env var declaration) discovered while resolving conflicts on #3802.
Summary
scripts/test/openapi_spec_check.sh(run by CI'spython-checksjob) regenerates the OpenAPI spec and diffs it againstopenapi/specs/{v0,v1,v2}.yaml. Onmainthis currently fails because the checked-in specs are out of date.Verified locally by running
manage.py generate_openapi_specagainst plainmainand diffing againstopenapi/specs/.Missing from the checked-in specs
POST /api/v0/orders/refund-requests/endpoint (orders_refund_requests_create)RefundRequest/RefundRequestRequestschemasRefundReasonEnumschemarefund_eligible: booleanfield on the relevant order/serializer schemasThese all trace back to the refund-request feature added in #3810 ("Add learner refund request workflow"), which apparently didn't regenerate the OpenAPI specs before merging (or CI's
openapi-diffcheck didn't catch it — it only diffs the PR's own branch changes, not a full regen against the same commandopenapi_spec_check.shuses).Impact
This is currently failing CI's
python-checksjob on every open PR based onmain, independent of PR content.Fix
Run:
and commit the regenerated
v0.yaml,v1.yaml,v2.yaml.Related
Filed alongside #3831 / #3832, a separate unrelated
main-branch CI breakage (duplicateECOMMERCE_DEFAULT_PAYMENT_GATEWAYenv var declaration) discovered while resolving conflicts on #3802.