Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/blog/elysia-02.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Introducing a new field, `schema.detail`, for customizing details for the route,

<img width="1624" alt="Screenshot 2566-01-23 at 13 54 11" src="https://user-images.githubusercontent.com/35027979/213981321-5717e514-aa4b-492a-b45a-9e69099dc8a8.png">

This allows you to write better documentation and have a fully editable Swagger as you want:
This allows you to write better documentation and have a fully editable OpenAPI as you want:
<img width="1624" alt="Screenshot 2566-01-23 at 13 23 41" src="https://user-images.githubusercontent.com/35027979/213981545-46efc6cc-34bc-4db2-86ed-530d27d7ba97.png">

## Union Type
Expand Down Expand Up @@ -150,7 +150,7 @@ app

Elysia will try to validate all schemas in `response`, allowing one of the types to be returned.

Return types are also supported and reported in Swagger's response.
Return types are also supported and reported in OpenAPI's response.

## Faster Type Inference
As Elysia 0.1 explored the possibility of using type inference to improve Developer Experience, we found that sometimes it took a long time to update type inference because of heavy type inference and inefficient custom generics.
Expand Down
4 changes: 2 additions & 2 deletions docs/blog/elysia-03.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Elysia 0.3 also features `schema.contentType` to explicitly validate incoming re
## OpenAPI Schema 3.0.x
With Elysia 0.3, Elysia now uses OpenAPI schema 3.0.x by default for better stating API definitions, and better support for multiple types based on content-type.

`schema.details` are now updated to OpenAPI 3.0.x, and Elysia also updates the Swagger plugin to match the OpenAPI 3.0.x to take advantage of new features in OpenAPI 3 and Swagger, especially with file uploading.
`schema.details` are now updated to OpenAPI 3.0.x, and Elysia also updates the Swagger plugin to match the OpenAPI 3.0.x to take advantage of new features in OpenAPI 3.0.x and 2.0, especially with file uploading.

## Eden Rework
To support more demand for Elysia, supporting Elysia Fn, Rest all together, Eden has been reworked to scale with the new architecture.
Expand Down Expand Up @@ -154,7 +154,7 @@ Fix:
- Missing merged return type for `.ws`
- Missing nanoid
- context side-effects
- `t.Files` in swagger is referring to single file
- `t.Files` in OpenAPI is referring to single file
- Eden response type is unknown
- Unable to type `setModel` inference definition via Eden
- Handle error thrown in non permission function
Expand Down
2 changes: 1 addition & 1 deletion docs/blog/elysia-04.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ For migration, besides a breaking change of installing `@elysiajs/fn` explicitly
## Conditional Route
This release introduces `.if` method for registering a conditional route or plugin.

This allows you to declaratively for a specific conditional, for example excluding Swagger documentation from the production environment.
This allows you to declaratively for a specific conditional, for example excluding OpenAPI documentation from the production environment.
```ts
const isProduction = process.env.NODE_ENV === 'production'

Expand Down
2 changes: 1 addition & 1 deletion docs/blog/elysia-supabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ console.log(

Tada 🎉 We got well-defined documentation for our API.

<img class="-png" src="/blog/elysia-supabase/elysia-swagger.webp" alt="Swagger documentation generated by Elysia" />
<img class="-png" src="/blog/elysia-supabase/elysia-swagger.webp" alt="OpenAPI documentation generated by Elysia" />

And if anything more, you don't have to worry that you might forget a specification of OpenAPI Schema 3.0, we have auto-completion and type-safety too.

Expand Down
2 changes: 1 addition & 1 deletion docs/blog/with-prisma.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ This works as same as using an inline but instead you defined it once and refers
TypeScript and validation code will works as expected.

## Bonus: Documentation
As a bonus, Elysia type system is also OpenAPI Schema 3.0 compliance, which means that it can generate documentation with tools that support OpenAPI Schema like Swagger.
As a bonus, Elysia type system is also OpenAPI Schema 3.0 compliance, which means that it can generate documentation with tools that support OpenAPI Schema like Swagger UI or the newer Scalar UI.

We can use Elysia Swagger plugin to generate an API documentation in a single line.

Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ head:

- - meta
- name: 'description'
content: Elysia is an ergonomic framework for Humans. With end-to-end type safety and great developer experience. Elysia is familiar, fast, and has first-class TypeScript support with well-thought integration between services whether it's tRPC, Swagger or WebSocket. Elysia has got you covered, start building next generation TypeScript web servers today.
content: Elysia is an ergonomic framework for Humans. With end-to-end type safety and great developer experience. Elysia is familiar, fast, and has first-class TypeScript support with well-thought integration between services whether it's tRPC, OpenAPI or WebSocket. Elysia has got you covered, start building next generation TypeScript web servers today.

- - meta
- property: 'og:description'
content: Elysia is an ergonomic framework for Humans. With end-to-end type safety and great developer experience. Elysia is familiar, fast, and has first-class TypeScript support with well-thought integration between services whether it's tRPC, Swagger or WebSocket. Elysia has got you covered, start building next generation TypeScript web servers today.
content: Elysia is an ergonomic framework for Humans. With end-to-end type safety and great developer experience. Elysia is familiar, fast, and has first-class TypeScript support with well-thought integration between services whether it's tRPC, OpenAPI or WebSocket. Elysia has got you covered, start building next generation TypeScript web servers today.
---

<script setup>
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,6 @@ The endpoint to expose OpenAPI specification in JSON format

## swagger

Swagger config, refers to [Swagger config](https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/)
Swagger UI config, refers to [Swagger UI config](https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/)

Below you can find common patterns to use the plugin.
4 changes: 2 additions & 2 deletions docs/plugins/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ This is to ensure developers end up with a performant web server they intend to

Here are some of the official plugins maintained by the Elysia team:

- [Bearer](/plugins/bearer) - retrieve [Bearer](https://swagger.io/docs/specification/authentication/bearer-authentication/) token automatically
- [Bearer](/plugins/bearer) - retrieve [Bearer](https://learn.openapis.org/specification/security.html#http-authentication) token automatically
- [CORS](/plugins/cors) - set up [Cross-origin resource sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
- [Cron](/plugins/cron) - set up [cron](https://en.wikipedia.org/wiki/Cron) job
- [Eden](/eden/overview) - end-to-end type safety client for Elysia
- [GraphQL Apollo](/plugins/graphql-apollo) - run [Apollo GraphQL](https://www.apollographql.com/) on Elysia
- [GraphQL Yoga](/plugins/graphql-yoga) - run [GraphQL Yoga](https://github.com/dotansimha/graphql-yoga) on Elysia
- [HTML](/plugins/html) - handle HTML responses
- [JWT](/plugins/jwt) - authenticate with [JWTs](https://jwt.io/)
- [OpenAPI](/plugins/openapi) - generate an [OpenAPI](https://swagger.io/specification/) documentation
- [OpenAPI](/plugins/openapi) - generate an [OpenAPI](https://spec.openapis.org/oas/) documentation
- [OpenTelemetry](/plugins/opentelemetry) - add support for OpenTelemetry
- [Server Timing](/plugins/server-timing) - audit performance bottlenecks with the [Server-Timing API](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)
- [Static](/plugins/static) - serve static files/folders
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins/swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Please refer to the [Scalar config](https://github.com/scalar/scalar/blob/main/d

Configuration for customizing Swagger.

Please refer to the [Swagger specification](https://swagger.io/specification/v2/).
Please refer to the [Swagger specification](https://spec.openapis.org/oas/v2.0.html).

### excludeStaticFile

Expand Down