Skip to content

[Interoperability] Add machine-readable OpenAPI and AsyncAPI contracts #152

Description

@seonghobae

Buyer-visible / integration gap

mightyETL now has canonical prose API/event documentation in PR #149, but protected develop@622e5e6c3d534f230c390f10e3832efadfc01825 has no checked-in machine-readable OpenAPI or AsyncAPI contract and no SpringDoc/OpenAPI generator dependency. A buyer, SDK generator, gateway integrator, contract-test harness, or event consumer therefore still has to infer schemas from Java controllers and prose.

This is intentionally separate from #149 so the already-large canonical-documentation baseline is not expanded after a branch-writer conflict.

Standards baseline

At implementation time reverify the latest final published specifications from the official projects. As of the issue creation evidence:

  • OpenAPI Initiative lists OpenAPI Specification 3.2.0 as its latest published OAS (https://spec.openapis.org/oas/latest.html / v3.2.0, published 2025-09-19);
  • AsyncAPI documentation and release material expose the 3.1.0 specification generation for event-driven API documents (https://www.asyncapi.com/docs/reference and current 3.1.0 release/tutorial material).

Do not use a draft/editor version merely because it is newer than the latest final published specification.

Required product boundary

HTTP

Generate or maintain a validated OpenAPI document for protected shipped endpoints only, including at minimum:

  • POST /api/etl/process;
  • GET /api/etl/connectors;
  • feature-gated POST /api/etl/jobs;
  • feature-gated owner-scoped GET /api/etl/jobs/{jobRecordId};
  • POST /api/cdc/start;
  • POST /api/cdc/stop;
  • GET /api/cdc/status;
  • GET /api/cdc/sources;
  • GET /api/cdc/targets;
  • RFC 9457 problem representations;
  • Idempotency-Key, Idempotency-Replayed, Location, Cache-Control, and relevant content types/statuses.

Active-PR endpoints/states such as pagination, Retry-After, ETag, cancellation, replay, or JWT mode must be included only on the integration PR that actually ships them; they must not be promoted to the protected baseline spec early.

Events

Add an AsyncAPI contract for the live CDC publication boundary that truthfully describes raw Debezium JSON compatibility, destination/topic semantics, key optionality, Kafka transport, and replay-tolerant delivery semantics. Do not call the event exactly-once or canonicalized while protected source does not prove those claims.

TDD / validation requirements

  • RED contract test first: machine-readable specs absent or stale relative to live controller/event contracts;
  • validate OpenAPI/AsyncAPI documents against pinned validators/schemas;
  • contract tests compare checked-in paths, HTTP methods, status codes, headers, and bounded representative schemas against live controllers;
  • negative test proves active_pr routes/states cannot appear in a protected-develop published contract before integration;
  • generated SDK/client smoke test for at least one supported language, or a documented reason for keeping validation generator-neutral;
  • Kafka message fixture validates the AsyncAPI schema against actual protected live publication payload/key shape;
  • documentation links spec artifacts from README/API contract/Architecture/Traceability;
  • exact-current-head CI/security/coverage/review evidence required before merge.

Compatibility / rollback

  • public contract changes require semantic compatibility review and changelog entry;
  • if runtime-generated docs are used, the build must deterministically compare them with checked-in canonical artifacts or publish them from the exact release head;
  • rollback cannot leave a published machine-readable contract advertising endpoints/states absent from the rolled-back binary.

References to record in doctoring — APA 7th style

OpenAPI Initiative. (2025). OpenAPI Specification 3.2.0. https://spec.openapis.org/oas/v3.2.0.html

AsyncAPI Initiative. (2026). AsyncAPI Specification. https://www.asyncapi.com/docs/reference

RFC 9110, RFC 9457, and RFC 9651 remain the HTTP/problem/idempotency field semantic references already used by mightyETL.

Activity

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

    area: authAuthentication, authorization, identity, or tenant isolationarea: ci-cdCI, GitHub Actions, checks, release, or supply chainarea: dependenciesDependency or lockfile maintenancearea: securitySecurity boundary, hardening, or vulnerability preventionmaintenancepriority: mediumNormal-priority or P2 workstatus: triagedOpen issue has an organization taxonomy assignmenttype: featureNew or expanded product capability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions