Zum Inhalt springen
DIH Knowledge Base
    Anmelden

    Embedded API docs

    Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

    SaaS products ship a machine-readable API contract. The modern standard is OpenAPI 3.x (successor to Swagger 2.0). This page embeds both formats with Swagger UI — the reference viewer that supports legacy Swagger 2.0 and current OpenAPI 3 specs.

    Spec: /specs/connect-api.openapi.yaml — same fictional Connect subset as the PoC.

    • Pros: Familiar “Try it out”, models, filters; supports OpenAPI 3 and Swagger 2.0; single <OpenApiEmbed> component (swagger-ui-dist).
    • Cons: Heavier bundle than read-only viewers; style is Swagger-branded (lightly themed in starlight.css).

    The gated Connect API reference page uses link-out to the live v5 docs — a valid pattern when reference is maintained elsewhere.

    1. Publish OpenAPI 3 under public/specs/ (generate from code or design-first).
    2. Keep a Swagger 2.0 export only if downstream tools still require it — prefer one source of truth (OAS3).
    3. Version specs (connect-v1.yaml, v2.yaml) and link from changelog pages.
    4. Pair every major endpoint group with a guide page (auth, errors, pagination).
    5. Export Postman from the same spec in CI — see Diagrams & downloads.

    Next: Custom components.