@globalart/nestjs-swagger 1.2.4 → 1.2.5

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.
@@ -5,10 +5,14 @@ const common_1 = require("@nestjs/common");
5
5
  const swagger_1 = require("@nestjs/swagger");
6
6
  const constants_1 = require("../constants");
7
7
  const dtos_1 = require("../dtos");
8
+ const crypto_1 = require("crypto");
8
9
  // SwaggerDocumentation is a decorator function to generate Swagger documentation for endpoints based on the provided options.
9
10
  const SwaggerDocumentation = (data) => {
11
+ const operationId = data.operationId ||
12
+ (0, crypto_1.createHash)("md5").update(`${data.endpointSummary}`).digest("hex");
10
13
  const decorators = [
11
14
  (0, swagger_1.ApiOperation)({
15
+ operationId,
12
16
  description: data.endpointDescription,
13
17
  summary: data.endpointSummary,
14
18
  }),
@@ -10,8 +10,9 @@ export interface SwaggerDocumentationErrorStatus {
10
10
  error503Description?: string;
11
11
  }
12
12
  export interface SwaggerDocumentationOptions extends SwaggerDocumentationErrorStatus {
13
+ endpointSummary: string;
13
14
  endpointDescription?: string;
14
- endpointSummary?: string;
15
+ operationId?: string;
15
16
  responseDto?: any;
16
17
  isArray?: boolean;
17
18
  isPaginated?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@globalart/nestjs-swagger",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "A simple documentation builder for NestJS Swagger Module",
5
5
  "author": {
6
6
  "name": "GlobalArt, Inc"
@@ -35,21 +35,22 @@
35
35
  "test:cov": "jest --coverage --passWithNoTests",
36
36
  "coveralls": "yarn run test:cov --coverageReporters=text-lcov | coveralls",
37
37
  "build": "rm -rf ./dist && tsc",
38
+ "build:watch": "tsc --watch",
38
39
  "prepublishOnly": "npm run build",
39
40
  "publish:dev": "npm publish --access public --tag dev",
40
41
  "publish:npm": "release-it"
41
42
  },
42
43
  "dependencies": {
43
- "@nestjs/common": "^11.1.3",
44
- "@nestjs/core": "^11.1.3",
44
+ "@nestjs/common": "^11.1.6",
45
+ "@nestjs/core": "^11.1.6",
45
46
  "@nestjs/swagger": "^11.2.0",
46
- "@nestjs/testing": "^11.1.3",
47
+ "@nestjs/testing": "^11.1.6",
47
48
  "@nestjs/typeorm": "^11.0.0",
48
49
  "mysql": "^2.18.1"
49
50
  },
50
51
  "devDependencies": {
51
52
  "@types/jest": "^30.0.0",
52
- "@types/node": "^24.0.7",
53
+ "@types/node": "^24.3.0",
53
54
  "coveralls": "^3.1.1",
54
55
  "jest": "^30.0.3",
55
56
  "prettier": "^3.6.2",
@@ -58,8 +59,8 @@
58
59
  "rxjs": "^7.8.2",
59
60
  "ts-jest": "^29.4.0",
60
61
  "ts-node": "^10.9.2",
61
- "typeorm": "0.3.25",
62
- "typescript": "^5.8.3"
62
+ "typeorm": "0.3.26",
63
+ "typescript": "^5.9.2"
63
64
  },
64
65
  "jest": {
65
66
  "coveragePathIgnorePatterns": [