@tsed/schema 7.85.4 → 7.86.0
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/lib/browser/schema.umd.min.js +1 -1
- package/lib/browser/schema.umd.min.js.map +1 -1
- package/lib/cjs/decorators/operations/acceptMime.js +3 -3
- package/lib/esm/decorators/operations/acceptMime.js +3 -3
- package/lib/types/decorators/operations/acceptMime.d.ts +1 -1
- package/lib/types-esm/decorators/operations/acceptMime.d.ts +1 -1
- package/package.json +8 -8
- package/readme.md +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AcceptMime = void 0;
|
|
4
4
|
const core_1 = require("@tsed/core");
|
|
5
|
-
const
|
|
5
|
+
const consumes_js_1 = require("./consumes.js");
|
|
6
6
|
/**
|
|
7
7
|
* Set a mime list which are acceptable and checks if the specified content types are acceptable, based on the request’s Accept HTTP header field.
|
|
8
8
|
*
|
|
@@ -11,7 +11,7 @@ const produces_js_1 = require("./produces.js");
|
|
|
11
11
|
* export class MyCtrl {
|
|
12
12
|
*
|
|
13
13
|
* @Get('/')
|
|
14
|
-
* @AcceptMime('application/
|
|
14
|
+
* @AcceptMime('application/x-www-form-urlencoded')
|
|
15
15
|
* public getResource(){}
|
|
16
16
|
* }
|
|
17
17
|
* ```
|
|
@@ -22,7 +22,7 @@ const produces_js_1 = require("./produces.js");
|
|
|
22
22
|
* @response
|
|
23
23
|
*/
|
|
24
24
|
function AcceptMime(...mimes) {
|
|
25
|
-
return (0, core_1.useDecorators)((0,
|
|
25
|
+
return (0, core_1.useDecorators)((0, consumes_js_1.Consumes)(...mimes), (0, core_1.StoreSet)("acceptMimes", mimes));
|
|
26
26
|
}
|
|
27
27
|
exports.AcceptMime = AcceptMime;
|
|
28
28
|
//# sourceMappingURL=acceptMime.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StoreSet, useDecorators } from "@tsed/core";
|
|
2
|
-
import {
|
|
2
|
+
import { Consumes } from "./consumes.js";
|
|
3
3
|
/**
|
|
4
4
|
* Set a mime list which are acceptable and checks if the specified content types are acceptable, based on the request’s Accept HTTP header field.
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@ import { Produces } from "./produces.js";
|
|
|
8
8
|
* export class MyCtrl {
|
|
9
9
|
*
|
|
10
10
|
* @Get('/')
|
|
11
|
-
* @AcceptMime('application/
|
|
11
|
+
* @AcceptMime('application/x-www-form-urlencoded')
|
|
12
12
|
* public getResource(){}
|
|
13
13
|
* }
|
|
14
14
|
* ```
|
|
@@ -19,6 +19,6 @@ import { Produces } from "./produces.js";
|
|
|
19
19
|
* @response
|
|
20
20
|
*/
|
|
21
21
|
export function AcceptMime(...mimes) {
|
|
22
|
-
return useDecorators(
|
|
22
|
+
return useDecorators(Consumes(...mimes), StoreSet("acceptMimes", mimes));
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=acceptMime.js.map
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/schema",
|
|
3
3
|
"description": "JsonSchema module for Ts.ED Framework",
|
|
4
4
|
"type": "commonjs",
|
|
5
|
-
"version": "7.
|
|
5
|
+
"version": "7.86.0",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/cjs/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"tsed"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@tsed/openspec": "7.
|
|
40
|
+
"@tsed/openspec": "7.86.0",
|
|
41
41
|
"change-case": "^4.1.2",
|
|
42
42
|
"fs-extra": "^11.2.0",
|
|
43
43
|
"json-schema": "0.4.0",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@apidevtools/swagger-parser": "10.1.0",
|
|
50
|
-
"@tsed/barrels": "7.
|
|
51
|
-
"@tsed/core": "7.
|
|
52
|
-
"@tsed/openspec": "7.
|
|
53
|
-
"@tsed/typescript": "7.
|
|
50
|
+
"@tsed/barrels": "7.86.0",
|
|
51
|
+
"@tsed/core": "7.86.0",
|
|
52
|
+
"@tsed/openspec": "7.86.0",
|
|
53
|
+
"@tsed/typescript": "7.86.0",
|
|
54
54
|
"@types/fs-extra": "11.0.4",
|
|
55
55
|
"@types/json-schema": "7.0.15",
|
|
56
56
|
"@types/picomatch": "2.3.3",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"vitest": "2.0.4"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@tsed/core": "7.
|
|
65
|
-
"@tsed/openspec": "7.
|
|
64
|
+
"@tsed/core": ">=7.0.0",
|
|
65
|
+
"@tsed/openspec": ">=7.0.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependenciesMeta": {
|
|
68
68
|
"@tsed/core": {
|
package/readme.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<span> • </span>
|
|
21
21
|
<a href="https://tsed.dev/getting-started/">Getting started</a>
|
|
22
22
|
<span> • </span>
|
|
23
|
-
<a href="https://
|
|
23
|
+
<a href="https://slack.tsed.dev">Slack</a>
|
|
24
24
|
<span> • </span>
|
|
25
25
|
<a href="https://twitter.com/TsED_io">Twitter</a>
|
|
26
26
|
</div>
|