Skip to content

Commit

Permalink
Merge pull request #1490 from hey-api/docs/sections
Browse files Browse the repository at this point in the history
docs: update sections
  • Loading branch information
mrlubos authored Dec 20, 2024
2 parents d459279 + ff91c4c commit c48c446
Show file tree
Hide file tree
Showing 36 changed files with 707 additions and 197 deletions.
123 changes: 109 additions & 14 deletions docs/.vitepress/config/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ export default defineConfig({
link: '/openapi-ts/output',
text: 'Output',
},
{
collapsed: true,
items: [
{
link: '/openapi-ts/custom-plugin',
text: 'Custom Plugin',
},
],
link: '/openapi-ts/plugins',
text: 'Plugins',
},
{
collapsed: true,
items: [
Expand All @@ -57,9 +68,37 @@ export default defineConfig({
collapsed: true,
items: [
{
link: '/openapi-ts/validators/zod',
link: '/openapi-ts/plugins/zod',
text: 'Zod',
},
{
link: '/openapi-ts/plugins/ajv',
text: 'Ajv <span data-soon>soon</soon>',
},
{
link: '/openapi-ts/plugins/arktype',
text: 'Arktype <span data-soon>soon</soon>',
},
{
link: '/openapi-ts/plugins/joi',
text: 'Joi <span data-soon>soon</soon>',
},
{
link: '/openapi-ts/plugins/superstruct',
text: 'Superstruct <span data-soon>soon</soon>',
},
{
link: '/openapi-ts/plugins/typebox',
text: 'TypeBox <span data-soon>soon</soon>',
},
{
link: '/openapi-ts/plugins/valibot',
text: 'Valibot <span data-soon>soon</soon>',
},
{
link: '/openapi-ts/plugins/yup',
text: 'Yup <span data-soon>soon</soon>',
},
],
link: '/openapi-ts/validators',
text: 'Validators',
Expand All @@ -68,31 +107,87 @@ export default defineConfig({
link: '/openapi-ts/transformers',
text: 'Transformers',
},
],
text: 'Guides and Concepts',
},
{
items: [
{
link: '/openapi-ts/plugins',
text: 'Introduction',
collapsed: true,
items: [
{
link: '/openapi-ts/plugins/tanstack-query',
text: 'TanStack Query',
},
{
link: '/openapi-ts/plugins/pinia-colada',
text: 'Pinia Colada <span data-soon>soon</soon>',
},
{
link: '/openapi-ts/plugins/swr',
text: 'SWR <span data-soon>soon</soon>',
},
{
link: '/openapi-ts/plugins/zustand',
text: 'Zustand <span data-soon>soon</soon>',
},
],
link: '/openapi-ts/state-management',
text: 'State Management',
},
{
link: '/openapi-ts/fastify',
text: 'Fastify',
collapsed: true,
items: [
{
link: '/openapi-ts/plugins/faker',
text: 'Faker <span data-soon>soon</soon>',
},
{
link: '/openapi-ts/plugins/msw',
text: 'MSW <span data-soon>soon</soon>',
},
{
link: '/openapi-ts/plugins/nock',
text: 'Nock <span data-soon>soon</soon>',
},
{
link: '/openapi-ts/plugins/supertest',
text: 'Supertest <span data-soon>soon</soon>',
},
],
link: '/openapi-ts/mocks',
text: 'Mocks',
},
{
link: '/openapi-ts/tanstack-query',
text: 'TanStack Query',
collapsed: true,
items: [
{
link: '/openapi-ts/plugins/fastify',
text: 'Fastify',
},
{
link: '/openapi-ts/plugins/express',
text: 'Express <span data-soon>soon</soon>',
},
{
link: '/openapi-ts/plugins/hono',
text: 'Hono <span data-soon>soon</soon>',
},
{
link: '/openapi-ts/plugins/koa',
text: 'Koa <span data-soon>soon</soon>',
},
{
link: '/openapi-ts/plugins/nest',
text: 'Nest <span data-soon>soon</soon>',
},
],
link: '/openapi-ts/web-frameworks',
text: 'Web Frameworks',
},
],
text: 'Plugins',
text: 'Guides and Concepts',
},
{
items: [
{
link: '/openapi-ts/integrations',
text: 'GitHub <span class="soon">soon</span>',
text: 'GitHub <span data-soon>soon</span>',
},
],
text: 'Integrations',
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ html.dark {
--vp-home-hero-image-filter: blur(144px);
}

.soon {
[data-soon] {
background-color: var(--vp-button-brand-bg);
border-radius: 1em;
color: var(--vp-button-brand-text);
Expand Down
10 changes: 2 additions & 8 deletions docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,9 @@ const hallOfFame = [

# About

Hey API's objective is to provide a suite of TypeScript tools to manage API interactions. Whether you're building a front-end application, API-to-API service, or micro-frontends, we want Hey API to be your go-to resource.
Hey API is building a suite of TypeScript tools to manage API interactions. Whether you're building a web app, mobile app, or API server, we want to be part of your stack.

Typically, developers of such applications want to:

- use TypeScript interfaces to model data for their APIs
- send and fetch this data from server in a type-safe way
- build further abstractions on top of this data

Doing any of these steps manually quickly becomes a huge time sink as your project grows and APIs evolve. Ideally, you want to spend most time on your application. Hey API allows you to do just that.
We aim to do this by offering quality code abstractions necessary to perform type-safe HTTP requests. Attempting to manage this manually quickly becomes a huge time sink as your project grows and APIs evolve. Ideally, you want to spend most time on your application. Hey API allows you to do just that.

We're constantly learning about the ways in which you use our tools. If you have any feedback, please [email us](mailto:[email protected]), [open an issue](https://github.com/hey-api/openapi-ts/issues), or [join a discussion](https://github.com/orgs/hey-api/discussions).

Expand Down
10 changes: 9 additions & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ Your [pull request](https://help.github.com/articles/using-pull-requests) must:
- use clear commit messages
- be possible to merge automatically

<!--@include: ./sponsorship.md-->
## Sponsors

You can also contribute by becoming our [sponsor](https://github.com/sponsors/hey-api).

<div class="sponsors-list">

<!--@include: ./sponsors-list.md-->

</div>
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ features:
link: /openapi-ts/plugins
linkText: Learn more
- icon: <svg class="icon-github" width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 98 98"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#24292f"/></svg>
title: Integrations <span class="soon">Soon</span>
title: Integrations <span data-soon>Soon</span>
details: Automatically update your code when the APIs it depends on change. Works with any codegen.
link: /openapi-ts/integrations
linkText: Find out more
Expand Down
8 changes: 5 additions & 3 deletions docs/openapi-ts/clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ We all send HTTP requests in a slightly different way. Hey API doesn't force you
- minimal learning curve thanks to extending the underlying technology
- support bundling inside the generated output

## Available Clients
## Options

Hey API natively supports the following clients.

- [Fetch API](/openapi-ts/clients/fetch)
- [Axios](/openapi-ts/clients/axios)
- [Legacy](/openapi-ts/clients/legacy)
- [Next.js](https://nextjs.org/) <span class="soon">Soon</span>
- [Next.js](https://nextjs.org/) <span data-soon>Soon</span>

If you'd like Hey API to support your client, let us know by [opening an issue](https://github.com/hey-api/openapi-ts/issues).
Don't see your client? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).

<!--@include: ../examples.md-->
<!--@include: ../sponsorship.md-->
4 changes: 2 additions & 2 deletions docs/openapi-ts/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ You can learn more on the [Output](/openapi-ts/output) page.

## Parser

If you're using OpenAPI 3.0 or newer, we encourage you to try out the experimental parser. In the future it will become the default parser, but until it's been tested it's an opt-in feature. To try it out, set the `experimentalParser` flag in your configuration to `true`.
If you're using OpenAPI 3.0 or newer, we encourage you to try out the experimental parser. In the future this will become the default parser, but until it's been tested it's an opt-in feature. To try it out, set the `experimentalParser` flag in your configuration to `true`.

::: code-group

Expand All @@ -212,7 +212,7 @@ npx @hey-api/openapi-ts -i path/to/openapi.json -o src/client -c @hey-api/client

:::

The experimental parser produces a cleaner output while being faster than the legacy parser. It also supports features such as [Filters](#filters) and more will be added in the future.
The experimental parser produces a cleaner output while being faster than the legacy parser. It also supports features such as [Filters](#filters) and more are being added.

The legacy parser will be used with the [legacy clients](/openapi-ts/clients/legacy) regardless of the `experimentalParser` flag value. However, it's unlikely to receive any further updates.

Expand Down
Loading

0 comments on commit c48c446

Please sign in to comment.