Skip to content

BUG-02: No operation has a curl sample (x-codeSamples) #129

Closed

Description

@ephico2real2

Part of #13

What is wrong: No operation has a curl sample. The design specifies one x-codeSamples entry for each operation, with the instance URL and the headers.

Where: cmapi/src/cmapi/core/docs.py, DocumentedRouter._register, which sets openapi_extra without x-codeSamples. The design is docs/01-design-and-architecture.md:725.

How to prove it: In cmapi/, with the service test database on port 55432, write a test that uses the world fixture and reads GET /openapi.json. The assertion below fails on 0c79108 and must pass after the fix.

Measured or inferred: Measured on 2026-11-13 with the world fixture of the service suite, at 0c79108 on branch ldap-rbac-names. No cluster. The spec has OpenAPI 3.1.0 and 31 operations.

Measured: 0 of 31 operations have x-codeSamples.

Severity: Low.

What must hold after the fix: Each of the 31 operations has one curl sample. The sample uses the instance servers URL, Authorization: Bearer, and Idempotency-Key and If-Match where the operation takes them. A test runs each sample's request shape against the app and gets no 400 for a missing header.

Research: Read the ReDoc documentation of x-codeSamples (fields lang, label, source) for ReDoc 3.0.1.

Class: INV.

Activity

  1. added
    bug
    class:INV
    status:open
    sev:low
    Backlog
    on Nov 13, 2026
  2. added
    In-Progress
    and removed
    Backlog
    on Nov 13, 2026
  3. ephico2real2 commented on Nov 13, 2026

    @ephico2real2
    OwnerAuthor

    In-Progress: draft pull request #135 closes this issue. CI run 43400342375 on 3ea7aa1: api-contract, service, portal-ui, portal-mockup and reference-code passed; manifests was still running when this was written.

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

    In-Progressbugclass:INVsev:lowstatus:open

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions