Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ PR with a detailed description is fine too.

<!-- toc -->

- [Setup](#setup)
- [Workflow](#workflow)
- [Typescript Conventions](#typescript-conventions)
- [Linting / Formatting](#linting--formatting)
- [Testing](#testing)
- [Publishing](#publishing)
* [Setup](#setup)
* [Workflow](#workflow)
* [Typescript Conventions](#typescript-conventions)
* [Linting / Formatting](#linting--formatting)
* [Testing](#testing)
* [Publishing](#publishing)

<!-- tocstop -->

Expand All @@ -27,7 +27,7 @@ PR with a detailed description is fine too.
1. Install a node version manager that respects `.nvmrc` files, such as
[fnm](https://github.com/Schniz/fnm)
2. Enable [corepack](https://nodejs.org/api/corepack.html) using `corepack
enable`
enable`
3. Install `devDependencies` using `pnpm`

## Workflow
Expand Down Expand Up @@ -93,8 +93,8 @@ pnpm integration:generate && pnpm integration:validate

We have two types of testing in play:

- Unit tests using `jest`
- Integration tests
* Unit tests using `jest`
* Integration tests

The unit testing is currently a bit on the "light" side - the project started
as a fun experiment on a weekend and there is still some back filling to do.
Expand All @@ -104,11 +104,11 @@ There is also a heavy reliance on integration tests, where we use the openapi
specifications for large API surfaces to run the code generation and check that
the result builds, currently this includes:

- Github API
- Stripe API
- Okta API (partial)
- Petstore API (from Swagger)
- A Todo List API (written for this repo, showcases definitions split across
* Github API
* Stripe API
* Okta API (partial)
* Petstore API (from Swagger)
* A Todo List API (written for this repo, showcases definitions split across
multiple files)

At this stage we don't actually execute the code generated for these API's, but
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ With typescript templates for [koa](https://openapi-code-generator.nahkies.co.nz

The [fetch](https://openapi-code-generator.nahkies.co.nz/guides/client-templates/typescript-fetch) and [axios](https://openapi-code-generator.nahkies.co.nz/guides/client-templates/typescript-axios) templates work great in conjunction with [react-query](https://tanstack.com/query/latest)

> [!TIP]
> \[!TIP]
> Try out our [interactive playground here](https://openapi-code-generator.nahkies.co.nz/playground)

<!-- toc -->

- [Documentation](#documentation)
- [Project Structure](#project-structure)
- [Contributing](#contributing)
- [License](#license)
* [Documentation](#documentation)
* [Project Structure](#project-structure)
* [Contributing](#contributing)
* [License](#license)

<!-- tocstop -->

Expand All @@ -37,11 +37,11 @@ You can contribute to it in [./packages/documentation](./packages/documentation)

The repository is structured as a mono repo of several npm packages that work together under [./packages](./packages):

- [openapi-code-generator](./packages/openapi-code-generator)
- [typescript-axios-runtime](./packages/typescript-axios-runtime)
- [typescript-express-runtime](./packages/typescript-express-runtime)
- [typescript-fetch-runtime](./packages/typescript-fetch-runtime)
- [typescript-koa-runtime](./packages/typescript-koa-runtime)
* [openapi-code-generator](./packages/openapi-code-generator)
* [typescript-axios-runtime](./packages/typescript-axios-runtime)
* [typescript-express-runtime](./packages/typescript-express-runtime)
* [typescript-fetch-runtime](./packages/typescript-fetch-runtime)
* [typescript-koa-runtime](./packages/typescript-koa-runtime)

The `openapi-code-generator` package is the main package, whilst the others are supporting packages used at runtime by
the code output by some of the templates.
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"scripts": {
"clean": "pnpm -r clean",
"docs:generate": "./scripts/generate-docs.sh",
"docs:generate": "node ./scripts/generate-toc.mjs",
"refresh": "./scripts/refresh-data.sh",
"lint": "biome lint --fix .",
"format": "biome check --write .",
Expand Down Expand Up @@ -58,8 +58,9 @@
"json5": "^2.2.3",
"lerna": "^8.2.3",
"lint-staged": "^16.2.4",
"markdown-toc": "^1.2.0",
"prettier": "^3.6.2",
"remark": "^15.0.1",
"remark-toc": "^9.0.0",
"typescript": "^5.9.3"
},
"workspaces": [
Expand Down
10 changes: 6 additions & 4 deletions packages/documentation/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# @nahkies/openapi-code-generator - documentation website

The documentation website is built using [NextJS](https://nextjs.org/) / [Nextra](https://nextra.site/).

It's hosted at https://openapi-code-generator.nahkies.co.nz/ using GitHub pages.

<!-- toc -->

- [Local development](#local-development)
- [Testing production builds](#testing-production-builds)
* [Local development](#local-development)
* [Testing production builds](#testing-production-builds)

<!-- tocstop -->

Expand All @@ -18,12 +19,13 @@ Run the development server with the `dev` script:
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
Open <http://localhost:3000> with your browser to see the result.

### Testing production builds

Additional Requirements:
- Docker

* Docker

You can test a production build locally by using the included script. It'll run
a production build, and then serve it on port `8080` using the official `nginx` docker image
Expand Down
9 changes: 4 additions & 5 deletions packages/openapi-code-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
[![CI/CD](https://github.com/mnahkies/openapi-code-generator/actions/workflows/ci.yml/badge.svg)](https://github.com/mnahkies/openapi-code-generator/actions?query=branch%3Amain+event%3Apush)
[![npm](https://img.shields.io/npm/dm/%40nahkies%2Fopenapi-code-generator.svg)](https://www.npmjs.com/package/@nahkies/openapi-code-generator)


`@nahkies/openapi-code-generator` is a CLI tool that aims to generate high quality typescript client SDK's,
and API server scaffolding (routing, validation, serialization) from OpenAPI 3 specifications.

Expand All @@ -12,10 +11,10 @@ and [TypeSpec](https://typespec.io/) are supported as input specifications.

<!-- toc -->

- [Documentation](#documentation)
- [Changelog](#changelog)
- [Stability](#stability)
- [More information / contributing](#more-information--contributing)
* [Documentation](#documentation)
* [Changelog](#changelog)
* [Stability](#stability)
* [More information / contributing](#more-information--contributing)

<!-- tocstop -->

Expand Down
Loading