nestjs-knife4j-plus 1.0.7 → 1.0.8

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.
Files changed (44) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +120 -113
  3. package/package.json +1 -1
  4. package/ui/assets/css/{app.e0be8b48.css → app.b252298f.css} +1 -1
  5. package/ui/assets/css/{app.e0be8b48.css.gz → app.b252298f.css.gz} +0 -0
  6. package/ui/assets/js/app.05658551.js +1 -0
  7. package/ui/assets/js/app.05658551.js.gz +0 -0
  8. package/ui/assets/js/chunk-1287e0be.18ef2030.js +8 -0
  9. package/ui/assets/js/chunk-1287e0be.18ef2030.js.gz +0 -0
  10. package/ui/assets/js/{chunk-42d52f4e.8b8ff2f4.js → chunk-42d52f4e.e8bfc7fc.js} +2 -2
  11. package/ui/assets/js/chunk-42d52f4e.e8bfc7fc.js.gz +0 -0
  12. package/ui/assets/js/chunk-486bbf01.38392492.js +9 -0
  13. package/ui/assets/js/chunk-486bbf01.38392492.js.gz +0 -0
  14. package/ui/assets/js/{chunk-9aa77aca.c434c652.js → chunk-9aa77aca.a3ec0f07.js} +1 -1
  15. package/ui/assets/js/chunk-9aa77aca.a3ec0f07.js.gz +0 -0
  16. package/ui/assets/js/{chunk-vendors.35e53d6f.js → chunk-vendors.8e9185cb.js} +44 -44
  17. package/ui/assets/js/chunk-vendors.8e9185cb.js.gz +0 -0
  18. package/ui/doc.html +1 -1
  19. package/ui/assets/js/app.3001c54c.js +0 -1
  20. package/ui/assets/js/app.3001c54c.js.gz +0 -0
  21. package/ui/assets/js/chunk-1287e0be.50ad7750.js +0 -8
  22. package/ui/assets/js/chunk-1287e0be.50ad7750.js.gz +0 -0
  23. package/ui/assets/js/chunk-42d52f4e.8b8ff2f4.js.gz +0 -0
  24. package/ui/assets/js/chunk-5fbbcfe7.c76880fa.js +0 -9
  25. package/ui/assets/js/chunk-5fbbcfe7.c76880fa.js.gz +0 -0
  26. package/ui/assets/js/chunk-9aa77aca.c434c652.js.gz +0 -0
  27. package/ui/assets/js/chunk-vendors.35e53d6f.js.gz +0 -0
  28. /package/ui/assets/js/{chunk-0d102d5a.3937973a.js → chunk-0d102d5a.a07f24d8.js} +0 -0
  29. /package/ui/assets/js/{chunk-0d102d5a.3937973a.js.gz → chunk-0d102d5a.a07f24d8.js.gz} +0 -0
  30. /package/ui/assets/js/{chunk-2d0af44e.698cc3a5.js → chunk-2d0af44e.58f278d5.js} +0 -0
  31. /package/ui/assets/js/{chunk-2d0bd799.8a425b4b.js → chunk-2d0bd799.fec307de.js} +0 -0
  32. /package/ui/assets/js/{chunk-2d0da532.d108ce70.js → chunk-2d0da532.889f3ece.js} +0 -0
  33. /package/ui/assets/js/{chunk-589faee0.382854bb.js → chunk-589faee0.9f263a06.js} +0 -0
  34. /package/ui/assets/js/{chunk-589faee0.382854bb.js.gz → chunk-589faee0.9f263a06.js.gz} +0 -0
  35. /package/ui/assets/js/{chunk-6cbe5a9e.0ce75ab0.js → chunk-6cbe5a9e.cdf3527e.js} +0 -0
  36. /package/ui/assets/js/{chunk-6cbe5a9e.0ce75ab0.js.gz → chunk-6cbe5a9e.cdf3527e.js.gz} +0 -0
  37. /package/ui/assets/js/{chunk-735c675c.45af6b43.js → chunk-735c675c.8d8944ae.js} +0 -0
  38. /package/ui/assets/js/{chunk-735c675c.45af6b43.js.gz → chunk-735c675c.8d8944ae.js.gz} +0 -0
  39. /package/ui/assets/js/{chunk-a27fb06c.6f8bf189.js → chunk-a27fb06c.c9650a7e.js} +0 -0
  40. /package/ui/assets/js/{chunk-a27fb06c.6f8bf189.js.gz → chunk-a27fb06c.c9650a7e.js.gz} +0 -0
  41. /package/ui/assets/js/{chunk-adb9e944.3a9a19a7.js → chunk-adb9e944.752297d4.js} +0 -0
  42. /package/ui/assets/js/{chunk-adb9e944.3a9a19a7.js.gz → chunk-adb9e944.752297d4.js.gz} +0 -0
  43. /package/ui/assets/js/{chunk-f3245bfc.3f24cd93.js → chunk-f3245bfc.8cadc7e1.js} +0 -0
  44. /package/ui/assets/js/{chunk-f3245bfc.3f24cd93.js.gz → chunk-f3245bfc.8cadc7e1.js.gz} +0 -0
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 jkhuangfu
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 jkhuangfu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,113 +1,120 @@
1
- ## Description
2
-
3
- The provided code sets up Knife4j for enhancing Swagger/OpenAPI documentation in a NestJS application, supporting both Express and Fastify HTTP adapters. Thanks to [@xiaoymin](https://github.com/xiaoymin) for providing the WebUI.
4
-
5
- [![NPM version](https://img.shields.io/npm/v/nestjs-knife4j-plus?style=for-the-badge)](https://www.npmjs.com/package/nestjs-knife4j-plus) [![License: MIT](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)](LICENSE) [![GitHub issues](https://img.shields.io/github/issues/jkhuangfu/nestjs-knife4j-plus?style=for-the-badge)](https://github.com/jkhuangfu/nestjs-knife4j-plus/issues)
6
-
7
- ## 📦 Installation
8
-
9
- ```bash
10
- # Install the package
11
- npm install nestjs-knife4j-plus @nestjs/swagger
12
-
13
- # For Fastify adapter, also install:
14
- npm install @fastify/static
15
- ```
16
-
17
- ## 🔄 Compatibility Matrix
18
-
19
- | @fastify/static version | Fastify version |
20
- | ----------------------- | --------------- |
21
- | `^8.x` | `^5.x` |
22
- | `^7.x` | `^4.x` |
23
- | `^5.x` | `^3.x` |
24
- | `^2.x` | `^2.x` |
25
- | `^1.x` | `^1.x` |
26
-
27
- ## 🚀 Usage
28
-
29
- ```typescript
30
- import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'
31
- import { knife4jSetup } from 'nestjs-knife4j-plus'
32
-
33
- // To use this with Fastify, first install @fastify/static. Please ensure version compatibility.
34
-
35
- async function bootstrap() {
36
- const options = new DocumentBuilder()
37
- .setTitle('Cats example')
38
- .setDescription('The cats API description')
39
- .setVersion('1.0')
40
- .addTag('cats')
41
- .build()
42
- const document = SwaggerModule.createDocument(app, options)
43
- // 如果想自定义访问路径前缀,需要在 Swagger 配置中开启全局前缀(useGlobalPrefix:true)同时 knife4jSetup 也需要配置全局前缀(knife4jSetup第三个参数为前缀)
44
- // app.setGlobalPrefix('customerPrefix')
45
- SwaggerModule.setup('api', app, document)
46
-
47
- knife4jSetup(app, [
48
- {
49
- name: '2.0 version',
50
- url: `/api-json`,
51
- },
52
- ])
53
- await app.listen(3000)
54
- }
55
- ```
56
-
57
- then you can browse on [http://127.0.0.1:3000/doc.html](http://127.0.0.1:3000/doc.html)
58
-
59
- if you set customerPrefix, then in Knife4j UI, the path to access will be '/customerPrefix/doc.html'
60
-
61
- ## 📈 Changelog
62
-
63
- ### [1.0.7] - 2026-02-11
64
-
65
- #### 🐛 Fix
66
-
67
- - **修复使用自定义前缀的时候,UI层配置信息请求路径问题**
68
-
69
- - **Fix the issue with the request path for UI layer configuration information when using a custom prefix.**
70
-
71
- ### [1.0.6] - 2026-02-09
72
-
73
- #### 🐛 Fix
74
-
75
- - **修复在自定义路径前缀下访问 Knife4j UI 时,请求路径多一层path的问题**
76
-
77
- - **Fix the issue of an extra layer of path in request paths when accessing the Knife4j UI under a custom path prefix**
78
-
79
- ### [1.0.5] - 2026-02-09
80
-
81
- #### ✨ feature [issues/1](https://github.com/jkhuangfu/nestjs-knife4j-plus/issues/1)
82
-
83
- - **新增自定义路径前缀支持**
84
- 支持在 Knife4j UI 中配置自定义访问路径前缀,方便在不同路径下部署。
85
-
86
- - **Add custom path prefix support**
87
- Allows configuring custom path prefixes for Knife4j UI, enabling deployment under different paths.
88
-
89
- ### [1.0.4] - 2026-01-12
90
-
91
- #### 🐛 Fix
92
-
93
- - **修复多文件上传无法正常解析问题**
94
-
95
- - **Fix multiple file uploads cannot be parsed correctly**
96
-
97
- ### [1.0.2] — 2025-12-19
98
-
99
- #### ✨ Added
100
-
101
- - **新增文件拖拽上传功能**
102
- 支持通过拖拽方式快速上传文件,显著提升文件上传效率与整体使用体验。
103
-
104
- - **Drag-and-drop file upload support**
105
- Enables quick file uploads via drag-and-drop interactions, significantly improving upload efficiency and overall user experience.
106
-
107
- #### 🎨 Improved
108
-
109
- - **界面样式优化**
110
- 对部分页面样式与交互细节进行优化,提升整体视觉一致性与使用流畅度。
111
-
112
- - **UI and style enhancements**
113
- Refined selected UI styles and interaction details to improve visual consistency and overall usability.
1
+ ## Description
2
+
3
+ The provided code sets up Knife4j for enhancing Swagger/OpenAPI documentation in a NestJS application, supporting both Express and Fastify HTTP adapters. Thanks to [@xiaoymin](https://github.com/xiaoymin) for providing the WebUI.
4
+
5
+ [![NPM version](https://img.shields.io/npm/v/nestjs-knife4j-plus?style=for-the-badge)](https://www.npmjs.com/package/nestjs-knife4j-plus) [![License: MIT](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)](LICENSE) [![GitHub issues](https://img.shields.io/github/issues/jkhuangfu/nestjs-knife4j-plus?style=for-the-badge)](https://github.com/jkhuangfu/nestjs-knife4j-plus/issues)
6
+
7
+ ## 📦 Installation
8
+
9
+ ```bash
10
+ # Install the package
11
+ npm install nestjs-knife4j-plus @nestjs/swagger
12
+
13
+ # For Fastify adapter, also install:
14
+ npm install @fastify/static
15
+ ```
16
+
17
+ ## 🔄 Compatibility Matrix
18
+
19
+ | @fastify/static version | Fastify version |
20
+ | ----------------------- | --------------- |
21
+ | `^8.x` | `^5.x` |
22
+ | `^7.x` | `^4.x` |
23
+ | `^5.x` | `^3.x` |
24
+ | `^2.x` | `^2.x` |
25
+ | `^1.x` | `^1.x` |
26
+
27
+ ## 🚀 Usage
28
+
29
+ ```typescript
30
+ import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'
31
+ import { knife4jSetup } from 'nestjs-knife4j-plus'
32
+
33
+ // To use this with Fastify, first install @fastify/static. Please ensure version compatibility.
34
+
35
+ async function bootstrap() {
36
+ const options = new DocumentBuilder()
37
+ .setTitle('Cats example')
38
+ .setDescription('The cats API description')
39
+ .setVersion('1.0')
40
+ .addTag('cats')
41
+ .build()
42
+ const document = SwaggerModule.createDocument(app, options)
43
+ // 如果想自定义访问路径前缀,需要在 Swagger 配置中开启全局前缀(useGlobalPrefix:true)同时 knife4jSetup 也需要配置全局前缀(knife4jSetup第三个参数为前缀)
44
+ // app.setGlobalPrefix('customerPrefix')
45
+ SwaggerModule.setup('api', app, document)
46
+
47
+ knife4jSetup(app, [
48
+ {
49
+ name: '2.0 version',
50
+ url: `/api-json`,
51
+ },
52
+ ])
53
+ await app.listen(3000)
54
+ }
55
+ ```
56
+
57
+ then you can browse on [http://127.0.0.1:3000/doc.html](http://127.0.0.1:3000/doc.html)
58
+
59
+ if you set customerPrefix, then in Knife4j UI, the path to access will be '/customerPrefix/doc.html'
60
+
61
+ ## 📈 Changelog
62
+
63
+ ### [1.0.8] - 2026-05-12
64
+
65
+ #### 🐛 Fix
66
+
67
+ - **修复新增OAS3规范下allOf组合schema的解析能力**
68
+ - **add support for parsing allOf schema in OAS3**
69
+
70
+ ### [1.0.7] - 2026-02-11
71
+
72
+ #### 🐛 Fix
73
+
74
+ - **修复使用自定义前缀的时候,UI层配置信息请求路径问题**
75
+
76
+ - **Fix the issue with the request path for UI layer configuration information when using a custom prefix.**
77
+
78
+ ### [1.0.6] - 2026-02-09
79
+
80
+ #### 🐛 Fix
81
+
82
+ - **修复在自定义路径前缀下访问 Knife4j UI 时,请求路径多一层path的问题**
83
+
84
+ - **Fix the issue of an extra layer of path in request paths when accessing the Knife4j UI under a custom path prefix**
85
+
86
+ ### [1.0.5] - 2026-02-09
87
+
88
+ #### ✨ feature [issues/1](https://github.com/jkhuangfu/nestjs-knife4j-plus/issues/1)
89
+
90
+ - **新增自定义路径前缀支持**
91
+ 支持在 Knife4j UI 中配置自定义访问路径前缀,方便在不同路径下部署。
92
+
93
+ - **Add custom path prefix support**
94
+ Allows configuring custom path prefixes for Knife4j UI, enabling deployment under different paths.
95
+
96
+ ### [1.0.4] - 2026-01-12
97
+
98
+ #### 🐛 Fix
99
+
100
+ - **修复多文件上传无法正常解析问题**
101
+
102
+ - **Fix multiple file uploads cannot be parsed correctly**
103
+
104
+ ### [1.0.2] — 2025-12-19
105
+
106
+ #### ✨ Added
107
+
108
+ - **新增文件拖拽上传功能**
109
+ 支持通过拖拽方式快速上传文件,显著提升文件上传效率与整体使用体验。
110
+
111
+ - **Drag-and-drop file upload support**
112
+ Enables quick file uploads via drag-and-drop interactions, significantly improving upload efficiency and overall user experience.
113
+
114
+ #### 🎨 Improved
115
+
116
+ - **界面样式优化**
117
+ 对部分页面样式与交互细节进行优化,提升整体视觉一致性与使用流畅度。
118
+
119
+ - **UI and style enhancements**
120
+ Refined selected UI styles and interaction details to improve visual consistency and overall usability.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nestjs-knife4j-plus",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "NestJS Knife4j integration for enhanced Swagger/OpenAPI documentation with support for both Express and Fastify adapters. Provides a powerful API documentation UI based on Knife4j.",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",