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.
In-page API reference (Swagger UI)
Section titled “In-page API reference (Swagger UI)”Spec: /specs/connect-api.openapi.yaml — same fictional Connect subset as the PoC.
Spec: /specs/connect-api.swagger.json — equivalent paths for teams still on Swagger 2.0 tooling.
Other embed options (comparison)
Section titled “Other embed options (comparison)”- 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).
- Pros: Clean read-only layout, fast scanning.
- Typical setup: Redoc CDN or
@redocly/clistatic HTML — good when you do not need try-it-out.
- Pros: Modern try-it-out, theming, monetization-friendly portals.
- Typical setup: Hosted portal or React embed package.
- Pros: One operation per URL, deep links, search — e.g. community plugins or custom
getStaticPathsfrom OpenAPI. - Cons: More build pipeline; best for large APIs.
Link-out pattern (production)
Section titled “Link-out pattern (production)”The gated Connect API reference page uses link-out to the live v5 docs — a valid pattern when reference is maintained elsewhere.
Authoring checklist
Section titled “Authoring checklist”- Publish OpenAPI 3 under
public/specs/(generate from code or design-first). - Keep a Swagger 2.0 export only if downstream tools still require it — prefer one source of truth (OAS3).
- Version specs (
connect-v1.yaml,v2.yaml) and link from changelog pages. - Pair every major endpoint group with a guide page (auth, errors, pagination).
- Export Postman from the same spec in CI — see Diagrams & downloads.
Next: Custom components.