@typespec/http 0.44.0 → 0.45.0-dev.1
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/auth.tsp +4 -0
- package/lib/http.tsp +2 -0
- package/package.json +7 -6
package/lib/auth.tsp
CHANGED
|
@@ -23,6 +23,7 @@ enum AuthType {
|
|
|
23
23
|
* Authorization: Basic ZGVtbzpwQDU1dzByZA==
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
+
@doc("")
|
|
26
27
|
model BasicAuth {
|
|
27
28
|
@doc("Http authentication")
|
|
28
29
|
type: AuthType.http;
|
|
@@ -39,6 +40,7 @@ model BasicAuth {
|
|
|
39
40
|
* Authorization: Bearer <token>
|
|
40
41
|
* ```
|
|
41
42
|
*/
|
|
43
|
+
@doc("")
|
|
42
44
|
model BearerAuth {
|
|
43
45
|
@doc("Http authentication")
|
|
44
46
|
type: AuthType.http;
|
|
@@ -83,6 +85,7 @@ enum ApiKeyLocation {
|
|
|
83
85
|
* @template TLocation The location of the API key
|
|
84
86
|
* @template TName The name of the API key
|
|
85
87
|
*/
|
|
88
|
+
@doc("")
|
|
86
89
|
model ApiKeyAuth<TLocation extends ApiKeyLocation, TName extends string> {
|
|
87
90
|
@doc("API key authentication")
|
|
88
91
|
type: AuthType.apiKey;
|
|
@@ -101,6 +104,7 @@ model ApiKeyAuth<TLocation extends ApiKeyLocation, TName extends string> {
|
|
|
101
104
|
* For more information about OAuth 2.0, see oauth.net and RFC 6749.
|
|
102
105
|
* @template TFlows The list of supported OAuth2 flows
|
|
103
106
|
*/
|
|
107
|
+
@doc("")
|
|
104
108
|
model OAuth2Auth<TFlows extends OAuth2Flow[]> {
|
|
105
109
|
@doc("OAuth2 authentication")
|
|
106
110
|
type: AuthType.oauth2;
|
package/lib/http.tsp
CHANGED
|
@@ -11,6 +11,7 @@ using Private;
|
|
|
11
11
|
*
|
|
12
12
|
* @template Status The status code of the response.
|
|
13
13
|
*/
|
|
14
|
+
@doc("")
|
|
14
15
|
model Response<Status> {
|
|
15
16
|
@doc("The status code.")
|
|
16
17
|
@statusCode
|
|
@@ -25,6 +26,7 @@ model Response<Status> {
|
|
|
25
26
|
*
|
|
26
27
|
* @template T The type of the model's `body` property.
|
|
27
28
|
*/
|
|
29
|
+
@doc("")
|
|
28
30
|
model Body<T> {
|
|
29
31
|
@body
|
|
30
32
|
body: T;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/http",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0-dev.1",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec HTTP protocol binding",
|
|
6
6
|
"homepage": "https://github.com/Microsoft/typespec",
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
"!dist/test/**"
|
|
43
43
|
],
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@typespec/compiler": "~0.44.0"
|
|
45
|
+
"@typespec/compiler": "~0.44.0 || >=0.45.0-dev <0.45.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/mocha": "~10.0.0",
|
|
49
49
|
"@types/node": "~18.11.9",
|
|
50
|
-
"@typespec/compiler": "~0.44.0",
|
|
51
|
-
"@typespec/eslint-config-typespec": "~0.7.0",
|
|
52
|
-
"@typespec/library-linter": "~0.44.0",
|
|
53
|
-
"@typespec/eslint-plugin": "~0.44.0",
|
|
50
|
+
"@typespec/compiler": "~0.44.0 || >=0.45.0-dev <0.45.0",
|
|
51
|
+
"@typespec/eslint-config-typespec": "~0.7.0 || >=0.8.0-dev <0.8.0",
|
|
52
|
+
"@typespec/library-linter": "~0.44.0 || >=0.45.0-dev <0.45.0",
|
|
53
|
+
"@typespec/eslint-plugin": "~0.44.0 || >=0.45.0-dev <0.45.0",
|
|
54
54
|
"eslint": "^8.36.0",
|
|
55
55
|
"mocha": "~10.2.0",
|
|
56
56
|
"mocha-junit-reporter": "~2.2.0",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"rimraf": "~5.0.0",
|
|
60
60
|
"typescript": "~5.0.2"
|
|
61
61
|
},
|
|
62
|
+
"dependencies": {},
|
|
62
63
|
"scripts": {
|
|
63
64
|
"clean": "rimraf ./dist ./temp",
|
|
64
65
|
"build": "tsc -p . && npm run lint-typespec-library",
|