diff --git a/CHANGELOG.md b/CHANGELOG.md index e46e295..8f47ffa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,18 @@ -# 0.8.3 - 8 Jan 2023 +# 0.8.4 - 24 Jan 2024 +Feature: +- [#96](https://github.com/elysiajs/elysia-swagger/pull/96) move to scalar configuration prop +- [#95](https://github.com/elysiajs/elysia-swagger/pulls?q=is%3Apr+is%3Aclosed) Scalar CDN option +- [#92](https://github.com/elysiajs/elysia-swagger/pull/92) update scalar to 1.13.0 and using latest instead of hardcoded version + +# 0.8.3 - 8 Jan 2024 Bug fix: - Using local Scalar API reference instead of leftover one (oppsie 👉👈) -# 0.8.2 - 8 Jan 2023 +# 0.8.2 - 8 Jan 2024 Improvement: - Extract type inference to reduce bundle-size -# 0.8.1 - 7 Jan 2023 +# 0.8.1 - 7 Jan 2024 Change: - Using Scalar provider as new default diff --git a/example/index.ts b/example/index.ts index fd602ae..f8284a1 100644 --- a/example/index.ts +++ b/example/index.ts @@ -2,9 +2,7 @@ import { Elysia } from 'elysia' import { swagger } from '../src/index' import { plugin } from './plugin' -const app = new Elysia({ - // aot: false -}) +const app = new Elysia() .use( swagger({ documentation: { diff --git a/package.json b/package.json index d5f1d43..faee76e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@elysiajs/swagger", - "version": "0.8.3", + "version": "0.8.4", "description": "Plugin for Elysia to auto-generate Swagger page", "author": { "name": "saltyAom", diff --git a/src/scalar/index.ts b/src/scalar/index.ts index e64a60b..5062f1f 100644 --- a/src/scalar/index.ts +++ b/src/scalar/index.ts @@ -1,7 +1,11 @@ import scalarElysiaTheme from './theme' import type { ReferenceConfiguration } from './types' -export const ScalarRender = (version: string, config: ReferenceConfiguration, cdn: string) => ` +export const ScalarRender = ( + version: string, + config: ReferenceConfiguration, + cdn: string +) => ` API Reference @@ -21,7 +25,14 @@ export const ScalarRender = (version: string, config: ReferenceConfiguration, cd - + data-url="${config.spec?.url}" + data-configuration='${JSON.stringify(config)}' + > + + `