Skip to content

Export an OpenAPI specification artefact #49

Description

@Lakes41

Difficulty: Hard

Type: Documentation

Summary

Generate and publish an OpenAPI JSON artefact for the access API so SDKs, integrations, and contributors can rely on a stable machine-readable API contract.

Current Behaviour

Fastify route schemas may power Swagger UI at runtime, but there is no clearly versioned OpenAPI artefact committed or produced in CI.

Expected Behaviour

The repository should produce an OpenAPI JSON file that can be validated in CI and used by SDK tooling.

Suggested Implementation

Add a script that builds the Fastify app, serialises the OpenAPI specification, and writes it to docs/openapi.json or a generated artefact directory. Add CI validation to catch schema generation failures.

Files or Areas Likely Affected

  • apps/access-api/src/app.ts
  • apps/access-api/src/routes.ts
  • apps/access-api/package.json
  • docs/openapi.json
  • .github/workflows/

Acceptance Criteria

  • A command generates the OpenAPI JSON spec
  • The generated spec includes all public API routes
  • The generated spec includes request and response schemas
  • CI verifies the spec can be generated
  • README links to the generated specification
  • Contributors know how to update the spec when routes change

Additional Notes

This should complement route schemas and sdk-lite contract tests.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSGrantFox Open Source Sponsorship program tagMaybe RewardedIssue may qualify for a reward upon successful completion per campaign rulesOfficial CampaignCampaign: Official Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions