Skip to content

Namespace contract and form (name rule, required company keys, extra keys, expiry calendar) and the API documentation standard #479

Open
3 of 5 issues completed

Description

@ephico2real2

Part of #17. Follows #215, #328, #350, #358, #368. Covers #365.

The design was settled with the owner on 2026-11-20 and is recorded in docs/reviews/2026-11-20-issue-479/ (committed with Phase 1): namespace_metadata.md (requirements R1–R12, rules, configuration, contract changes A1–A11, the Swagger and ReDoc standard, payload mocks, the portal form P1–P12, decisions D1–D13) and implementation_plan.md (phases, code rules, race conditions R1–R9).

Mockups (claude.ai, private to the owner):

In short:

  • Name. <mnemonic>-<desired name>-<cluster env>, with the portal locking both ends.
  • Required keys. Keep the current keys and add the required name (filled in), company.net/app-environment (filled in), company.net/mnemonic, company.net/lob and company.net/cl.
  • Team default. cmapi.net/team defaults to the mnemonic.
  • Filled-in keys. They are required and shown in Swagger, ReDoc and the portal, and cmapi still fills them.
  • Extra keys. Set in two key/value tables, in a toggle section that is closed and empty by default.
  • Expiration. An optional date from a calendar, showing the date and the days until it.
  • Every response. Each status listed, with one named example per problem code.
  • Extensions. Shown in Swagger UI and ReDoc.

Phases (each a PR; implementer Opus 5.5 high, reviewer Codex gpt-6.2-astra xhigh, coordinator runs the steps Codex cannot):

  1. API contract for the namespace (A1–A11)
  2. A contract lint, then all 40 operations to the standard
  3. Swagger UI and ReDoc settings
  4. The portal form (P1–P12)
  5. CRC configuration, Kyverno bundle, deploy (after the owner confirms the design's section 8, and after CRC's own import Secret uses a non-expiring legacy token and lacks the contract's managed-by and token-expires-at annotations #398's renewal merges)

Breaking change: the filled-in keys becoming required (A1) are listed in cmapi/contract/accepted-breaking.txt with this issue. Clients sending the right value, or nothing, keep working.

Research mandate. Research: search the primary sources (OpenAPI 3.1 and JSON Schema required/readOnly; Swagger UI showExtensions, showCommonExtensions; ReDoc options; PatternFly InputGroup, ExpandableSection, DatePicker), 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

3 of 5 Issues completed
Loading 5 sub-issues

Activity

  1. added
    enhancement
    status:open
    In-Progress
    review:fable
    on Nov 20, 2026
  2. ephico2real2 commented on Nov 20, 2026

    @ephico2real2
    OwnerAuthor

    The owner, 2026-11-20: "This is just a sample. Don't worry about this data. Focus on the format." The body is corrected: the reference gives the format only (a typed request object of named fields, each with its type and format shown in Example Value and Model, required fields marked, filled-in examples). The coordinator had over-read it: the requester object, the reshaped response, description, and the esatsId/sourceToken note are removed. The fields are the owner's: the current CRC keys plus name, company.net/app-environment, company.net/mnemonic, company.net/lob and company.net/cl.

  3. changed the title [-]Named, required metadata fields in the create-namespace API, Swagger and portal (company profile on CRC)[/-] [+]Namespace contract and form (name rule, required company keys, extra keys, expiry calendar) and the API documentation standard[/+] on Nov 20, 2026
  4. added 8 commits that reference this issue on Nov 20, 2026
  5. 2 remaining items

  6. added a commit that references this issue on Nov 20, 2026
  7. added 3 commits that reference this issue on Nov 20, 2026
  8. added 2 commits that reference this issue on Nov 20, 2026
  9. ephico2real2 commented on Nov 20, 2026

    @ephico2real2
    OwnerAuthor

    Owner, 2026-11-20 (new requirement): "There are some teams that will just create a global namespace like -."

    So the name rule becomes:

    • <mnemonic>-<desired>-<env>, for example abc-payments-dev, or <mnemonic>-<env>, for example abc-dev, a team-wide namespace;
    • abc--dev is still refused.

    Today abc-dev is refused in three places: the API (core/metadata.py _check_desired_name, from #488 F08), the generated Kyverno rule (core/policygen.py:195, #488 M2), and the portal (the middle is isRequired in NamespaceNameField.tsx). All three change together, with tests. The work starts now.

  10. added a commit that references this issue on Nov 21, 2026
  11. added a commit that references this issue on Nov 21, 2026
  12. added a commit that references this issue on Dec 2, 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

    In-Progressenhancementreview:fablestatus:open

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions