@azure-tools/typespec-azure-core 0.31.0-dev.13 → 0.31.0-dev.14

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.
Files changed (2) hide show
  1. package/lib/models.tsp +58 -5
  2. package/package.json +1 -1
package/lib/models.tsp CHANGED
@@ -156,7 +156,7 @@ into responses and item models to convey the ETag when it cannot simply conveyed
156
156
  model EtagProperty {
157
157
  @visibility("read")
158
158
  @doc("The entity tag for this resource.")
159
- etag: string;
159
+ etag: eTag;
160
160
  }
161
161
 
162
162
  @doc("Provides the 'ETag' header to enable conditional (cached) requests")
@@ -194,17 +194,70 @@ model RepeatabilityResponseHeaders {
194
194
 
195
195
  @doc("Provides the 'x-ms-client-request-id' header to enable request correlation in requests and responses.")
196
196
  model ClientRequestIdHeader {
197
- @format("UUID")
198
197
  @header("x-ms-client-request-id")
199
198
  @doc("An opaque, globally-unique, client-generated string identifier for the request.")
200
- clientRequestId?: string;
199
+ clientRequestId?: uuid;
201
200
  }
202
201
 
203
202
  @doc("Provides the 'x-ms-request-id' header to enable request correlation in responses.")
204
203
  model RequestIdResponseHeader {
205
- @format("UUID")
206
204
  @visibility("read")
207
205
  @header("x-ms-request-id")
208
206
  @doc("An opaque, globally-unique, server-generated string identifier for the request.")
209
- requestId?: string;
207
+ requestId?: uuid;
210
208
  }
209
+
210
+ /**
211
+ * Universally Unique Identifier
212
+ *
213
+ * @example
214
+ *
215
+ * ```
216
+ * 123e4567-e89b-12d3-a456-426614174000
217
+ * ```
218
+ */
219
+ @format("uuid")
220
+ scalar uuid extends string;
221
+
222
+ /**
223
+ * Represent an IP V4 address serialized as a string.
224
+ *
225
+ * It is formatted as four 8-bit fields separated by periods.
226
+ *
227
+ * @example
228
+ *
229
+ * ```
230
+ * 129.144.50.56
231
+ * ```
232
+ */
233
+ @format("ipV4Address")
234
+ scalar ipV4Address extends string;
235
+
236
+ /**
237
+ * Represent an IP V6 address serialized as a string.
238
+ *
239
+ * It is formatted as eight hex decimal values(16-bit) between 0 and FFFF separated by colon. (i.e. `y:y:y:y:y:y:y:y`)
240
+ *
241
+ * @example
242
+ *
243
+ * ```
244
+ * 2001:db8:3333:4444:CCCC:DDDD:EEEE:FFFF
245
+ * ```
246
+ */
247
+ @format("ipV6Address")
248
+ scalar ipV6Address extends string;
249
+
250
+ /**
251
+ * The ETag (or entity tag) HTTP response header is an identifier for a specific version of a resource.
252
+ * It lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content was not changed.
253
+ *
254
+ * It is a string of ASCII characters placed between double quotes, like "675af34563dc-tr34".
255
+ *
256
+ * @example In `ETag` header
257
+ *
258
+ * ```
259
+ * ETag: "675af34563dc-tr34"
260
+ * ```
261
+ */
262
+ @format("eTag")
263
+ scalar eTag extends string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/typespec-azure-core",
3
- "version": "0.31.0-dev.13",
3
+ "version": "0.31.0-dev.14",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Core library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",