Skip to content

Commit ec7fdbe

Browse files
authored
Merge pull request #2241 from hey-api/docs/sponsor-cella
docs: add Cella sponsorship
2 parents d387959 + 81a6262 commit ec7fdbe

13 files changed

+70
-299
lines changed

README.md

Lines changed: 1 addition & 294 deletions
Original file line numberDiff line numberDiff line change
@@ -1,294 +1 @@
1-
<div align="center">
2-
<img alt="Hey API logo" height="150" src="https://heyapi.dev/images/logo-300w.png" width="150">
3-
<h1 align="center"><b>OpenAPI TypeScript</b></h1>
4-
<p align="center">🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.</p>
5-
</div>
6-
7-
<br/>
8-
9-
<p align="center">
10-
<a href="https://opensource.org/license/mit" rel="nofollow"><img src="https://img.shields.io/github/license/hey-api/openapi-ts" alt="MIT License"></a>
11-
<a href="https://github.com/hey-api/openapi-ts/actions?query=branch%3Amain"><img src="https://img.shields.io/github/last-commit/hey-api/openapi-ts" alt="Last commit" /></a>
12-
<a href="https://github.com/hey-api/openapi-ts/actions?query=branch%3Amain"><img src="https://github.com/hey-api/openapi-ts/actions/workflows/ci.yml/badge.svg?event=push&branch=main" alt="CI status" /></a>
13-
<a href="https://github.com/hey-api/openapi-ts/issues" rel="nofollow"><img src="https://img.shields.io/github/issues/hey-api/openapi-ts" alt="Number of open issues"></a>
14-
<a href="https://app.codecov.io/gh/hey-api/openapi-ts/tree/main"><img src="https://codecov.io/gh/hey-api/openapi-ts/branch/main/graph/badge.svg" alt="Test coverage" /></a>
15-
</p>
16-
17-
<p align="center">
18-
<a href="https://stackblitz.com/edit/hey-api-example?file=openapi-ts.config.ts,src%2Fclient%2Fschemas.gen.ts,src%2Fclient%2Fsdk.gen.ts,src%2Fclient%2Ftypes.gen.ts">Demo</a>
19-
<span>&nbsp;&nbsp;</span>
20-
<a href="https://heyapi.dev">Documentation</a>
21-
<span>&nbsp;&nbsp;</span>
22-
<a href="https://github.com/hey-api/openapi-ts/issues">Issues</a>
23-
<span>&nbsp;&nbsp;</span>
24-
<a href="https://github.com/orgs/hey-api/discussions/1495">Roadmap</a>
25-
<span>&nbsp;&nbsp;</span>
26-
<a href="https://npmjs.com/package/@hey-api/openapi-ts">npm</a>
27-
</p>
28-
29-
<br/>
30-
31-
## Features
32-
33-
- runs in CLI, Node.js 18+, or npx
34-
- works with OpenAPI 2.0, 3.0, and 3.1
35-
- customizable types and SDKs
36-
- clients for your runtime (Fetch API, Axios, Next.js, Nuxt, etc.)
37-
- plugin ecosystem to reduce third-party boilerplate
38-
- custom plugins and custom clients
39-
- [integration](https://heyapi.dev/openapi-ts/integrations) with Hey API platform
40-
41-
## Dashboard
42-
43-
Hey API is an ecosystem of products helping you build better APIs. Superpower your codegen and APIs with our platform.
44-
45-
[Sign In](https://app.heyapi.dev) to Hey API platform.
46-
47-
## Sponsors
48-
49-
Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api).
50-
51-
<h3 align="center">Gold</h3>
52-
53-
<table align="center" style="justify-content: center;align-items: center;display: flex;">
54-
<tbody>
55-
<tr>
56-
<td align="center">
57-
<p></p>
58-
<p>
59-
<a href="https://kutt.it/pkEZyc" target="_blank">
60-
<picture height="50px">
61-
<source media="(prefers-color-scheme: dark)" srcset="https://heyapi.dev/images/stainless-logo-wordmark-480w.jpeg">
62-
<img alt="Stainless logo" height="50px" src="https://heyapi.dev/images/stainless-logo-wordmark-480w.jpeg">
63-
</picture>
64-
</a>
65-
<br/>
66-
Generate best-in-class SDKs.
67-
<br/>
68-
<a href="https://kutt.it/pkEZyc" style="text-decoration:none;" target="_blank">
69-
stainless.com
70-
</a>
71-
</p>
72-
<p></p>
73-
</td>
74-
</tr>
75-
</tbody>
76-
</table>
77-
78-
<h3 align="center">Silver</h3>
79-
80-
<table align="center" style="justify-content: center;align-items: center;display: flex;">
81-
<tbody>
82-
<tr>
83-
<td align="center">
84-
<a href="https://kutt.it/skQUVd" target="_blank">
85-
<picture height="40px">
86-
<source media="(prefers-color-scheme: dark)" srcset="https://heyapi.dev/images/scalar-logo-wordmark-480w.jpeg">
87-
<img alt="Scalar logo" height="40px" src="https://heyapi.dev/images/scalar-logo-wordmark-480w.jpeg">
88-
</picture>
89-
</a>
90-
<br/>
91-
<a href="https://kutt.it/skQUVd" style="text-decoration:none;" target="_blank">
92-
scalar.com
93-
</a>
94-
</td>
95-
</tr>
96-
</tbody>
97-
</table>
98-
99-
<h3 align="center">Bronze</h3>
100-
101-
<table align="center" style="justify-content: center;align-items: center;display: flex;">
102-
<tbody>
103-
<tr>
104-
<td align="center">
105-
<a href="https://kutt.it/YpaKsX" target="_blank">
106-
<picture height="34px">
107-
<source media="(prefers-color-scheme: dark)" srcset="https://heyapi.dev/images/kinde-logo-wordmark-dark-480w.webp">
108-
<img alt="Kinde logo" height="34px" src="https://heyapi.dev/images/kinde-logo-wordmark-480w.jpeg">
109-
</picture>
110-
</a>
111-
</td>
112-
</tr>
113-
</tbody>
114-
</table>
115-
116-
## Quick Start
117-
118-
The fastest way to use `@hey-api/openapi-ts` is via npx
119-
120-
```sh
121-
npx @hey-api/openapi-ts \
122-
-i https://get.heyapi.dev/hey-api/backend \
123-
-o src/client
124-
```
125-
126-
Congratulations on creating your first client! 🎉 You can learn more about the generated files on the [Output](https://heyapi.dev/openapi-ts/output) page.
127-
128-
## Installation
129-
130-
#### npm
131-
132-
```sh
133-
npm install @hey-api/openapi-ts -D
134-
```
135-
136-
#### pnpm
137-
138-
```sh
139-
pnpm add @hey-api/openapi-ts -D
140-
```
141-
142-
#### yarn
143-
144-
```sh
145-
yarn add @hey-api/openapi-ts -D
146-
```
147-
148-
#### bun
149-
150-
```sh
151-
bun add @hey-api/openapi-ts -D
152-
```
153-
154-
We recommend pinning an exact version so you can safely upgrade when you're ready. This package is in [initial development](https://semver.org/spec/v0.1.0.html#spec-item-5) and its API might change before v1.
155-
156-
### CLI
157-
158-
Most people run `@hey-api/openapi-ts` via CLI. To do that, add a script to your `package.json` file which will make `openapi-ts` executable through script.
159-
160-
```json
161-
"scripts": {
162-
"openapi-ts": "openapi-ts"
163-
}
164-
```
165-
166-
The above script can be executed by running `npm run openapi-ts` or equivalent command in other package managers. Next, we need to create a [configuration](https://heyapi.dev/openapi-ts/configuration) file and move our options from Quick Start to it.
167-
168-
### Node.js
169-
170-
You can also generate clients programmatically by importing `@hey-api/openapi-ts` in a TypeScript file.
171-
172-
```ts
173-
import { createClient } from '@hey-api/openapi-ts';
174-
175-
createClient({
176-
input: 'https://get.heyapi.dev/hey-api/backend',
177-
output: 'src/client',
178-
});
179-
```
180-
181-
## Configuration
182-
183-
`@hey-api/openapi-ts` supports loading configuration from any file inside your project root folder supported by [jiti loader](https://github.com/unjs/c12?tab=readme-ov-file#-features). Below are the most common file formats.
184-
185-
#### `openapi-ts.config.ts`
186-
187-
```js
188-
import { defineConfig } from '@hey-api/openapi-ts';
189-
190-
export default defineConfig({
191-
input: 'https://get.heyapi.dev/hey-api/backend',
192-
output: 'src/client',
193-
});
194-
```
195-
196-
#### `openapi-ts.config.cjs`
197-
198-
```js
199-
/** @type {import('@hey-api/openapi-ts').UserConfig} */
200-
module.exports = {
201-
input: 'https://get.heyapi.dev/hey-api/backend',
202-
output: 'src/client',
203-
};
204-
```
205-
206-
#### `openapi-ts.config.mjs`
207-
208-
```js
209-
/** @type {import('@hey-api/openapi-ts').UserConfig} */
210-
export default {
211-
input: 'https://get.heyapi.dev/hey-api/backend',
212-
output: 'src/client',
213-
};
214-
```
215-
216-
Alternatively, you can use `openapi-ts.config.js` and configure the export statement depending on your project setup.
217-
218-
### Input
219-
220-
Input is the first thing you must define. It can be a path, URL, or a string content resolving to an OpenAPI specification. Hey API supports all valid OpenAPI versions and file formats.
221-
222-
> If you use an HTTPS URL with a self-signed certificate in development, you will need to set [`NODE_TLS_REJECT_UNAUTHORIZED=0`](https://github.com/hey-api/openapi-ts/issues/276#issuecomment-2043143501) in your environment.
223-
224-
### Output
225-
226-
Output is the next thing to define. It can be either a string pointing to the destination folder or a configuration object containing the destination folder path and optional settings (these are described below).
227-
228-
> You should treat the output folder as a dependency. Do not directly modify its contents as your changes might be erased when you run `@hey-api/openapi-ts` again.
229-
230-
### Client
231-
232-
Clients are responsible for sending the actual HTTP requests. Using clients is not required, but you must add a client to `plugins` if you're generating SDKs (enabled by default).
233-
234-
### Native Clients
235-
236-
- [`@hey-api/client-fetch`](https://heyapi.dev/openapi-ts/clients/fetch)
237-
- [`@hey-api/client-axios`](https://heyapi.dev/openapi-ts/clients/axios)
238-
- [`@hey-api/client-next`](https://heyapi.dev/openapi-ts/clients/next-js)
239-
- [`@hey-api/client-nuxt`](https://heyapi.dev/openapi-ts/clients/nuxt)
240-
241-
Don't see your client? [Build your own](https://heyapi.dev/openapi-ts/clients/custom) or let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).
242-
243-
## Plugins
244-
245-
Plugins are responsible for generating artifacts from your input. By default, Hey API will generate TypeScript interfaces and SDK from your OpenAPI specification. You can add, remove, or customize any of the plugins. In fact, we highly encourage you to do so!
246-
247-
### Native Plugins
248-
249-
These plugins help reduce boilerplate associated with third-party dependencies. Hey API natively supports the most popular packages. Please open an issue on [GitHub](https://github.com/hey-api/openapi-ts/issues) if you'd like us to support your favorite package.
250-
251-
- [`@hey-api/schemas`](https://heyapi.dev/openapi-ts/output/json-schema)
252-
- [`@hey-api/sdk`](https://heyapi.dev/openapi-ts/output/sdk)
253-
- [`@hey-api/transformers`](https://heyapi.dev/openapi-ts/transformers)
254-
- [`@hey-api/typescript`](https://heyapi.dev/openapi-ts/output/typescript)
255-
- [`@tanstack/angular-query-experimental`](https://heyapi.dev/openapi-ts/plugins/tanstack-query)
256-
- [`@tanstack/react-query`](https://heyapi.dev/openapi-ts/plugins/tanstack-query)
257-
- [`@tanstack/solid-query`](https://heyapi.dev/openapi-ts/plugins/tanstack-query)
258-
- [`@tanstack/svelte-query`](https://heyapi.dev/openapi-ts/plugins/tanstack-query)
259-
- [`@tanstack/vue-query`](https://heyapi.dev/openapi-ts/plugins/tanstack-query)
260-
- [`fastify`](https://heyapi.dev/openapi-ts/plugins/fastify)
261-
- [`valibot`](https://heyapi.dev/openapi-ts/plugins/valibot)
262-
- [`zod`](https://heyapi.dev/openapi-ts/plugins/zod)
263-
264-
### Planned Plugins
265-
266-
The following plugins are planned but not in development yet. You can help us prioritize them by voting on [GitHub](https://github.com/hey-api/openapi-ts/labels/RSVP%20%F0%9F%91%8D%F0%9F%91%8E).
267-
268-
- [Ajv](https://heyapi.dev/openapi-ts/plugins/ajv)
269-
- [Arktype](https://heyapi.dev/openapi-ts/plugins/arktype)
270-
- [Express](https://heyapi.dev/openapi-ts/plugins/express)
271-
- [Faker](https://heyapi.dev/openapi-ts/plugins/faker)
272-
- [Hono](https://heyapi.dev/openapi-ts/plugins/hono)
273-
- [Joi](https://heyapi.dev/openapi-ts/plugins/joi)
274-
- [Koa](https://heyapi.dev/openapi-ts/plugins/koa)
275-
- [MSW](https://heyapi.dev/openapi-ts/plugins/msw)
276-
- [Nest](https://heyapi.dev/openapi-ts/plugins/nest)
277-
- [Nock](https://heyapi.dev/openapi-ts/plugins/nock)
278-
- [Pinia Colada](https://heyapi.dev/openapi-ts/plugins/pinia-colada)
279-
- [Superstruct](https://heyapi.dev/openapi-ts/plugins/superstruct)
280-
- [Supertest](https://heyapi.dev/openapi-ts/plugins/supertest)
281-
- [SWR](https://heyapi.dev/openapi-ts/plugins/swr)
282-
- [TypeBox](https://heyapi.dev/openapi-ts/plugins/typebox)
283-
- [Yup](https://heyapi.dev/openapi-ts/plugins/yup)
284-
- [Zustand](https://heyapi.dev/openapi-ts/plugins/zustand)
285-
286-
Don't see your plugin? [Build your own](https://heyapi.dev/openapi-ts/plugins/custom) or let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).
287-
288-
## Migration Guides
289-
290-
[OpenAPI Typescript Codegen](https://heyapi.dev/openapi-ts/migrating#openapi-typescript-codegen)
291-
292-
## License
293-
294-
Released under the [MIT License](https://github.com/hey-api/openapi-ts/blob/main/LICENSE.md).
1+
packages/openapi-ts/README.md

docs/.vitepress/theme/custom.css

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ h3#demo + button {
131131
.sponsors-list > ul {
132132
display: flex;
133133
flex-direction: column;
134-
row-gap: 2rem;
135-
column-gap: 3rem;
136134
padding: 0;
137135
}
138136

@@ -183,15 +181,30 @@ h3#demo + button {
183181
line-height: 100%;
184182
}
185183

186-
.sponsors-list .gold li {
184+
.sponsors-list > ul.gold {
185+
row-gap: 2rem;
186+
column-gap: 3rem;
187+
}
188+
189+
.sponsors-list > ul.gold li {
187190
max-width: 240px;
188191
}
189192

190-
.sponsors-list .silver li {
193+
.sponsors-list > ul.silver {
194+
row-gap: 2rem;
195+
column-gap: 3rem;
196+
}
197+
198+
.sponsors-list > ul.silver li {
191199
max-width: 180px;
192200
}
193201

194-
.sponsors-list .bronze li {
202+
.sponsors-list > ul.bronze {
203+
row-gap: 2rem;
204+
column-gap: 1rem;
205+
}
206+
207+
.sponsors-list > ul.bronze li {
195208
max-width: 100px;
196209
}
197210

docs/public/cella-logo-wordmark.png

56.7 KB
Loading
8.09 KB
Loading
Binary file not shown.
6.92 KB
Loading
7.94 KB
Binary file not shown.
12.6 KB
Binary file not shown.

docs/scripts/optimize-images.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,23 @@ const images = [
3030
],
3131
source: 'logo.png',
3232
},
33+
{
34+
sizes: [
35+
{
36+
formats: ['jpeg', 'webp'],
37+
width: 480,
38+
},
39+
{
40+
formats: ['webp'],
41+
width: 768,
42+
},
43+
{
44+
formats: ['png', 'webp'],
45+
width: 1200,
46+
},
47+
],
48+
source: 'cella-logo-wordmark.png',
49+
},
3350
{
3451
sizes: [
3552
{

docs/sponsors-list.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,14 @@
5050
</picture>
5151
</a>
5252
</li>
53+
<li>
54+
<a href="https://kutt.it/KkqSaw" style="height: 20px;" target="_blank">
55+
<picture>
56+
<source srcset="/images/cella-logo-wordmark-480w.webp" media="(max-width: 480px)" type="image/webp" />
57+
<source srcset="/images/cella-logo-wordmark-768w.webp" media="(max-width: 768px)" type="image/webp" />
58+
<source srcset="/images/cella-logo-wordmark-1200w.webp" media="(min-width: 769px)" type="image/webp" />
59+
<img alt="Cella logo" loading="lazy" src="/images/cella-logo-wordmark-1200w.png" />
60+
</picture>
61+
</a>
62+
</li>
5363
</ul>

0 commit comments

Comments
 (0)