@typespec/http 0.47.0-dev.1 → 0.47.0-dev.3

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,7 +7,7 @@ using TypeSpec.Reflection;
7
7
  */
8
8
  model HeaderOptions {
9
9
  /**
10
- * Name of the header when sent over http.
10
+ * Name of the header when sent over HTTP.
11
11
  */
12
12
  name?: string;
13
13
 
@@ -18,23 +18,23 @@ model HeaderOptions {
18
18
  }
19
19
 
20
20
  /**
21
- * Specify this property is to be sent or received as an http header.
21
+ * Specify this property is to be sent or received as an HTTP header.
22
22
  *
23
- * @param headerNameOrOptions Optional name of the header when sent over http or header options.
24
- * By default the header name will be the property name converted from camelCase to camel-case. (e.g. `eTag` -> `e-tag`)
23
+ * @param headerNameOrOptions Optional name of the header when sent over HTTP or header options.
24
+ * By default the header name will be the property name converted from camelCase to kebab-case. (e.g. `contentType` -> `content-type`)
25
25
  *
26
26
  * @example
27
27
  *
28
28
  * ```typespec
29
- * op read(@header accept: string): {@header("E-Tag") eTag: string};
29
+ * op read(@header accept: string): {@header("ETag") eTag: string};
30
30
  * op create(@header({name: "X-Color", format: "csv"}) colors: string[]): void;
31
31
  * ```
32
32
  *
33
33
  * @example Implicit header name
34
34
  *
35
35
  * ```typespec
36
- * op read(): {@header eTag: string}; // headerName: e-tag
37
36
  * op read(): {@header contentType: string}; // headerName: content-type
37
+ * op update(@header ifMatch: string): void; // headerName: if-match
38
38
  * ```
39
39
  */
40
40
  extern dec header(target: ModelProperty, headerNameOrOptions?: string | HeaderOptions);
@@ -107,7 +107,7 @@ extern dec body(target: ModelProperty);
107
107
  extern dec statusCode(target: ModelProperty);
108
108
 
109
109
  /**
110
- * Specify the http verb for the target operation to be `GET`.
110
+ * Specify the HTTP verb for the target operation to be `GET`.
111
111
  *
112
112
  * @example
113
113
  *
@@ -118,7 +118,7 @@ extern dec statusCode(target: ModelProperty);
118
118
  extern dec get(target: Operation);
119
119
 
120
120
  /**
121
- * Specify the http verb for the target operation to be `PUT`.
121
+ * Specify the HTTP verb for the target operation to be `PUT`.
122
122
  *
123
123
  * @example
124
124
  *
@@ -129,7 +129,7 @@ extern dec get(target: Operation);
129
129
  extern dec put(target: Operation);
130
130
 
131
131
  /**
132
- * Specify the http verb for the target operation to be `POST`.
132
+ * Specify the HTTP verb for the target operation to be `POST`.
133
133
  *
134
134
  * @example
135
135
  *
@@ -140,7 +140,7 @@ extern dec put(target: Operation);
140
140
  extern dec post(target: Operation);
141
141
 
142
142
  /**
143
- * Specify the http verb for the target operation to be `PATCH`.
143
+ * Specify the HTTP verb for the target operation to be `PATCH`.
144
144
  *
145
145
  * @example
146
146
  *
@@ -151,7 +151,7 @@ extern dec post(target: Operation);
151
151
  extern dec patch(target: Operation);
152
152
 
153
153
  /**
154
- * Specify the http verb for the target operation to be `DELETE`.
154
+ * Specify the HTTP verb for the target operation to be `DELETE`.
155
155
  *
156
156
  * @example
157
157
  *
@@ -162,7 +162,7 @@ extern dec patch(target: Operation);
162
162
  extern dec delete(target: Operation);
163
163
 
164
164
  /**
165
- * Specify the http verb for the target operation to be `HEAD`.
165
+ * Specify the HTTP verb for the target operation to be `HEAD`.
166
166
  * @example
167
167
  *
168
168
  * ```typespec
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/http",
3
- "version": "0.47.0-dev.1",
3
+ "version": "0.47.0-dev.3",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec HTTP protocol binding",
6
6
  "homepage": "https://github.com/microsoft/typespec",
@@ -51,6 +51,7 @@
51
51
  "@typespec/eslint-config-typespec": "~0.46.0 || >=0.47.0-dev <0.47.0",
52
52
  "@typespec/library-linter": "~0.46.0 || >=0.47.0-dev <0.47.0",
53
53
  "@typespec/eslint-plugin": "~0.46.0 || >=0.47.0-dev <0.47.0",
54
+ "@typespec/tspd": "~0.46.0 || >=0.47.0-dev <0.47.0",
54
55
  "eslint": "^8.42.0",
55
56
  "mocha": "~10.2.0",
56
57
  "mocha-junit-reporter": "~2.2.0",
@@ -68,6 +69,7 @@
68
69
  "test": "mocha",
69
70
  "test-official": "c8 mocha --forbid-only --reporter mocha-multi-reporters",
70
71
  "lint": "eslint . --ext .ts --max-warnings=0",
71
- "lint:fix": "eslint . --fix --ext .ts"
72
+ "lint:fix": "eslint . --fix --ext .ts",
73
+ "regen-docs": "tspd doc . --enable-experimental --output-dir ../../docs/standard-library/http/reference"
72
74
  }
73
75
  }