|
6 | 6 | </h1> |
7 | 7 | <a href="https://npmjs.com/package/@bedtime-coders/elysia-openapi"> |
8 | 8 | <img src="https://img.shields.io/npm/v/@bedtime-coders/elysia-openapi.svg?style=flat-square" alt="npm version" /> |
9 | | - </a> |
10 | | - <a href="https://bundlephobia.com/package/@bedtime-coders/elysia-openapi"> |
| 9 | + </a><a href="https://bundlephobia.com/package/@bedtime-coders/elysia-openapi"> |
11 | 10 | <img src="https://img.shields.io/bundlephobia/minzip/@bedtime-coders/elysia-openapi.svg?style=flat-square" alt="bundlephobia" /> |
12 | | - </a> |
13 | | - <a href="https://elysiajs.com/"> |
| 11 | + </a><a href="https://elysiajs.com/"> |
14 | 12 | <img src="https://img.shields.io/badge/%F0%9F%A6%8A-f6f8fa?label=elysia&color=blue" alt="elysia" /> |
15 | 13 | </a> |
16 | 14 | </div> |
17 | 15 |
|
18 | 16 | Use this plugin to effortlessly expose a beautiful [OpenAPI](https://github.com/OAI/OpenAPI-Specification) reference page from your ElysiaJS application with zero configuration. Just add the plugin to your Elysia app and you're good to go! |
19 | 17 |
|
20 | | -👉 **Why use this over `@elysiajs/swagger`?** This is a fork of `@elysiajs/swagger` with updated dependencies and [a few other opinionated changes](#changes-from-elysiajs-swagger). If [@elysiajs/swagger](https://github.com/elysiajs/elysia-swagger) suits your needs (and you don't need the latest version of [Scalar API Reference](https://github.com/scalar/scalar/tree/main/packages/api-reference)), then by all means, use that instead. |
| 18 | +👉 **Why use this over `@elysiajs/swagger`?** This is a fork of `@elysiajs/swagger` with updated dependencies and [a few opinionated changes](#changes-from-elysiajs-swagger). If [@elysiajs/swagger](https://github.com/elysiajs/elysia-swagger) suits your needs (and you don't need the latest version of [Scalar API Reference](https://github.com/scalar/scalar/tree/main/packages/api-reference)), then by all means, use that instead. |
21 | 19 |
|
22 | 20 | ## Add it to your Elysia app |
23 | 21 | ```bash |
@@ -65,11 +63,13 @@ Visit `http://localhost:8080/docs` to see the generated OpenAPI reference page |
65 | 63 |
|
66 | 64 | ## Changes from `@elysiajs/swagger` |
67 | 65 |
|
68 | | -- Update dependencies to the latest versions (at the time of writing), including [Scalar API Reference](https://github.com/scalar/scalar) |
69 | | -- Fix code to support the latest version of these dependencies |
70 | | -- Rename plugin from `swagger` to `openapi` |
71 | | -- Change the default API Reference path to `/docs`, serving either Scalar API Reference (default) or Swagger UI |
72 | | -- Change the default `openapi.json` serving path to `/docs/json` |
| 66 | +- Update core dependencies to the latest versions (at the time of writing) |
| 67 | + - Updates include [Scalar API Reference](https://github.com/scalar/scalar), enabling useful features like [`persistAuth`](https://github.com/scalar/scalar/blob/main/documentation/configuration.md#persistauth-boolean) |
| 68 | + - Fix code to fully support these updates, passing all official [tests](https://github.com/bedtime-coders/elysia-openapi/actions/workflows/test.yml) |
| 69 | +- Ability to set any `theme` for Scalar API Reference, not just `elysiajs` |
| 70 | +- Rename plugin to `openapi` (was `swagger`) |
| 71 | +- Change the default API Reference path to `/docs` (was `/swagger`) |
| 72 | +- Change the default `openapi.json` path to `/docs/json` (was `/swagger/json`) |
73 | 73 |
|
74 | 74 | ## Give us a ⭐️ |
75 | 75 |
|
|
0 commit comments