@questpie/openapi 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,20 +10,26 @@ bun add @questpie/openapi
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
Register `openApiModule
|
|
13
|
+
Register `openApiModule` in your `modules.ts` file to add `/openapi.json` and `/docs` routes:
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
16
|
// src/questpie/server/modules.ts
|
|
17
17
|
import { adminModule } from "@questpie/admin/server";
|
|
18
18
|
import { openApiModule } from "@questpie/openapi";
|
|
19
19
|
|
|
20
|
-
export default [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
export default [adminModule, openApiModule] as const;
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Configure the OpenAPI module via `config/openapi.ts`:
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
// src/questpie/server/config/openapi.ts
|
|
27
|
+
import { openApiConfig } from "@questpie/openapi";
|
|
28
|
+
|
|
29
|
+
export default openApiConfig({
|
|
30
|
+
info: { title: "My API", version: "1.0.0" },
|
|
31
|
+
scalar: { theme: "purple" },
|
|
32
|
+
});
|
|
27
33
|
```
|
|
28
34
|
|
|
29
35
|
Your route handler stays clean — no wrapper needed:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@questpie/openapi",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/questpie/questpie.git",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"check-types": "tsc --noEmit"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"questpie": "^3.0.
|
|
46
|
+
"questpie": "^3.0.1",
|
|
47
47
|
"zod": "^4.2.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|