@azure-tools/typespec-azure-core 0.71.0-dev.4 → 0.71.0-dev.5

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 CHANGED
@@ -19,9 +19,16 @@ namespace Azure.Core;
19
19
  */
20
20
  model AadTokenAuthFlow<Scopes extends string[], AuthUrl extends string, TokenUrl extends string>
21
21
  extends TypeSpec.Http.AuthorizationCodeFlow {
22
+ /** The OAuth2 flow type, always the authorization code flow. */
22
23
  type: OAuth2FlowType.authorizationCode;
24
+
25
+ /** The authorization URL used to obtain an authorization code. */
23
26
  authorizationUrl: AuthUrl;
27
+
28
+ /** The token URL used to exchange the authorization code for a token. */
24
29
  tokenUrl: TokenUrl;
30
+
31
+ /** The list of scopes the token applies to. */
25
32
  scopes: Scopes;
26
33
  }
27
34
 
@@ -80,7 +80,7 @@ alias ResourceCreatedOrOkResponse<Resource extends TypeSpec.Reflection.Model> =
80
80
 
81
81
  /**
82
82
  * Response describing the location of a created resource.
83
- * @template T The type of the created resource.
83
+ * @template Resource The type of the created resource.
84
84
  */
85
85
  model LocationOfCreatedResourceResponse<Resource extends TypeSpec.Reflection.Model>
86
86
  is TypeSpec.Http.CreatedResponse {
@@ -91,7 +91,7 @@ model LocationOfCreatedResourceResponse<Resource extends TypeSpec.Reflection.Mod
91
91
 
92
92
  /**
93
93
  * Response describing the location of a resource created with a service-provided name.
94
- * @template T The type of the created resource.
94
+ * @template Resource The type of the created resource.
95
95
  */
96
96
  model LocationOfCreatedResourceWithServiceProvidedNameResponse<Resource extends TypeSpec.Reflection.Model>
97
97
  is TypeSpec.Http.AcceptedResponse {
package/lib/legacy.tsp CHANGED
@@ -18,6 +18,8 @@ namespace Azure.Core.Legacy;
18
18
  * @nextLink nextLink: Azure.Core.Legacy.parameterizedNextLink<[ListCertificateOptions.includePending]>;
19
19
  * }
20
20
  * ```
21
+ *
22
+ * @template ParameterizedParams The model properties whose values must be reapplied to the next link.
21
23
  */
22
24
  @Azure.Core.Foundations.Private.parameterizedNextLinkConfig(ParameterizedParams)
23
25
  scalar parameterizedNextLink<ParameterizedParams extends TypeSpec.Reflection.ModelProperty[]>
package/lib/models.tsp CHANGED
@@ -38,11 +38,12 @@ model RequestParameter<Name extends valueof string> {}
38
38
  model ResponseProperty<Name extends valueof string> {}
39
39
 
40
40
  /**
41
- * @dev Provides the status of a resource operation.
41
+ * Provides the status of a resource operation.
42
42
  * @template Resource The resource type.
43
43
  * @template StatusResult Model describing the status result object. If not specified, the default is the resource type.
44
44
  * @template StatusError Model describing the status error object. If not specified, the default is the Foundations.Error.
45
45
  */
46
+ @doc("Provides status details for long running operations.")
46
47
  @resource("operations")
47
48
  @parentResource(Resource)
48
49
  model ResourceOperationStatus<
@@ -383,6 +384,7 @@ scalar armResourceIdentifier<AllowedResourceTypes extends ArmResourceIdentifierA
383
384
  extends string;
384
385
 
385
386
  // Consider replacing `*`
387
+ /** The deployment scopes in which an Azure Resource Manager resource identifier may be used. */
386
388
  union ArmResourceDeploymentScope {
387
389
  "Tenant",
388
390
  "Subscription",
@@ -401,6 +403,7 @@ alias AllArmResourceDeploymentScopes = [
401
403
  "Extension"
402
404
  ];
403
405
 
406
+ /** Describes a resource type, and the scopes it applies to, that an `armResourceIdentifier` is allowed to refer to. */
404
407
  model ArmResourceIdentifierAllowedResource {
405
408
  /** The type of resource that is being referred to. For example Microsoft.Network/virtualNetworks or Microsoft.Network/virtualNetworks/subnets. See Example Types for more examples. */
406
409
  type: armResourceType;
package/lib/traits.tsp CHANGED
@@ -62,6 +62,7 @@ model TraitOverride<Trait extends Model> {}
62
62
  @trait
63
63
  @Private.ensureAllQueryParams(Parameters)
64
64
  model QueryParametersTrait<Parameters extends Model, Contexts = unknown> {
65
+ /** The query parameters contributed by this trait. */
65
66
  @traitContext(Contexts)
66
67
  queryParams: {
67
68
  @traitLocation(TraitLocation.Parameters)
@@ -87,6 +88,7 @@ model ListQueryParametersTrait<Parameters extends Model> is QueryParametersTrait
87
88
  @trait
88
89
  @Private.ensureAllHeaderParams(Headers)
89
90
  model RequestHeadersTrait<Headers extends Model, Contexts = unknown> {
91
+ /** The request headers contributed by this trait. */
90
92
  @traitContext(Contexts)
91
93
  requestHeaders: {
92
94
  @traitLocation(TraitLocation.Parameters)
@@ -102,6 +104,7 @@ model RequestHeadersTrait<Headers extends Model, Contexts = unknown> {
102
104
  @trait
103
105
  @Private.ensureAllHeaderParams(Headers)
104
106
  model ResponseHeadersTrait<Headers extends Model, Contexts = unknown> {
107
+ /** The response headers contributed by this trait. */
105
108
  @traitContext(Contexts)
106
109
  responseHeaders: {
107
110
  @traitLocation(TraitLocation.Response)
@@ -115,6 +118,7 @@ model ResponseHeadersTrait<Headers extends Model, Contexts = unknown> {
115
118
  */
116
119
  @trait("VersionParameter")
117
120
  model VersionParameterTrait<VersionParameter> {
121
+ /** The API version parameter contributed by this trait. */
118
122
  versionParameter: {
119
123
  @traitLocation(TraitLocation.ApiVersionParameter)
120
124
  apiVersionParam: VersionParameter;
@@ -129,6 +133,7 @@ model VersionParameterTrait<VersionParameter> {
129
133
  @trait("ClientRequestId")
130
134
  @traitAdded(VersionAdded)
131
135
  model SupportsClientRequestId<VersionAdded extends EnumMember | null = null> {
136
+ /** The client request id headers contributed by this trait. */
132
137
  #suppress "@azure-tools/typespec-providerhub/no-inline-model" "This inline model is never used directly in operations."
133
138
  clientRequestId: {
134
139
  @traitLocation(TraitLocation.Parameters)
@@ -144,6 +149,7 @@ model SupportsClientRequestId<VersionAdded extends EnumMember | null = null> {
144
149
  */
145
150
  @trait("ClientRequestId")
146
151
  model NoClientRequestId {
152
+ /** Empty, indicating that client request id headers are not supported. */
147
153
  clientRequestId: {};
148
154
  }
149
155
 
@@ -155,6 +161,7 @@ model NoClientRequestId {
155
161
  @trait("ConditionalRequests")
156
162
  @traitAdded(VersionAdded)
157
163
  model SupportsConditionalRequests<VersionAdded extends EnumMember | null = null> {
164
+ /** The conditional request headers and ETag headers contributed by this trait. */
158
165
  #suppress "@azure-tools/typespec-providerhub/no-inline-model" "This inline model is never used directly in operations."
159
166
  conditionalRequests: {
160
167
  @traitContext(
@@ -174,6 +181,7 @@ model SupportsConditionalRequests<VersionAdded extends EnumMember | null = null>
174
181
  */
175
182
  @trait("ConditionalRequests")
176
183
  model NoConditionalRequests {
184
+ /** Empty, indicating that conditional requests are not supported. */
177
185
  conditionalRequests: {};
178
186
  }
179
187
 
@@ -185,6 +193,7 @@ model NoConditionalRequests {
185
193
  @trait("RepeatableRequests")
186
194
  @traitAdded(VersionAdded)
187
195
  model SupportsRepeatableRequests<VersionAdded extends EnumMember | null = null> {
196
+ /** The repeatable request headers contributed by this trait. */
188
197
  #suppress "@azure-tools/typespec-providerhub/no-inline-model" "This inline model is never used directly in operations."
189
198
  @traitContext(
190
199
  TraitContext.Create | TraitContext.Update | TraitContext.Delete | TraitContext.Action
@@ -203,6 +212,7 @@ model SupportsRepeatableRequests<VersionAdded extends EnumMember | null = null>
203
212
  */
204
213
  @trait("RepeatableRequests")
205
214
  model NoRepeatableRequests {
215
+ /** Empty, indicating that repeatable requests are not supported. */
206
216
  repeatableRequests: {};
207
217
  }
208
218
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/typespec-azure-core",
3
- "version": "0.71.0-dev.4",
3
+ "version": "0.71.0-dev.5",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Core library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",
@@ -59,11 +59,11 @@
59
59
  "typescript": "~6.0.2",
60
60
  "vitest": "^4.1.3",
61
61
  "@typespec/compiler": "^1.14.0",
62
- "@typespec/http": "^1.14.0",
63
- "@typespec/openapi": "^1.14.0",
64
62
  "@typespec/library-linter": "^0.84.0",
65
- "@typespec/tspd": "^0.76.0",
63
+ "@typespec/openapi": "^1.14.0",
64
+ "@typespec/http": "^1.14.0",
66
65
  "@typespec/rest": "^0.84.0",
66
+ "@typespec/tspd": "^0.76.0",
67
67
  "@typespec/versioning": "^0.84.0"
68
68
  },
69
69
  "scripts": {