Skip to content

CI broken on main: checked-in OpenAPI specs are stale (missing refund-request endpoint/schemas from #3810) #3833

Description

@AhtishamShahid

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions