Skip to content

[RFD]: Standardized OpenAPI Discovery Endpoint for OpenCHAMI #124

@alexlovelltroy

Description

@alexlovelltroy

Decision Goal

Define a consistent, machine-discoverable endpoint for retrieving OpenAPI specifications across all OpenCHAMI services using a .well-known URI pattern. This enables dynamic client generation, federation-aware tooling, and consistent service introspection without prior knowledge of service-specific paths.

Category

Architecture

Stakeholders / Affected Areas

No response

Decision Needed By

No response

Problem Statement

Motivation

OpenCHAMI is evolving toward:

  • Federated control planes
  • Schema-driven APIs
  • Dynamic clients (CLI, UI, automation)

Current state:

  • OpenAPI endpoints are inconsistent or implicit
  • Clients must be preconfigured with service-specific URLs
  • No uniform way to introspect capabilities across services

This creates friction for:

  • CLI tooling (e.g., ochami)
  • Cross-service orchestration
  • External integrations
  • Future multi-cluster federation

Problem Statement

There is no standardized way within OpenCHAMI to:

  • Discover API schemas programmatically
  • Enumerate available API groups or versions
  • Support tooling that can adapt dynamically to deployed services

This mirrors the broader ecosystem gap where the OpenAPI Specification defines format but not discovery.

Proposed Solution

Adopt a .well-known discovery endpoint for all OpenCHAMI services.

Base Endpoint
GET /.well-known/openapi

Returns:

  • Default OpenAPI document for the service
  • Typically the latest stable version

Query Parameters

Support optional filtering:

GET /.well-known/openapi?group=<group>&version=<version>

Examples:

/.well-known/openapi?group=inventory
/.well-known/openapi?group=boot&version=v1

Response
  • application/json
  • Valid OpenAPI 3.x document
  • May be generated dynamically or served statically

Optional Index Endpoint

To support discovery of available groups and versions:

GET /.well-known/openapi/index

Example response:

{
  "groups": [
    {
      "name": "inventory",
      "versions": ["v1", "v2"]
    },
    {
      "name": "boot",
      "versions": ["v1"]
    }
  ]
}

Design Considerations

Alignment with Existing Standards
  • Uses .well-known pattern defined in RFC 5785
  • Mirrors discovery models used in OIDC and ACME
  • Does not conflict with existing OpenAPI tooling

Backward Compatibility
  • Does not replace existing endpoints (/openapi.json, /v3/api-docs, etc.)
  • Services may continue exposing legacy paths
  • .well-known endpoint acts as a stable overlay

Implementation Flexibility

Services may:

  • Serve static OpenAPI files
  • Generate specs dynamically from schema definitions
  • Proxy or aggregate multiple internal APIs

Federation Implications

Supports:

  • Cross-cluster API discovery
  • Dynamic federation clients
  • Capability negotiation between control planes

Alternatives Considered

  1. Do nothing

    • Maintains current inconsistency
    • Prevents dynamic tooling
  2. Framework-specific conventions

    • Locks OpenCHAMI into specific stacks
    • Reduces portability
  3. Central registry only

    • Adds operational complexity
    • Creates a single point of failure
    • Limits decentralized discovery

Other Considerations

No response

Related Docs / PRs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    rfdRequest for Discussion

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions