@tsoa-next/runtime 8.0.1 → 8.0.2-dev.48.4fd45317

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.
@@ -7,39 +7,26 @@ exports.Put = Put;
7
7
  exports.Patch = Patch;
8
8
  exports.Delete = Delete;
9
9
  exports.Head = Head;
10
+ const noop_1 = require("./noop");
10
11
  function Options(_value) {
11
- return () => {
12
- return;
13
- };
12
+ return (0, noop_1.createNoopMethodDecorator)('options');
14
13
  }
15
14
  function Get(_value) {
16
- return () => {
17
- return;
18
- };
15
+ return (0, noop_1.createNoopMethodDecorator)('get');
19
16
  }
20
17
  function Post(_value) {
21
- return () => {
22
- return;
23
- };
18
+ return (0, noop_1.createNoopMethodDecorator)('post');
24
19
  }
25
20
  function Put(_value) {
26
- return () => {
27
- return;
28
- };
21
+ return (0, noop_1.createNoopMethodDecorator)('put');
29
22
  }
30
23
  function Patch(_value) {
31
- return () => {
32
- return;
33
- };
24
+ return (0, noop_1.createNoopMethodDecorator)('patch');
34
25
  }
35
26
  function Delete(_value) {
36
- return () => {
37
- return;
38
- };
27
+ return (0, noop_1.createNoopMethodDecorator)('delete');
39
28
  }
40
29
  function Head(_value) {
41
- return () => {
42
- return;
43
- };
30
+ return (0, noop_1.createNoopMethodDecorator)('head');
44
31
  }
45
32
  //# sourceMappingURL=methods.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"methods.js","sourceRoot":"","sources":["../../src/decorators/methods.ts"],"names":[],"mappings":";;AAAA,0BAIC;AAED,kBAIC;AAED,oBAIC;AAED,kBAIC;AAED,sBAIC;AAED,wBAIC;AAED,oBAIC;AAxCD,SAAgB,OAAO,CAAC,MAAe;IACrC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED,SAAgB,GAAG,CAAC,MAAe;IACjC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED,SAAgB,IAAI,CAAC,MAAe;IAClC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED,SAAgB,GAAG,CAAC,MAAe;IACjC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED,SAAgB,KAAK,CAAC,MAAe;IACnC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED,SAAgB,MAAM,CAAC,MAAe;IACpC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED,SAAgB,IAAI,CAAC,MAAe;IAClC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"methods.js","sourceRoot":"","sources":["../../src/decorators/methods.ts"],"names":[],"mappings":";;AAEA,0BAEC;AAED,kBAEC;AAED,oBAEC;AAED,kBAEC;AAED,sBAEC;AAED,wBAEC;AAED,oBAEC;AA5BD,iCAAkD;AAElD,SAAgB,OAAO,CAAC,MAAe;IACrC,OAAO,IAAA,gCAAyB,EAAC,SAAS,CAAC,CAAA;AAC7C,CAAC;AAED,SAAgB,GAAG,CAAC,MAAe;IACjC,OAAO,IAAA,gCAAyB,EAAC,KAAK,CAAC,CAAA;AACzC,CAAC;AAED,SAAgB,IAAI,CAAC,MAAe;IAClC,OAAO,IAAA,gCAAyB,EAAC,MAAM,CAAC,CAAA;AAC1C,CAAC;AAED,SAAgB,GAAG,CAAC,MAAe;IACjC,OAAO,IAAA,gCAAyB,EAAC,KAAK,CAAC,CAAA;AACzC,CAAC;AAED,SAAgB,KAAK,CAAC,MAAe;IACnC,OAAO,IAAA,gCAAyB,EAAC,OAAO,CAAC,CAAA;AAC3C,CAAC;AAED,SAAgB,MAAM,CAAC,MAAe;IACpC,OAAO,IAAA,gCAAyB,EAAC,QAAQ,CAAC,CAAA;AAC5C,CAAC;AAED,SAAgB,IAAI,CAAC,MAAe;IAClC,OAAO,IAAA,gCAAyB,EAAC,MAAM,CAAC,CAAA;AAC1C,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const createNoopClassDecorator: (_kind: string) => ClassDecorator;
2
+ export declare const createNoopMethodDecorator: (_kind: string) => MethodDecorator;
3
+ export declare const createNoopParameterDecorator: (_kind: string) => ParameterDecorator;
4
+ export declare const createNoopClassMethodDecorator: (_kind: string) => ClassDecorator & MethodDecorator;
5
+ export declare const createNoopHiddenDecorator: (_kind: string) => ClassDecorator & MethodDecorator & ParameterDecorator;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createNoopHiddenDecorator = exports.createNoopClassMethodDecorator = exports.createNoopParameterDecorator = exports.createNoopMethodDecorator = exports.createNoopClassDecorator = void 0;
4
+ const noopClassDecorator = () => undefined;
5
+ const noopMethodDecorator = () => undefined;
6
+ const noopParameterDecorator = () => undefined;
7
+ const noopClassMethodDecorator = noopMethodDecorator;
8
+ const noopHiddenDecorator = noopParameterDecorator;
9
+ const createNoopClassDecorator = (_kind) => noopClassDecorator;
10
+ exports.createNoopClassDecorator = createNoopClassDecorator;
11
+ const createNoopMethodDecorator = (_kind) => noopMethodDecorator;
12
+ exports.createNoopMethodDecorator = createNoopMethodDecorator;
13
+ const createNoopParameterDecorator = (_kind) => noopParameterDecorator;
14
+ exports.createNoopParameterDecorator = createNoopParameterDecorator;
15
+ const createNoopClassMethodDecorator = (_kind) => noopClassMethodDecorator;
16
+ exports.createNoopClassMethodDecorator = createNoopClassMethodDecorator;
17
+ const createNoopHiddenDecorator = (_kind) => noopHiddenDecorator;
18
+ exports.createNoopHiddenDecorator = createNoopHiddenDecorator;
19
+ //# sourceMappingURL=noop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noop.js","sourceRoot":"","sources":["../../src/decorators/noop.ts"],"names":[],"mappings":";;;AAAA,MAAM,kBAAkB,GAAmB,GAAG,EAAE,CAAC,SAAS,CAAA;AAC1D,MAAM,mBAAmB,GAAoB,GAAG,EAAE,CAAC,SAAS,CAAA;AAC5D,MAAM,sBAAsB,GAAuB,GAAG,EAAE,CAAC,SAAS,CAAA;AAClE,MAAM,wBAAwB,GAAG,mBAAuD,CAAA;AACxF,MAAM,mBAAmB,GAAG,sBAA+E,CAAA;AAEpG,MAAM,wBAAwB,GAAG,CAAC,KAAa,EAAkB,EAAE,CAAC,kBAAkB,CAAA;AAAhF,QAAA,wBAAwB,4BAAwD;AAEtF,MAAM,yBAAyB,GAAG,CAAC,KAAa,EAAmB,EAAE,CAAC,mBAAmB,CAAA;AAAnF,QAAA,yBAAyB,6BAA0D;AAEzF,MAAM,4BAA4B,GAAG,CAAC,KAAa,EAAsB,EAAE,CAAC,sBAAsB,CAAA;AAA5F,QAAA,4BAA4B,gCAAgE;AAElG,MAAM,8BAA8B,GAAG,CAAC,KAAa,EAAoC,EAAE,CAAC,wBAAwB,CAAA;AAA9G,QAAA,8BAA8B,kCAAgF;AAEpH,MAAM,yBAAyB,GAAG,CAAC,KAAa,EAAyD,EAAE,CAAC,mBAAmB,CAAA;AAAzH,QAAA,yBAAyB,6BAAgG"}
@@ -13,14 +13,13 @@ exports.UploadedFile = UploadedFile;
13
13
  exports.UploadedFiles = UploadedFiles;
14
14
  exports.FormField = FormField;
15
15
  exports.Consumes = Consumes;
16
+ const noop_1 = require("./noop");
16
17
  /**
17
18
  * Inject http Body
18
19
  * @param {string} [name] properties name in body object
19
20
  */
20
21
  function Body() {
21
- return () => {
22
- return;
23
- };
22
+ return (0, noop_1.createNoopParameterDecorator)('body');
24
23
  }
25
24
  /**
26
25
  * Inject value from body
@@ -28,17 +27,13 @@ function Body() {
28
27
  * @param {string} [name] The name of the body parameter
29
28
  */
30
29
  function BodyProp(_name) {
31
- return () => {
32
- return;
33
- };
30
+ return (0, noop_1.createNoopParameterDecorator)('body-prop');
34
31
  }
35
32
  /**
36
33
  * Inject http request
37
34
  */
38
35
  function Request() {
39
- return () => {
40
- return;
41
- };
36
+ return (0, noop_1.createNoopParameterDecorator)('request');
42
37
  }
43
38
  /**
44
39
  * Inject value from request
@@ -46,9 +41,7 @@ function Request() {
46
41
  * @param {name} [name] The name of the request parameter
47
42
  */
48
43
  function RequestProp(_name) {
49
- return () => {
50
- return;
51
- };
44
+ return (0, noop_1.createNoopParameterDecorator)('request-prop');
52
45
  }
53
46
  /**
54
47
  * Inject value from Path
@@ -56,9 +49,7 @@ function RequestProp(_name) {
56
49
  * @param {string} [name] The name of the path parameter
57
50
  */
58
51
  function Path(_name) {
59
- return () => {
60
- return;
61
- };
52
+ return (0, noop_1.createNoopParameterDecorator)('path');
62
53
  }
63
54
  /**
64
55
  * Inject value from query string
@@ -66,17 +57,13 @@ function Path(_name) {
66
57
  * @param {string} [name] The name of the query parameter
67
58
  */
68
59
  function Query(_name) {
69
- return () => {
70
- return;
71
- };
60
+ return (0, noop_1.createNoopParameterDecorator)('query');
72
61
  }
73
62
  /**
74
63
  * Inject all query values in a single object
75
64
  */
76
65
  function Queries() {
77
- return () => {
78
- return;
79
- };
66
+ return (0, noop_1.createNoopParameterDecorator)('queries');
80
67
  }
81
68
  /**
82
69
  * Inject value from Http header
@@ -84,17 +71,13 @@ function Queries() {
84
71
  * @param {string} [name] The name of the header parameter
85
72
  */
86
73
  function Header(_name) {
87
- return () => {
88
- return;
89
- };
74
+ return (0, noop_1.createNoopParameterDecorator)('header');
90
75
  }
91
76
  /**
92
77
  * Mark parameter as manually injected, which will not be generated
93
78
  */
94
79
  function Inject() {
95
- return () => {
96
- return;
97
- };
80
+ return (0, noop_1.createNoopParameterDecorator)('inject');
98
81
  }
99
82
  /**
100
83
  * Inject uploaded file
@@ -102,9 +85,7 @@ function Inject() {
102
85
  * @param {string} [name] The name of the uploaded file parameter
103
86
  */
104
87
  function UploadedFile(_name) {
105
- return () => {
106
- return;
107
- };
88
+ return (0, noop_1.createNoopParameterDecorator)('uploaded-file');
108
89
  }
109
90
  /**
110
91
  * Inject uploaded files
@@ -112,9 +93,7 @@ function UploadedFile(_name) {
112
93
  * @param {string} [name] The name of the uploaded files parameter
113
94
  */
114
95
  function UploadedFiles(_name) {
115
- return () => {
116
- return;
117
- };
96
+ return (0, noop_1.createNoopParameterDecorator)('uploaded-files');
118
97
  }
119
98
  /**
120
99
  * Inject uploaded files
@@ -122,9 +101,7 @@ function UploadedFiles(_name) {
122
101
  * @param {string} [name] The name of the uploaded files parameter
123
102
  */
124
103
  function FormField(_name) {
125
- return () => {
126
- return;
127
- };
104
+ return (0, noop_1.createNoopParameterDecorator)('form-field');
128
105
  }
129
106
  /**
130
107
  * Overrides the default media type of request body.
@@ -134,8 +111,6 @@ function FormField(_name) {
134
111
  * @link https://swagger.io/docs/specification/describing-request-body/
135
112
  */
136
113
  function Consumes(_value) {
137
- return () => {
138
- return;
139
- };
114
+ return (0, noop_1.createNoopMethodDecorator)('consumes');
140
115
  }
141
116
  //# sourceMappingURL=parameter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../src/decorators/parameter.ts"],"names":[],"mappings":";;AAIA,oBAIC;AAOD,4BAIC;AAKD,0BAIC;AAOD,kCAIC;AAOD,oBAIC;AAOD,sBAIC;AAKD,0BAIC;AAOD,wBAIC;AAKD,wBAIC;AAOD,oCAIC;AAOD,sCAIC;AAOD,8BAIC;AASD,4BAIC;AAxID;;;GAGG;AACH,SAAgB,IAAI;IAClB,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,KAAc;IACrC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,OAAO;IACrB,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,WAAW,CAAC,KAAc;IACxC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,IAAI,CAAC,KAAc;IACjC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,KAAK,CAAC,KAAc;IAClC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,OAAO;IACrB,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,MAAM,CAAC,KAAc;IACnC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,MAAM;IACpB,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,YAAY,CAAC,KAAc;IACzC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,KAAc;IAC1C,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,SAAS,CAAC,KAAc;IACtC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,MAAc;IACrC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../src/decorators/parameter.ts"],"names":[],"mappings":";;AAMA,oBAEC;AAOD,4BAEC;AAKD,0BAEC;AAOD,kCAEC;AAOD,oBAEC;AAOD,sBAEC;AAKD,0BAEC;AAOD,wBAEC;AAKD,wBAEC;AAOD,oCAEC;AAOD,sCAEC;AAOD,8BAEC;AASD,4BAEC;AAhHD,iCAAgF;AAEhF;;;GAGG;AACH,SAAgB,IAAI;IAClB,OAAO,IAAA,mCAA4B,EAAC,MAAM,CAAC,CAAA;AAC7C,CAAC;AAED;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,KAAc;IACrC,OAAO,IAAA,mCAA4B,EAAC,WAAW,CAAC,CAAA;AAClD,CAAC;AAED;;GAEG;AACH,SAAgB,OAAO;IACrB,OAAO,IAAA,mCAA4B,EAAC,SAAS,CAAC,CAAA;AAChD,CAAC;AAED;;;;GAIG;AACH,SAAgB,WAAW,CAAC,KAAc;IACxC,OAAO,IAAA,mCAA4B,EAAC,cAAc,CAAC,CAAA;AACrD,CAAC;AAED;;;;GAIG;AACH,SAAgB,IAAI,CAAC,KAAc;IACjC,OAAO,IAAA,mCAA4B,EAAC,MAAM,CAAC,CAAA;AAC7C,CAAC;AAED;;;;GAIG;AACH,SAAgB,KAAK,CAAC,KAAc;IAClC,OAAO,IAAA,mCAA4B,EAAC,OAAO,CAAC,CAAA;AAC9C,CAAC;AAED;;GAEG;AACH,SAAgB,OAAO;IACrB,OAAO,IAAA,mCAA4B,EAAC,SAAS,CAAC,CAAA;AAChD,CAAC;AAED;;;;GAIG;AACH,SAAgB,MAAM,CAAC,KAAc;IACnC,OAAO,IAAA,mCAA4B,EAAC,QAAQ,CAAC,CAAA;AAC/C,CAAC;AAED;;GAEG;AACH,SAAgB,MAAM;IACpB,OAAO,IAAA,mCAA4B,EAAC,QAAQ,CAAC,CAAA;AAC/C,CAAC;AAED;;;;GAIG;AACH,SAAgB,YAAY,CAAC,KAAc;IACzC,OAAO,IAAA,mCAA4B,EAAC,eAAe,CAAC,CAAA;AACtD,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,KAAc;IAC1C,OAAO,IAAA,mCAA4B,EAAC,gBAAgB,CAAC,CAAA;AACvD,CAAC;AAED;;;;GAIG;AACH,SAAgB,SAAS,CAAC,KAAc;IACtC,OAAO,IAAA,mCAA4B,EAAC,YAAY,CAAC,CAAA;AACnD,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAC,MAAc;IACrC,OAAO,IAAA,gCAAyB,EAAC,UAAU,CAAC,CAAA;AAC9C,CAAC"}
@@ -4,15 +4,12 @@ exports.SuccessResponse = SuccessResponse;
4
4
  exports.Response = Response;
5
5
  exports.Res = Res;
6
6
  exports.Produces = Produces;
7
+ const noop_1 = require("./noop");
7
8
  function SuccessResponse(_name, _description, _produces) {
8
- return () => {
9
- return;
10
- };
9
+ return (0, noop_1.createNoopMethodDecorator)('success-response');
11
10
  }
12
11
  function Response(_name, _description, _example, _produces) {
13
- return () => {
14
- return;
15
- };
12
+ return (0, noop_1.createNoopClassMethodDecorator)('response');
16
13
  }
17
14
  /**
18
15
  * Inject a library-agnostic responder function that can be used to construct type-checked (usually error-) responses.
@@ -20,9 +17,7 @@ function Response(_name, _description, _example, _produces) {
20
17
  * The type of the responder function should be annotated `TsoaResponse<Status, Data, Headers>` in order to support OpenAPI documentation.
21
18
  */
22
19
  function Res() {
23
- return () => {
24
- return;
25
- };
20
+ return (0, noop_1.createNoopParameterDecorator)('res');
26
21
  }
27
22
  /**
28
23
  * Overrides the default media type of response.
@@ -31,8 +26,6 @@ function Res() {
31
26
  * @link https://swagger.io/docs/specification/media-types/
32
27
  */
33
28
  function Produces(_value) {
34
- return () => {
35
- return;
36
- };
29
+ return (0, noop_1.createNoopClassMethodDecorator)('produces');
37
30
  }
38
31
  //# sourceMappingURL=response.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"response.js","sourceRoot":"","sources":["../../src/decorators/response.ts"],"names":[],"mappings":";;AAGA,0CAIC;AAED,4BASC;AAOD,kBAIC;AAQD,4BAIC;AAtCD,SAAgB,eAAe,CAAwD,KAAsB,EAAE,YAAqB,EAAE,SAA6B;IACjK,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED,SAAgB,QAAQ,CACtB,KAA4F,EAC5F,YAAqB,EACrB,QAAsB,EACtB,SAA6B;IAE7B,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,GAAG;IACjB,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,MAAc;IACrC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../src/decorators/response.ts"],"names":[],"mappings":";;AAIA,0CAEC;AAED,4BAOC;AAOD,kBAEC;AAQD,4BAEC;AAhCD,iCAAgH;AAEhH,SAAgB,eAAe,CAAwD,KAAsB,EAAE,YAAqB,EAAE,SAA6B;IACjK,OAAO,IAAA,gCAAyB,EAAC,kBAAkB,CAAC,CAAA;AACtD,CAAC;AAED,SAAgB,QAAQ,CACtB,KAA4F,EAC5F,YAAqB,EACrB,QAAsB,EACtB,SAA6B;IAE7B,OAAO,IAAA,qCAA8B,EAAC,UAAU,CAAC,CAAA;AACnD,CAAC;AAED;;;;GAIG;AACH,SAAgB,GAAG;IACjB,OAAO,IAAA,mCAA4B,EAAC,KAAK,CAAC,CAAA;AAC5C,CAAC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,MAAc;IACrC,OAAO,IAAA,qCAA8B,EAAC,UAAU,CAAC,CAAA;AACnD,CAAC"}
@@ -2,17 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Route = Route;
4
4
  exports.Hidden = Hidden;
5
+ const noop_1 = require("./noop");
5
6
  function Route(_name) {
6
- return () => {
7
- return;
8
- };
7
+ return (0, noop_1.createNoopClassDecorator)('route');
9
8
  }
10
9
  /**
11
10
  * can be used to entirely hide an method from documentation
12
11
  */
13
12
  function Hidden() {
14
- return () => {
15
- return;
16
- };
13
+ return (0, noop_1.createNoopHiddenDecorator)('hidden');
17
14
  }
18
15
  //# sourceMappingURL=route.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"route.js","sourceRoot":"","sources":["../../src/decorators/route.ts"],"names":[],"mappings":";;AAAA,sBAIC;AAKD,wBAIC;AAbD,SAAgB,KAAK,CAAC,KAAc;IAClC,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,MAAM;IACpB,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"route.js","sourceRoot":"","sources":["../../src/decorators/route.ts"],"names":[],"mappings":";;AAEA,sBAEC;AAKD,wBAEC;AAXD,iCAA4E;AAE5E,SAAgB,KAAK,CAAC,KAAc;IAClC,OAAO,IAAA,+BAAwB,EAAC,OAAO,CAAC,CAAA;AAC1C,CAAC;AAED;;GAEG;AACH,SAAgB,MAAM;IACpB,OAAO,IAAA,gCAAyB,EAAC,QAAQ,CAAC,CAAA;AAC5C,CAAC"}
@@ -2,20 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NoSecurity = NoSecurity;
4
4
  exports.Security = Security;
5
+ const noop_1 = require("./noop");
5
6
  /**
6
7
  * Can be used to indicate that a method requires no security.
7
8
  */
8
9
  function NoSecurity() {
9
- return () => {
10
- return;
11
- };
10
+ return (0, noop_1.createNoopClassMethodDecorator)('no-security');
12
11
  }
13
12
  /**
14
13
  * @param {name} security name from securityDefinitions
15
14
  */
16
15
  function Security(_name, _scopes) {
17
- return () => {
18
- return;
19
- };
16
+ return (0, noop_1.createNoopClassMethodDecorator)('security');
20
17
  }
21
18
  //# sourceMappingURL=security.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"security.js","sourceRoot":"","sources":["../../src/decorators/security.ts"],"names":[],"mappings":";;AAGA,gCAIC;AAKD,4BAIC;AAhBD;;GAEG;AACH,SAAgB,UAAU;IACxB,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,QAAQ,CAAC,KAA4C,EAAE,OAAkB;IACvF,OAAO,GAAG,EAAE;QACV,OAAM;IACR,CAAC,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"security.js","sourceRoot":"","sources":["../../src/decorators/security.ts"],"names":[],"mappings":";;AAKA,gCAEC;AAKD,4BAEC;AAdD,iCAAuD;AAEvD;;GAEG;AACH,SAAgB,UAAU;IACxB,OAAO,IAAA,qCAA8B,EAAC,aAAa,CAAC,CAAA;AACtD,CAAC;AAED;;GAEG;AACH,SAAgB,QAAQ,CAAC,KAA4C,EAAE,OAAkB;IACvF,OAAO,IAAA,qCAA8B,EAAC,UAAU,CAAC,CAAA;AACnD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Readable } from 'stream';
1
+ import { Readable } from 'node:stream';
2
2
  /** Object containing file metadata and access information. */
3
3
  export interface File {
4
4
  /** Name of the form field associated with this file. */
@@ -40,17 +40,40 @@ type ValidateArrayOptions = {
40
40
  metadata?: ParameterValidationMetadata;
41
41
  };
42
42
  type ValidateArrayTupleArgs = [string, unknown, FieldErrors, boolean, TsoaRoute.PropertySchema?, ArrayValidator?, string?, ParameterValidationMetadata?];
43
- export declare function ValidateParam<TValue>(property: TsoaRoute.PropertySchema, value: TValue, generatedModels: TsoaRoute.Models, name: string | undefined, fieldErrors: FieldErrors, isBodyParam: boolean, parent: string | undefined, config: AdditionalProps, metadata?: ParameterValidationMetadata): TValue;
43
+ type ValidateParamOptions<TValue> = {
44
+ property: TsoaRoute.PropertySchema;
45
+ value: TValue;
46
+ generatedModels: TsoaRoute.Models;
47
+ name?: string;
48
+ fieldErrors: FieldErrors;
49
+ isBodyParam: boolean;
50
+ parent?: string;
51
+ config: AdditionalProps;
52
+ metadata?: ParameterValidationMetadata;
53
+ };
54
+ type ValidateParamTupleArgs<TValue> = [TsoaRoute.PropertySchema, TValue, TsoaRoute.Models, string | undefined, FieldErrors, boolean, string | undefined, AdditionalProps, ParameterValidationMetadata?];
55
+ export declare function ValidateParam<TValue>(options: ValidateParamOptions<TValue>): TValue;
56
+ /**
57
+ * @deprecated Use the object overload instead.
58
+ */
59
+ export declare function ValidateParam<TValue>(...args: ValidateParamTupleArgs<TValue>): TValue;
44
60
  export declare class ValidationService {
45
61
  private readonly models;
46
62
  private readonly config;
47
- private validationStack;
63
+ private readonly validationStack;
48
64
  constructor(models: TsoaRoute.Models, config: AdditionalProps);
49
65
  private isRecord;
50
66
  private buildChildPath;
51
67
  ValidateParam<TValue>(property: TsoaRoute.PropertySchema, rawValue: TValue, name: string | undefined, fieldErrors: FieldErrors, isBodyParam: boolean, parent?: string, metadata?: ParameterValidationMetadata): TValue;
52
68
  private handleUndefinedValue;
53
69
  private getRequiredFieldMessage;
70
+ private createFieldError;
71
+ private getNumericTypeErrorMessage;
72
+ private getNumberBoundaryError;
73
+ private getDateTypeErrorMessage;
74
+ private getDateBoundaryError;
75
+ private getStringValidationError;
76
+ private coerceBooleanValue;
54
77
  private validateResolvedProperty;
55
78
  private validateExternal;
56
79
  private getRuntimeExternalValidatorMetadata;