Skip to content

Commit ff76091

Browse files
committed
docs: add Effect and AdonisJS
1 parent 1c32240 commit ff76091

File tree

9 files changed

+50
-17
lines changed

9 files changed

+50
-17
lines changed

docs/.vitepress/config/en.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ export default defineConfig({
106106
link: '/openapi-ts/clients/nuxt',
107107
text: 'Nuxt',
108108
},
109+
{
110+
link: '/openapi-ts/clients/effect',
111+
text: 'Effect <span data-soon>soon</span>',
112+
},
109113
{
110114
link: '/openapi-ts/clients/custom',
111115
text: 'Custom Client',
@@ -214,6 +218,10 @@ export default defineConfig({
214218
link: '/openapi-ts/plugins/fastify',
215219
text: 'Fastify',
216220
},
221+
{
222+
link: '/openapi-ts/plugins/adonis',
223+
text: 'Adonis <span data-soon>soon</span>',
224+
},
217225
{
218226
link: '/openapi-ts/plugins/express',
219227
text: 'Express <span data-soon>soon</span>',

docs/openapi-ts/clients.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Hey API natively supports the following clients.
2929
- [Axios](/openapi-ts/clients/axios)
3030
- [Next.js](/openapi-ts/clients/next-js)
3131
- [Nuxt](/openapi-ts/clients/nuxt)
32+
- [Effect](/openapi-ts/clients/effect) <span data-soon>Soon</span>
3233
- [Legacy](/openapi-ts/clients/legacy)
3334

3435
Don't see your client? [Build your own](/openapi-ts/clients/custom) or let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues).

docs/openapi-ts/clients/effect.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Effect client
3+
description: Effect client for Hey API. Compatible with all our features.
4+
---
5+
6+
# Effect <span data-soon>soon</span>
7+
8+
<FeatureStatus issueNumber=2082 name="Effect" />
9+
10+
### About
11+
12+
[Effect](https://effect.website/) is a powerful TypeScript library designed to help developers easily create complex, synchronous, and asynchronous programs.
13+
14+
<!--@include: ../../partials/sponsors.md-->

docs/openapi-ts/plugins.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ These plugins help reduce boilerplate associated with third-party dependencies.
3333

3434
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).
3535

36+
- [Adonis](/openapi-ts/plugins/adonis) <span data-soon>Soon</span>
3637
- [Ajv](/openapi-ts/plugins/ajv) <span data-soon>Soon</span>
3738
- [Arktype](/openapi-ts/plugins/arktype) <span data-soon>Soon</span>
3839
- [Express](/openapi-ts/plugins/express) <span data-soon>Soon</span>

docs/openapi-ts/plugins/adonis.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: AdonisJS
3+
description: AdonisJS plugin for Hey API. Compatible with all our features.
4+
---
5+
6+
# AdonisJS <span data-soon>soon</span>
7+
8+
<FeatureStatus issueNumber=2364 name="AdonisJS" />
9+
10+
### About
11+
12+
[AdonisJS](https://adonisjs.com) is a TypeScript-first web framework for building web apps and API servers. It comes with support for testing, modern tooling, an ecosystem of official packages, and more.
13+
14+
<!--@include: ../../partials/sponsors.md-->

docs/openapi-ts/web-frameworks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ There are two approaches to developing APIs: code-first, where you start with th
1212
Hey API natively supports the following frameworks.
1313

1414
- [Fastify](/openapi-ts/plugins/fastify)
15+
- [Adonis](/openapi-ts/plugins/adonis) <span data-soon>Soon</span>
1516
- [Express](/openapi-ts/plugins/express) <span data-soon>Soon</span>
1617
- [Hono](/openapi-ts/plugins/hono) <span data-soon>Soon</span>
1718
- [Koa](/openapi-ts/plugins/koa) <span data-soon>Soon</span>

packages/openapi-ts/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,12 @@ Clients are responsible for sending the actual HTTP requests. Using clients is n
275275
- [`@hey-api/client-next`](https://heyapi.dev/openapi-ts/clients/next-js)
276276
- [`@hey-api/client-nuxt`](https://heyapi.dev/openapi-ts/clients/nuxt)
277277

278+
### Planned Clients
279+
280+
The following clients 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).
281+
282+
- [`@hey-api/client-effect`](https://heyapi.dev/openapi-ts/clients/effect)
283+
278284
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).
279285

280286
### Native Plugins
@@ -298,6 +304,7 @@ These plugins help reduce boilerplate associated with third-party dependencies.
298304

299305
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).
300306

307+
- [Adonis](https://heyapi.dev/openapi-ts/plugins/adonis)
301308
- [Ajv](https://heyapi.dev/openapi-ts/plugins/ajv)
302309
- [Arktype](https://heyapi.dev/openapi-ts/plugins/arktype)
303310
- [Express](https://heyapi.dev/openapi-ts/plugins/express)

packages/openapi-ts/src/tsc/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ export const tsc = {
5858
returnVariable: _return.createReturnVariable,
5959
safeAccessExpression: transform.createSafeAccessExpression,
6060
stringLiteral: types.createStringLiteral,
61-
stringToTsNodes: utils.stringToTsNodes,
6261
templateLiteralType: types.createTemplateLiteralType,
6362
this: utils.createThis,
6463
transformArrayMap: transform.createArrayMapTransform,

packages/openapi-ts/src/tsc/utils.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const printer = ts.createPrinter({
1919
removeComments: false,
2020
});
2121

22-
export const createSourceFile = (sourceText: string) =>
22+
export const createSourceFile = (sourceText: string): ts.SourceFile =>
2323
ts.createSourceFile(
2424
'',
2525
sourceText,
@@ -72,22 +72,10 @@ export function tsNodeToString({
7272
}
7373
}
7474

75-
/**
76-
* Convert a string to a TypeScript Node
77-
* @param value the string to convert.
78-
* @returns ts.Node
79-
*/
80-
export function stringToTsNodes(value: string): ts.Node {
81-
const file = createSourceFile(value);
82-
return file.statements[0]!;
83-
}
84-
85-
export const createIdentifier = ({ text }: { text: string }) => {
86-
const identifier = ts.factory.createIdentifier(text);
87-
return identifier;
88-
};
75+
export const createIdentifier = ({ text }: { text: string }): ts.Identifier =>
76+
ts.factory.createIdentifier(text);
8977

90-
export const createThis = () => ts.factory.createThis();
78+
export const createThis = (): ts.ThisExpression => ts.factory.createThis();
9179

9280
type Modifier = AccessLevel | 'async' | 'export' | 'readonly' | 'static';
9381

0 commit comments

Comments
 (0)