File tree Expand file tree Collapse file tree 3 files changed +25
-31
lines changed Expand file tree Collapse file tree 3 files changed +25
-31
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,9 @@ const isDark = useDark()
55
55
<TypeStrict >
56
56
<slot name =" typestrict" ></slot >
57
57
</TypeStrict >
58
- <OpenAPI />
58
+ <OpenAPI >
59
+ <slot name =" openapi" ></slot >
60
+ </OpenAPI >
59
61
</section >
60
62
<E2ETypeSafety />
61
63
<Plugins />
@@ -80,7 +82,7 @@ const isDark = useDark()
80
82
width : -moz-fit-content ;
81
83
width : fit-content ;
82
84
min-width : 100% ;
83
- line-height : var ( --vp-code-line-height ) ;
85
+ line-height : 1.5 rem ;
84
86
font-size : var (--vp-code-font-size );
85
87
color : var (--vp-code-block-color );
86
88
transition : color 0.5s ;
Original file line number Diff line number Diff line change 1
- <script setup lang="ts">
2
- import Prism from ' vue-prism-component'
3
-
4
- const code = ` import { Elysia, t } from 'elysia'
5
- import { swagger } from '@elysiajs/swagger'
6
- import { users, feed } from './controllers'
7
-
8
- new Elysia()
9
- .use(swagger())
10
- .use(users)
11
- .use(feed)
12
- .listen(3000) `
13
- </script >
14
-
15
1
<template >
16
- <article
17
- class =" flex flex-col-reverse md:flex-row justify-between items-center gap-4 md:gap-12 w-full max-w-6xl"
18
- >
19
- <section class =" w-full" >
20
- <Prism class =" !text-base !font-mono rounded-xl" language =" typescript" >
21
- {{ code }}
22
- </Prism >
2
+ <article class =" flex flex-col-reverse md:flex-row justify-between items-center gap-4 md:gap-12 w-full max-w-6xl" >
3
+ <section class =" w-full !text-base !font-mono rounded-xl" >
4
+ <slot ></slot >
23
5
</section >
24
6
<header class =" flex flex-col gap-3 w-full" >
25
7
<h3
26
- class =" text-5xl leading-tight font-bold text-transparent bg-clip-text bg-gradient-to-br from-teal-300 to-blue-300"
27
- >
8
+ class =" text-5xl leading-tight font-bold text-transparent bg-clip-text bg-gradient-to-br from-teal-300 to-blue-300" >
28
9
OpenAPI / Swagger
29
10
</h3 >
30
- <p
31
- class =" text-xl leading-normal text-gray-400 w-full max-w-lg mb-4"
32
- >
11
+ <p class =" text-xl leading-normal text-gray-400 w-full max-w-lg mb-4" >
33
12
Elysia generates OpenAPI 3.0 specs automatically to integrate
34
13
with various tools across multiple languages
35
14
</p >
36
- <p
37
- class =" text-xl leading-normal text-gray-400 w-full max-w-lg mb-4"
38
- >
15
+ <p class =" text-xl leading-normal text-gray-400 w-full max-w-lg mb-4" >
39
16
Thanks to OpenAPI compliance, Elysia can generate Swagger in one
40
17
line with the Swagger plugin.
41
18
</p >
Original file line number Diff line number Diff line change @@ -54,6 +54,21 @@ new Elysia()
54
54
)
55
55
.listen (3000 )
56
56
57
+ ```
58
+ </template >
59
+
60
+ <template v-slot:openapi >
61
+
62
+ ``` ts
63
+ import { Elysia , t } from ' elysia'
64
+ import { swagger } from ' @elysiajs/swagger'
65
+ import { users , feed } from ' ./controllers'
66
+
67
+ new Elysia ()
68
+ .use (swagger ())
69
+ .use (users )
70
+ .use (feed )
71
+ .listen (3000 )
57
72
```
58
73
</template >
59
74
</Landing >
You can’t perform that action at this time.
0 commit comments