@typespec/http 0.51.0-dev.2 → 0.51.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/README.md
CHANGED
|
@@ -28,9 +28,9 @@ Available ruleSets:
|
|
|
28
28
|
|
|
29
29
|
### Rules
|
|
30
30
|
|
|
31
|
-
| Name
|
|
32
|
-
|
|
|
33
|
-
| [`@typespec/http/op-reference-container-route`](https://microsoft.github.io/typespec/
|
|
31
|
+
| Name | Description |
|
|
32
|
+
| --------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
33
|
+
| [`@typespec/http/op-reference-container-route`](https://microsoft.github.io/typespec/libraries/http/rules/op-reference-container-route) | Check for referenced (`op is`) operations which have a @route on one of their containers. |
|
|
34
34
|
|
|
35
35
|
## Decorators
|
|
36
36
|
|
|
@@ -447,7 +447,7 @@ op create(): {@statusCode: 201 | 202}
|
|
|
447
447
|
|
|
448
448
|
#### `@useAuth`
|
|
449
449
|
|
|
450
|
-
Specify this service authentication. See the [documentation in the Http library](https://microsoft.github.io/typespec/
|
|
450
|
+
Specify this service authentication. See the [documentation in the Http library](https://microsoft.github.io/typespec/libraries/http/authentication) for full details.
|
|
451
451
|
|
|
452
452
|
```typespec
|
|
453
453
|
@TypeSpec.Http.useAuth(auth: {} | Union | {}[])
|
|
@@ -4,7 +4,7 @@ export const opReferenceContainerRouteRule = createRule({
|
|
|
4
4
|
name: "op-reference-container-route",
|
|
5
5
|
severity: "warning",
|
|
6
6
|
description: "Check for referenced (`op is`) operations which have a @route on one of their containers.",
|
|
7
|
-
url: "https://microsoft.github.io/typespec/
|
|
7
|
+
url: "https://microsoft.github.io/typespec/libraries/http/rules/op-reference-container-route",
|
|
8
8
|
messages: {
|
|
9
9
|
default: paramMessage `Operation ${"opName"} references an operation which has a @route prefix on its namespace or interface: "${"routePrefix"}". This operation will not carry forward the route prefix so the final route may be different than the referenced operation.`,
|
|
10
10
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"op-reference-container-route.js","sourceRoot":"","sources":["../../../src/rules/op-reference-container-route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,CAAC,MAAM,6BAA6B,GAAG,UAAU,CAAC;IACtD,IAAI,EAAE,8BAA8B;IACpC,QAAQ,EAAE,SAAS;IACnB,WAAW,EACT,2FAA2F;IAC7F,GAAG,EAAE
|
|
1
|
+
{"version":3,"file":"op-reference-container-route.js","sourceRoot":"","sources":["../../../src/rules/op-reference-container-route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,CAAC,MAAM,6BAA6B,GAAG,UAAU,CAAC;IACtD,IAAI,EAAE,8BAA8B;IACpC,QAAQ,EAAE,SAAS;IACnB,WAAW,EACT,2FAA2F;IAC7F,GAAG,EAAE,wFAAwF;IAC7F,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY,CAAA,aAAa,QAAQ,sFAAsF,aAAa,+HAA+H;KAC7Q;IACD,MAAM,CAAC,OAAO;QACZ,4EAA4E;QAC5E,6EAA6E;QAC7E,sDAAsD;QACtD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAiC,CAAC;QAE5D,SAAS,uBAAuB,CAC9B,SAAqD;;YAErD,IAAI,SAAS,KAAK,SAAS,EAAE;gBAC3B,OAAO,SAAS,CAAC;aAClB;YAED,IAAI,SAAS,CAAC,IAAI,KAAK,WAAW,EAAE;gBAClC,OAAO,CACL,MAAA,uBAAuB,CAAC,SAAS,CAAC,SAAS,CAAC,mCAC5C,uBAAuB,CAAC,SAAS,CAAC,SAAS,CAAC,CAC7C,CAAC;aACH;YAED,MAAM,KAAK,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tsp
CHANGED
|
@@ -202,7 +202,7 @@ extern dec server(
|
|
|
202
202
|
);
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
|
-
* Specify this service authentication. See the [documentation in the Http library](https://microsoft.github.io/typespec/
|
|
205
|
+
* Specify this service authentication. See the [documentation in the Http library](https://microsoft.github.io/typespec/libraries/http/authentication) for full details.
|
|
206
206
|
*
|
|
207
207
|
* @param auth Authentication configuration. Can be a single security scheme, a union(either option is valid authentication) or a tuple(Must use all authentication together)
|
|
208
208
|
* @example
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/http",
|
|
3
|
-
"version": "0.51.0
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec HTTP protocol binding",
|
|
6
6
|
"homepage": "https://github.com/microsoft/typespec",
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"!dist/test/**"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@typespec/compiler": "~0.
|
|
42
|
+
"@typespec/compiler": "~0.51.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/mocha": "~10.0.1",
|
|
46
46
|
"@types/node": "~18.11.9",
|
|
47
|
-
"@typespec/compiler": "~0.
|
|
48
|
-
"@typespec/eslint-config-typespec": "~0.
|
|
49
|
-
"@typespec/library-linter": "~0.
|
|
50
|
-
"@typespec/eslint-plugin": "~0.
|
|
51
|
-
"@typespec/tspd": "~0.46.0
|
|
47
|
+
"@typespec/compiler": "~0.51.0",
|
|
48
|
+
"@typespec/eslint-config-typespec": "~0.51.0",
|
|
49
|
+
"@typespec/library-linter": "~0.51.0",
|
|
50
|
+
"@typespec/eslint-plugin": "~0.51.0",
|
|
51
|
+
"@typespec/tspd": "~0.46.0",
|
|
52
52
|
"eslint": "^8.49.0",
|
|
53
53
|
"mocha": "~10.2.0",
|
|
54
54
|
"mocha-junit-reporter": "~2.2.1",
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
"rimraf": "~5.0.1",
|
|
58
58
|
"typescript": "~5.2.2"
|
|
59
59
|
},
|
|
60
|
-
"dependencies": {},
|
|
61
60
|
"scripts": {
|
|
62
61
|
"clean": "rimraf ./dist ./temp",
|
|
63
62
|
"build": "tsc -p . && npm run lint-typespec-library",
|
|
@@ -67,6 +66,6 @@
|
|
|
67
66
|
"test-official": "c8 mocha --forbid-only --reporter mocha-multi-reporters",
|
|
68
67
|
"lint": "eslint . --ext .ts --max-warnings=0",
|
|
69
68
|
"lint:fix": "eslint . --fix --ext .ts",
|
|
70
|
-
"regen-docs": "tspd doc . --enable-experimental --output-dir ../../docs/
|
|
69
|
+
"regen-docs": "tspd doc . --enable-experimental --output-dir ../../docs/libraries/http/reference"
|
|
71
70
|
}
|
|
72
71
|
}
|