@tsed/swagger 8.0.0-beta.5 → 8.0.0-beta.7

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.
@@ -1,19 +1,18 @@
1
- import { __decorate, __metadata, __param } from "tslib";
2
- import { Configuration, Injectable, InjectorService } from "@tsed/di";
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { constant, Injectable } from "@tsed/di";
3
3
  import { Platform } from "@tsed/platform-http";
4
4
  import { generateSpec } from "@tsed/schema";
5
5
  import { includeRoute } from "../utils/includeRoute.js";
6
6
  let SwaggerService = class SwaggerService {
7
7
  #specs = new Map();
8
- constructor(injectorService, platform, configuration) {
9
- this.injectorService = injectorService;
8
+ constructor(platform) {
10
9
  this.platform = platform;
11
- this.configuration = configuration;
12
10
  }
13
11
  async getOpenAPISpec(conf) {
14
12
  if (!this.#specs.has(conf.path)) {
15
- const { version = "1.0.0", acceptMimes } = this.configuration;
16
- const specPath = conf.specPath ? this.configuration.resolve(conf.specPath) : conf.specPath;
13
+ const version = constant("version", "1.0.0");
14
+ const acceptMimes = constant("acceptMimes");
15
+ const specPath = conf.specPath;
17
16
  const tokens = this.platform
18
17
  .getMountedControllers()
19
18
  .filter(({ routes, provider }) => [...routes.values()].some((route) => includeRoute(route, provider, conf)))
@@ -32,9 +31,7 @@ let SwaggerService = class SwaggerService {
32
31
  };
33
32
  SwaggerService = __decorate([
34
33
  Injectable(),
35
- __param(2, Configuration()),
36
- __metadata("design:paramtypes", [InjectorService,
37
- Platform, Object])
34
+ __metadata("design:paramtypes", [Platform])
38
35
  ], SwaggerService);
39
36
  export { SwaggerService };
40
37
  //# sourceMappingURL=SwaggerService.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SwaggerService.js","sourceRoot":"","sources":["../../../src/services/SwaggerService.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,aAAa,EAAE,UAAU,EAAE,eAAe,EAAC,MAAM,UAAU,CAAC;AAEpE,OAAO,EAAC,Q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AM,CAAC,CAAC,EAAC,MAAM,EAAE,QAAQ,EAAC,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;iBACzG,GAAG,CAAC,CAAC,EAAC,KAAK,EAAE,QAAQ,EAAC,EAAE,EAAE,CAAC,CAAC,EAAC,KAAK,EAAE,QAAQ,CAAC,KAAa,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAC,CAAC,CAAC;YAElF,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC;gBAC9B,MAAM;gBACN,GAAG,IAAI;gBACP,QAAQ;gBACR,OAAO;gBACP,WAAW;aACZ,CAAC,CAAC;YAEH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACnC,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;CACF,CAAA;AApCY,cAAc;IAD1B,UAAU,EAAE;qCAImB,QAAQ;GAH3B,cAAc,CAoC1B"}
@@ -1,13 +1,10 @@
1
- import { Configuration, InjectorService } from "@tsed/di";
2
1
  import { OpenSpec2, OpenSpec3 } from "@tsed/openspec";
3
2
  import { Platform } from "@tsed/platform-http";
4
3
  import { SwaggerOS2Settings, SwaggerOS3Settings, SwaggerSettings } from "../interfaces/SwaggerSettings.js";
5
4
  export declare class SwaggerService {
6
5
  #private;
7
- private injectorService;
8
6
  private platform;
9
- private configuration;
10
- constructor(injectorService: InjectorService, platform: Platform, configuration: Configuration);
7
+ constructor(platform: Platform);
11
8
  /**
12
9
  * Generate Spec for the given configuration
13
10
  * @returns {Spec}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tsed/swagger",
3
3
  "description": "Swagger package for Ts.ED framework",
4
4
  "type": "module",
5
- "version": "8.0.0-beta.5",
5
+ "version": "8.0.0-beta.7",
6
6
  "source": "./src/index.ts",
7
7
  "main": "./lib/esm/index.js",
8
8
  "module": "./lib/esm/index.js",
@@ -25,23 +25,23 @@
25
25
  "test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
26
26
  },
27
27
  "dependencies": {
28
- "@tsed/normalize-path": "8.0.0-beta.5",
29
- "@tsed/openspec": "8.0.0-beta.5",
28
+ "@tsed/normalize-path": "8.0.0-beta.7",
29
+ "@tsed/openspec": "8.0.0-beta.7",
30
30
  "fs-extra": "11.2.0",
31
31
  "micromatch": "4.0.8",
32
32
  "swagger-ui-dist": ">=5.17.14",
33
33
  "tslib": "2.7.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@tsed/barrels": "8.0.0-beta.5",
37
- "@tsed/core": "8.0.0-beta.5",
38
- "@tsed/di": "8.0.0-beta.5",
39
- "@tsed/json-mapper": "8.0.0-beta.5",
36
+ "@tsed/barrels": "8.0.0-beta.7",
37
+ "@tsed/core": "8.0.0-beta.7",
38
+ "@tsed/di": "8.0.0-beta.7",
39
+ "@tsed/json-mapper": "8.0.0-beta.7",
40
40
  "@tsed/monorepo-utils": "2.3.5",
41
- "@tsed/openspec": "8.0.0-beta.5",
42
- "@tsed/platform-http": "8.0.0-beta.5",
43
- "@tsed/schema": "8.0.0-beta.5",
44
- "@tsed/typescript": "8.0.0-beta.5",
41
+ "@tsed/openspec": "8.0.0-beta.7",
42
+ "@tsed/platform-http": "8.0.0-beta.7",
43
+ "@tsed/schema": "8.0.0-beta.7",
44
+ "@tsed/typescript": "8.0.0-beta.7",
45
45
  "@types/swagger-ui-dist": "3.30.5",
46
46
  "eslint": "9.12.0",
47
47
  "ts-node": "10.9.2",
@@ -49,7 +49,7 @@
49
49
  "vitest": "2.1.2"
50
50
  },
51
51
  "peerDependencies": {
52
- "@tsed/platform-http": "8.0.0-beta.5"
52
+ "@tsed/platform-http": "8.0.0-beta.7"
53
53
  },
54
54
  "peerDependenciesMeta": {
55
55
  "@tsed/common": {