Skip to content

Commit a5d9bb0

Browse files
committed
docs: simplify navigation
1 parent 65d16b3 commit a5d9bb0

File tree

21 files changed

+141
-133
lines changed

21 files changed

+141
-133
lines changed

.changeset/brown-paws-design.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22
'@hey-api/openapi-ts': minor
33
---
44

5-
feat: add symbol api
5+
feat: Symbol API
6+
7+
### Symbol API
8+
9+
This release adds the Symbol API, which significantly reduces the risk of naming collisions. While the generated output should only include formatting changes, this feature introduces breaking changes to the Plugin API that affect custom plugins.
10+
11+
We will update the [custom plugin guide](https://heyapi.dev/openapi-ts/plugins/custom) once the Plugin API becomes more stable.

.changeset/cuddly-bears-deny.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
'@hey-api/codegen-core': minor
33
---
44

5-
feat: expand symbol api
5+
feat: expand Symbol API

.changeset/thirty-shoes-end.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
'@hey-api/openapi-ts': minor
33
---
44

5-
feat(pinia-colada): remove groupByTag option
5+
feat(pinia-colada): remove `groupByTag` option
6+
7+
### Removed `groupByTag` Pinia Colada option
8+
9+
This option has been removed to provide a more consistent API across plugins. We plan to bring it back in a future release.

docs/.vitepress/config/en.ts

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ export default defineConfig({
4848
link: '/openapi-ts/configuration',
4949
text: 'Configuration',
5050
},
51+
{
52+
link: '/openapi-ts/output',
53+
text: 'Output',
54+
},
5155
],
5256
text: 'Introduction',
5357
},
@@ -57,35 +61,24 @@ export default defineConfig({
5761
collapsed: true,
5862
items: [
5963
{
60-
link: '/openapi-ts/output/typescript',
64+
link: '/openapi-ts/plugins/typescript',
6165
text: 'TypeScript',
6266
},
6367
{
64-
link: '/openapi-ts/output/sdk',
68+
link: '/openapi-ts/plugins/sdk',
6569
text: 'SDK',
6670
},
6771
{
68-
link: '/openapi-ts/output/client',
69-
text: 'Client',
70-
},
71-
{
72-
link: '/openapi-ts/output/json-schema',
73-
text: 'JSON Schema',
72+
link: '/openapi-ts/plugins/transformers',
73+
text: 'Transformers',
7474
},
75-
],
76-
link: '/openapi-ts/output',
77-
text: 'Output',
78-
},
79-
{
80-
collapsed: true,
81-
items: [
8275
{
83-
link: '/openapi-ts/plugins/custom',
84-
text: 'Custom Plugin',
76+
link: '/openapi-ts/plugins/schemas',
77+
text: 'Schemas',
8578
},
8679
],
87-
link: '/openapi-ts/plugins',
88-
text: 'Plugins',
80+
link: '/openapi-ts/core',
81+
text: 'Core',
8982
},
9083
{
9184
collapsed: true,
@@ -114,10 +107,6 @@ export default defineConfig({
114107
link: '/openapi-ts/clients/effect',
115108
text: 'Effect <span data-soon>soon</span>',
116109
},
117-
{
118-
link: '/openapi-ts/clients/custom',
119-
text: 'Custom Client',
120-
},
121110
{
122111
link: '/openapi-ts/clients/legacy',
123112
text: 'Legacy',
@@ -165,10 +154,6 @@ export default defineConfig({
165154
link: '/openapi-ts/validators',
166155
text: 'Validators',
167156
},
168-
{
169-
link: '/openapi-ts/transformers',
170-
text: 'Transformers',
171-
},
172157
{
173158
collapsed: true,
174159
items: [
@@ -258,6 +243,20 @@ export default defineConfig({
258243
link: '/openapi-ts/web-frameworks',
259244
text: 'Web Frameworks',
260245
},
246+
{
247+
collapsed: true,
248+
items: [
249+
{
250+
link: '/openapi-ts/plugins/custom',
251+
text: 'Plugin',
252+
},
253+
{
254+
link: '/openapi-ts/clients/custom',
255+
text: 'Client',
256+
},
257+
],
258+
text: 'Custom',
259+
},
261260
],
262261
text: 'Guides and Concepts',
263262
},

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: home
33

44
hero:
55
name: One OpenAPI spec.<br/>Infinite outputs.
6-
tagline: Codegen for JavaScript/TypeScript projects. Trusted over 2,000,000 times each month to generate reliable API clients and SDKs.
6+
tagline: Codegen for JavaScript/TypeScript projects. Trusted over 2,500,000 times each month to generate reliable API clients and SDKs.
77
actions:
88
- link: /openapi-ts/get-started
99
text: Get Started

docs/openapi-ts/core.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: Core Plugins
3+
description: Learn about the core plugins provided by Hey API.
4+
---
5+
6+
# Core
7+
8+
Apart from being responsible for the default output, core plugins are the foundation for other plugins. Instead of creating their own primitives, other plugins can reuse the artifacts from core plugins. This results in a smaller output size and a better user experience.
9+
10+
## Options
11+
12+
Hey API provides the following core plugins.
13+
14+
- [TypeScript](/openapi-ts/plugins/typescript)
15+
- [SDK](/openapi-ts/plugins/sdk)
16+
- [Transformers](/openapi-ts/plugins/transformers)
17+
- [Schemas](/openapi-ts/plugins/schemas)
18+
19+
Need another core plugin? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).
20+
21+
<!--@include: ../partials/examples.md-->
22+
<!--@include: ../partials/sponsors.md-->

docs/openapi-ts/get-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { embedProject } from '../embed'
99

1010
# Get Started
1111

12-
[@hey-api/openapi-ts](https://github.com/hey-api/openapi-ts) is an OpenAPI to TypeScript codegen trusted over 2,000,000 times each month to generate reliable API clients and SDKs. The code is [MIT-licensed](/openapi-ts/license) and free to use. Discover available features below or view our [roadmap](https://github.com/orgs/hey-api/discussions/1495) to learn what's coming next.
12+
[@hey-api/openapi-ts](https://github.com/hey-api/openapi-ts) is an OpenAPI to TypeScript codegen trusted over 2,500,000 times each month to generate reliable API clients and SDKs. The code is [MIT-licensed](/openapi-ts/license) and free to use. Discover available features below or view our [roadmap](https://github.com/orgs/hey-api/discussions/1495) to learn what's coming next.
1313

1414
### Demo
1515

docs/openapi-ts/migrating.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,21 @@ description: Migrating to @hey-api/openapi-ts.
77

88
While we try to avoid breaking changes, sometimes it's unavoidable in order to offer you the latest features. This page lists changes that require updates to your code. If you run into a problem with migration, please [open an issue](https://github.com/hey-api/openapi-ts/issues).
99

10+
## v0.83.0
11+
12+
### Symbol API
13+
14+
This release adds the Symbol API, which significantly reduces the risk of naming collisions. While the generated output should only include formatting changes, this feature introduces breaking changes to the Plugin API that affect custom plugins.
15+
16+
We will update the [custom plugin guide](/openapi-ts/plugins/custom) once the Plugin API becomes more stable.
17+
18+
### Removed `groupByTag` Pinia Colada option
19+
20+
This option has been removed to provide a more consistent API across plugins. We plan to bring it back in a future release.
21+
1022
## v0.82.0
1123

12-
### Added Hooks API
24+
### Hooks API
1325

1426
This release adds the [Hooks API](/openapi-ts/configuration/parser#hooks), giving you granular control over which operations generate queries and mutations. As a result, we tightened the previous behavior and POST operations no longer generate queries by default. To preserve the old behavior, add a custom matcher.
1527

docs/openapi-ts/output.md

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ description: Learn about files generated with @hey-api/openapi-ts.
55

66
# Output
77

8-
Learn about files generated with `@hey-api/openapi-ts`.
9-
10-
::: tip
11-
Your actual output depends on your Hey API configuration. It may contain a different number of files and their contents might differ.
12-
:::
8+
Every generated file in your output folder is created by a plugin. This page describes the default output, but similar logic applies to all plugins.
139

1410
## Overview
1511

@@ -30,13 +26,41 @@ my-app/
3026
└── package.json
3127
```
3228

33-
Each file is an artifact generated by a Hey API plugin. This is the default output, we will cover customizing it in this section. These files also form the base for third-party plugins.
29+
Your actual output depends on your Hey API configuration. It may contain a different number of files and their contents might differ.
3430

3531
Let's go through each file in the `src/client` folder and explain what it looks like, what it does, and how to use it.
3632

37-
## Index
33+
## Client
34+
35+
`client.gen.ts` is generated by [client plugins](/openapi-ts/clients). If you choose to generate SDKs (enabled by default), we use the Fetch client unless specified otherwise.
36+
37+
::: code-group
38+
39+
```ts [client.gen.ts]
40+
import { createClient, createConfig } from './client';
41+
42+
export const client = createClient(createConfig());
43+
```
44+
45+
:::
46+
47+
The contents of this file are consumed by SDKs, but you can also import `client` in your application to perform additional configuration or send manual requests.
48+
49+
### Bundle
50+
51+
Client plugins provide their bundles inside `client` and `core` folders. The contents of these folders don't depend on the provided input. Everything inside these folders serves as a scaffolding so the generated code can make HTTP requests.
52+
53+
## TypeScript
54+
55+
You can learn more on the [TypeScript](/openapi-ts/plugins/typescript) page.
56+
57+
## SDK
58+
59+
You can learn more on the [SDK](/openapi-ts/plugins/sdk) page.
60+
61+
## Barrel File
3862

39-
`index.ts` is the only file not generated by a specific plugin. It's meant for convenience and by default, it re-exports every artifact generated by default plugins (TypeScript and SDK).
63+
`index.ts` is not generated by any specific plugin. It's meant for convenience and by default, it re-exports every artifact generated by default plugins (TypeScript and SDK).
4064

4165
::: code-group
4266

docs/openapi-ts/output/client.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)