Skip to content

Replace Java-based OpenAPI generator with Node-native alternative #12

Description

@pkarlsson-codes

Problem

generate-api-from-spec (and related scripts) use @openapitools/openapi-generator-cli, which is a wrapper around the Java OpenAPI Generator JAR. This means Java must be installed to generate the TypeScript API client, even though the rest of the toolchain is pure Node/npm.

This blocks contributors on Linux (and CI environments) that don't have Java installed.

Proposed Solution

Replace @openapitools/openapi-generator-cli with a Node-native alternative. Leading candidates:

  • openapi-typescript + openapi-fetch — generates TypeScript types from the spec; pairs with a lightweight fetch wrapper. Actively maintained, no runtime class bloat.
  • hey-api/openapi-ts — generates typed clients, also Node-native.

Note: openapi-typescript-codegen is already in dependencies but generates a different class-based structure and is largely unmaintained — it should probably be removed rather than used as the replacement.

Acceptance Criteria

  • npm run frontend:generate (and related generate scripts) work without Java installed
  • Generated client is consumed by the frontend without breaking existing usage
  • openapi-typescript-codegen and @openapitools/openapi-generator-cli removed from package.json
  • generate-api-clients.sh updated accordingly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions