Skip to content

API documentation standard: every operation in one format in Swagger UI and ReDoc (contract lint, settings) #480

Closed
0 of 1 issue completed

Description

@ephico2real2

Part of #13. Related: #479 (its Phases 2 and 3).

The owner, 2026-11-20: the clean format agreed for the create-namespace operation is "a total design of all the controllers in the swagger … This is our standard going forward and don't forget redoc".

What is wrong. Measured on CRC's live /openapi.json (2026-11-20): 40 operations in 10 tags, x-tagGroups present, and an example for every response. But nothing enforces one format across the operations (S1–S10 in docs/reviews/2026-11-20-issue-479/implementation_plan.md section 3). Swagger UI sets only persistAuthorization (cmapi/src/cmapi/main.py:272), so x- extensions and the common rule extensions are not shown. ReDoc's options are not set for extensions or required-first ordering.

What to build.

  • Phase 2: a table-driven contract lint, tests/service/test_api_standard.py, checking S1–S10 for every operation, each a named check with a clear failure line. Then fix each operation the lint lists, using only the existing helpers.
  • Phase 3: Swagger UI's showExtensions, showCommonExtensions, displayRequestDuration, docExpansion: "list" and model-depth settings, and ReDoc's showExtensions, requiredPropsFirst and expandResponses: "200,202". Page tests for each.

How to prove it. The lint fails on main for the gaps it finds and passes after. oasdiff reports an additive change. The page tests check each setting.

Research mandate. Research: search the primary sources (Swagger UI configuration, ReDoc configuration, OpenAPI 3.1 examples and extensions), compare the options, choose the industry best practice, fix the cause rather than the symptom, and record the choice and its sources.

Sub-issues

Sub-issues

0 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    enhancement
    status:open
    Backlog
    review:fable
    on Nov 20, 2026
  2. added a commit that references this issue on Nov 20, 2026
  3. added 3 commits that reference this issue on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backlogenhancementreview:fablestatus:open

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions