SIGN IN SIGN UP

feat(adr-0027): add @extend_schema to Xblock v1 viewset (#38834)

Follow-up from PR #38773 review: Xblock v1 previously had no OpenAPI
schema decoration, which was flagged as a pre-existing gap. This adds
drf-spectacular @extend_schema to all five viewset actions (create,
retrieve, update, partial_update, destroy) so the endpoints show up
with proper request/response bodies, path/query parameters, and error
codes in the generated OpenAPI 3.x schema.

Notes:
- Documents the ADR 0036 ``?view=minimal`` query parameter in the
  schema (enum=["minimal"]) so consumers can discover it.
- Documents the legacy ``?fields=`` selector (graderType /
  ancestorInfo / customReadToken) as ``deprecated=True`` — its
  semantics are pass-through / type-of-response, not the ADR 0036
  CSV subset convention.
- Shared parameter and response building blocks are declared at
  module scope to keep the per-action decorators readable.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
T
Taimoor Ahmed committed
8ce7291d9840221ebe2e34958896b8c49b4b12f1
Parent: dd79699
Committed by Feanil Patel <feanil@axim.org> on 7/29/2026, 2:26:48 PM