···11-# Contributing to OpenAPI TypeScript Codegen
11+# Contributing to OpenAPI TypeScript 👋
2233Thanks for your interest in contributing to this project.
44
+16-16
README.md
···11-# OpenAPI TypeScript Codegen
11+# OpenAPI TypeScript 👋
2233> ✨ Turn your OpenAPI specification into a beautiful TypeScript client
44···17171818## About
19192020-This is an opinionated fork of the [openapi-typescript-codegen](https://github.com/ferdikoomen/openapi-typescript-codegen) package. We created it after the original project became [unmaintained](https://github.com/ferdikoomen/openapi-typescript-codegen/issues/1276#issuecomment-1302392146) because we wanted to support OpenAPI v3.1 introduced in the FastAPI [v0.99.0](https://fastapi.tiangolo.com/release-notes/#0990) release. We plan to resolve the most pressing issues in the original project – open an issue if you'd like to prioritise your use case!
2020+`openapi-ts` started as a fork of [openapi-typescript-codegen](https://github.com/ferdikoomen/openapi-typescript-codegen). We created it after the original project became [unmaintained](https://github.com/ferdikoomen/openapi-typescript-codegen/issues/1276#issuecomment-1302392146) to add support for OpenAPI v3.1. We plan to resolve the most pressing issues in the original project – open an issue if you'd like to prioritise your use case!
21212222## Features
2323···3333The fastest way to use `openapi-ts` is via npx
34343535```sh
3636-npx @nicolas-chaulet/openapi-typescript-codegen -i path/to/openapi.json -o src/client
3636+npx @hey-api/openapi-ts -i path/to/openapi.json -o src/client
3737```
38383939Congratulations on creating your first client! 🎉
···4141## Installation
42424343```sh
4444-npm install @nicolas-chaulet/openapi-typescript-codegen --save-dev
4444+npm install @hey-api/openapi-ts --save-dev
4545```
46464747or
48484949```sh
5050-yarn add @nicolas-chaulet/openapi-typescript-codegen -D
5050+yarn add @hey-api/openapi-ts -D
5151```
52525353If you want to use `openapi-ts` with CLI, add a script to your `package.json` file
···6161You can also generate your client programmatically by importing `openapi-ts` in a `.ts` file.
62626363```ts
6464-import { createClient } from '@nicolas-chaulet/openapi-typescript-codegen'
6464+import { createClient } from '@hey-api/openapi-ts'
65656666createClient({
6767 input: 'path/to/openapi.json',
···75757676`openapi-ts` supports loading configuration from a file inside your project root directory. You can either create a `openapi-ts.config.cjs` file
77777878-```js
7979-/** @type {import('@nicolas-chaulet/openapi-typescript-codegen').UserConfig} */
7878+```cjs
7979+/** @type {import('@hey-api/openapi-ts').UserConfig} */
8080module.exports = {
8181 input: 'path/to/openapi.json',
8282 output: 'src/client',
···85858686or `openapi-ts.config.mjs`
87878888-```js
8989-/** @type {import('@nicolas-chaulet/openapi-typescript-codegen').UserConfig} */
8888+```mjs
8989+/** @type {import('@hey-api/openapi-ts').UserConfig} */
9090export default {
9191 input: 'path/to/openapi.json',
9292 output: 'src/client',
···9999100100By default, `openapi-ts` will automatically format your client according to your project configuration. To disable automatic formatting, set `format` to false
101101102102-```js
103103-/** @type {import('@nicolas-chaulet/openapi-typescript-codegen').UserConfig} */
102102+```mjs
103103+/** @type {import('@hey-api/openapi-ts').UserConfig} */
104104export default {
105105 format: false,
106106 input: 'path/to/openapi.json',
···114114115115For performance reasons, `openapi-ts` does not automatically lint your client. To enable this feature, set `lint` to true
116116117117-```js
118118-/** @type {import('@nicolas-chaulet/openapi-typescript-codegen').UserConfig} */
117117+```mjs
118118+/** @type {import('@hey-api/openapi-ts').UserConfig} */
119119export default {
120120 input: 'path/to/openapi.json',
121121 lint: true,
···129129130130We do not generate TypeScript [enums](https://www.typescriptlang.org/docs/handbook/enums.html) because they are not standard JavaScript and pose [typing challenges](https://dev.to/ivanzm123/dont-use-enums-in-typescript-they-are-very-dangerous-57bh). If you want to iterate through possible field values without manually typing arrays, you can export enums by running
131131132132-```js
133133-/** @type {import('@nicolas-chaulet/openapi-typescript-codegen').UserConfig} */
132132+```mjs
133133+/** @type {import('@hey-api/openapi-ts').UserConfig} */
134134export default {
135135 enums: true,
136136 input: 'path/to/openapi.json',