Skip to content

Generate TypeScript types from the OpenAPI spec #865

Description

@Jayy4rl

Context: Issue 127 adds an OpenAPI 3.1 spec. Frontend developers need TypeScript types auto-generated from it so they stay in sync with the API.

Requirements:

  • Install openapi-typescript as a dev dependency.
  • Add "generate-types": "openapi-typescript api/openapi.json -o src/generated/api-types.ts" to backend/package.json.
  • Commit the initial generated file.

Acceptance criteria:

  • npm run generate-types produces a valid TypeScript file with no type errors.
  • Types match all request/response schemas in the OpenAPI spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions