Skip to content

About

A TypeSpec specification of the Redmine API, with an OpenAPI reference per Redmine release, a TypeScript client and TanStack Query options for React.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Redmine API

npm Release Docs License

A typed TypeScript client for the Redmine REST API, generated from a TypeSpec specification that covers every Redmine release from 3.1 to 7.0. Integration tests check the spec against real Redmine servers.

Documentation: guides, the client and React reference, and the API reference of every Redmine version.

Packages

Package Description
redmine-api-client The TypeScript client
redmine-api-client-react TanStack Query options for React
OpenAPI documents OpenAPI 3.1, one document per Redmine version

Quick start

pnpm add redmine-api-client
import { RedmineClient } from "redmine-api-client";

const client = new RedmineClient("https://redmine.example.com", {
  key: process.env.REDMINE_API_KEY!,
});

const { issue } = await client.issuesClient.getIssue(42);

console.log(issue.subject, issue.createdOn);

Continue with the client guide or the React guide.

Development

Requires Node.js 24, pnpm and, for the integration tests, Docker. The repository has a mise.toml for the tools.

pnpm install
pnpm build           # compile the spec, then build the packages
pnpm test            # integration tests against Redmine 7 in Docker
pnpm test:packages   # unit tests of the packages, no Docker needed
pnpm docs:dev        # documentation site

Other Redmine versions are tested with REDMINE_IMAGE, e.g. REDMINE_IMAGE=redmine:6.0.11 pnpm test, or the test:redmine-* scripts in tests/package.json.

Folder Content
spec/ TypeSpec spec, one folder per API resource
schema/openapi/ Generated OpenAPI documents
generated/ Generated client, not edited by hand
packages/ Published packages
tests/ Integration tests against Redmine in Docker
docs/ Documentation site (Fumadocs)
dev/ Scratch script for trying the client against your own Redmine

Commits follow Conventional Commits: pushes to main and beta are released to npm by semantic-release (latest and beta dist-tags).

License

MIT

About

A TypeSpec specification of the Redmine API, with an OpenAPI reference per Redmine release, a TypeScript client and TanStack Query options for React.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages