@moostjs/swagger 0.4.23 → 0.5.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/dist/index.cjs CHANGED
@@ -325,7 +325,7 @@ function mapToSwaggerSpec(metadata, options, logger) {
325
325
  reqBodyRequired = !zodType.isOptional() && !paramMeta.optional;
326
326
  }
327
327
  }
328
- if (bodyConfig && Object.entries(bodyConfig).some(e => !!e[1])) {
328
+ if (Object.entries(bodyConfig).some(e => !!e[1])) {
329
329
  swaggerSpec.paths[handlerPath][handlerMethod].requestBody = {
330
330
  content: bodyConfig,
331
331
  required: reqBodyRequired,
package/dist/index.mjs CHANGED
@@ -323,7 +323,7 @@ function mapToSwaggerSpec(metadata, options, logger) {
323
323
  reqBodyRequired = !zodType.isOptional() && !paramMeta.optional;
324
324
  }
325
325
  }
326
- if (bodyConfig && Object.entries(bodyConfig).some(e => !!e[1])) {
326
+ if (Object.entries(bodyConfig).some(e => !!e[1])) {
327
327
  swaggerSpec.paths[handlerPath][handlerMethod].requestBody = {
328
328
  content: bodyConfig,
329
329
  required: reqBodyRequired,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moostjs/swagger",
3
- "version": "0.4.23",
3
+ "version": "0.5.1",
4
4
  "description": "@moostjs/swagger",
5
5
  "sideEffects": false,
6
6
  "main": "dist/index.cjs",
@@ -37,15 +37,15 @@
37
37
  },
38
38
  "homepage": "https://github.com/moostjs/moostjs/tree/main/packages/swagger#readme",
39
39
  "peerDependencies": {
40
- "moost": "0.4.23",
41
- "@moostjs/event-http": "0.4.23"
40
+ "moost": "0.5.1",
41
+ "@moostjs/event-http": "0.5.1"
42
42
  },
43
43
  "dependencies": {
44
- "@wooksjs/event-http": "^0.5.17",
44
+ "@wooksjs/event-http": "^0.5.18",
45
45
  "swagger-ui-dist": "^5.10.5",
46
46
  "zod-parser": "^0.0.3",
47
- "@moostjs/zod": "0.4.23",
48
- "@wooksjs/http-static": "^0.5.17"
47
+ "@moostjs/zod": "0.5.1",
48
+ "@wooksjs/http-static": "^0.5.18"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/swagger-ui-dist": ""