@azure-tools/typespec-azure-core 0.38.0-dev.5 → 0.38.0-dev.7

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
@@ -100,9 +100,9 @@ Identifies a ModelProperty as containing the final location for the operation re
100
100
 
101
101
  ##### Parameters
102
102
 
103
- | Name | Type | Description |
104
- | ----------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
105
- | finalResult | `union Model \| void` | Sets the expected return value for the final result. Overrides<br />any value provided in the decorated property, if the property uses ResourceLocation<T>. |
103
+ | Name | Type | Description |
104
+ | ----------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
105
+ | finalResult | `union Model \| void` | Sets the expected return value for the final result. Overrides<br />any value provided in the decorated property, if the property uses ResourceLocation<Resource>. |
106
106
 
107
107
  #### `@finalOperation`
108
108
 
@@ -118,10 +118,10 @@ Identifies that an operation is the final operation for an LRO.
118
118
 
119
119
  ##### Parameters
120
120
 
121
- | Name | Type | Description |
122
- | --------------- | ----------- | ------------------------------------------------------------------------------------------------------------------- |
123
- | linkedOperation | `Operation` | The linked Operation |
124
- | parameters | `model {}` | Map of `RequestParameter<T>` and/or `ResponseProperty<T>` that will<br />be passed to the linked operation request. |
121
+ | Name | Type | Description |
122
+ | --------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- |
123
+ | linkedOperation | `Operation` | The linked Operation |
124
+ | parameters | `model {}` | Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will<br />be passed to the linked operation request. |
125
125
 
126
126
  #### `@fixed`
127
127
 
@@ -291,10 +291,10 @@ Identifies that an operation is used to retrieve the next page for paged operati
291
291
 
292
292
  ##### Parameters
293
293
 
294
- | Name | Type | Description |
295
- | --------------- | ----------- | ------------------------------------------------------------------------------------------------------------------- |
296
- | linkedOperation | `Operation` | The linked Operation |
297
- | parameters | `model {}` | Map of `RequestParameter<T>` and/or `ResponseProperty<T>` that will<br />be passed to the linked operation request. |
294
+ | Name | Type | Description |
295
+ | --------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- |
296
+ | linkedOperation | `Operation` | The linked Operation |
297
+ | parameters | `model {}` | Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will<br />be passed to the linked operation request. |
298
298
 
299
299
  #### `@operationLink`
300
300
 
@@ -310,11 +310,11 @@ Identifies an operation that is linked to the target operation.
310
310
 
311
311
  ##### Parameters
312
312
 
313
- | Name | Type | Description |
314
- | --------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------- |
315
- | linkedOperation | `Operation` | The linked Operation |
316
- | linkType | `valueof scalar string` | A string indicating the role of the linked operation |
317
- | parameters | `model {}` | Map of `RequestParameter<T>` and/or `ResponseProperty<T>` that will<br />be passed to the linked operation request. |
313
+ | Name | Type | Description |
314
+ | --------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------- |
315
+ | linkedOperation | `Operation` | The linked Operation |
316
+ | linkType | `valueof scalar string` | A string indicating the role of the linked operation |
317
+ | parameters | `model {}` | Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will<br />be passed to the linked operation request. |
318
318
 
319
319
  #### `@pagedResult`
320
320
 
@@ -346,9 +346,9 @@ Identifies a model property as containing the location to poll for operation sta
346
346
 
347
347
  ##### Parameters
348
348
 
349
- | Name | Type | Description |
350
- | ------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
351
- | options | `model Azure.Core.PollingOptions` | PollingOptions for the poller pointed to by this link. Overrides<br />settings derived from property value it is decorating, if the value of the<br />property is ResourceLocation<T> |
349
+ | Name | Type | Description |
350
+ | ------- | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
351
+ | options | `model Azure.Core.PollingOptions` | PollingOptions for the poller pointed to by this link. Overrides<br />settings derived from property value it is decorating, if the value of the<br />property is ResourceLocation<Resource> |
352
352
 
353
353
  #### `@pollingOperation`
354
354
 
@@ -364,10 +364,10 @@ Identifies that an operation is a polling operation for an LRO.
364
364
 
365
365
  ##### Parameters
366
366
 
367
- | Name | Type | Description |
368
- | --------------- | ----------- | ------------------------------------------------------------------------------------------------------------------- |
369
- | linkedOperation | `Operation` | The linked Operation |
370
- | parameters | `model {}` | Map of `RequestParameter<T>` and/or `ResponseProperty<T>` that will<br />be passed to the linked operation request. |
367
+ | Name | Type | Description |
368
+ | --------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- |
369
+ | linkedOperation | `Operation` | The linked Operation |
370
+ | parameters | `model {}` | Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will<br />be passed to the linked operation request. |
371
371
 
372
372
  #### `@pollingOperationParameter`
373
373
 
@@ -104,6 +104,6 @@ export function isPascalCaseNoAcronyms(name) {
104
104
  export function isCamelCaseNoAcronyms(name) {
105
105
  if (name === undefined || name === null || name === "")
106
106
  return true;
107
- return /^[a-z][a-z0-9]*([A-Z][a-z0-9]+)*[A-Z]?$/.test(name);
107
+ return /^[^a-zA-Z0-9]?[a-z][a-z0-9]*([A-Z][a-z0-9]+)*[A-Z]?$/.test(name);
108
108
  }
109
109
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/rules/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,oBAAoB,EAEpB,qBAAqB,EAOrB,UAAU,GAGX,MAAM,oBAAoB,CAAC;AAc5B;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAgB,EAAE,IAAgC;IACjF,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IAClC,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe;QAAE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAClG,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY;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,MAAM,CAAC,CAAC;AAC9F,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAY;IACjD,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IACpE,OAAO,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IACpE,OAAO,sDAAsD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3E,CAAC"}
@@ -66,14 +66,14 @@ namespace Azure {
66
66
  * Identifies a model property as containing the location to poll for operation state.
67
67
  * @param options PollingOptions for the poller pointed to by this link. Overrides
68
68
  * settings derived from property value it is decorating, if the value of the
69
- * property is ResourceLocation<T>
69
+ * property is ResourceLocation<Resource>
70
70
  */
71
71
  extern dec pollingLocation(entity: ModelProperty, options?: PollingOptions);
72
72
 
73
73
  /**
74
74
  * Identifies a ModelProperty as containing the final location for the operation result.
75
75
  * @param finalResult Sets the expected return value for the final result. Overrides
76
- * any value provided in the decorated property, if the property uses ResourceLocation<T>.
76
+ * any value provided in the decorated property, if the property uses ResourceLocation<Resource>.
77
77
  */
78
78
  extern dec finalLocation(entity: ModelProperty, finalResult?: Model | void);
79
79
 
@@ -81,7 +81,7 @@ namespace Azure {
81
81
  * Identifies an operation that is linked to the target operation.
82
82
  * @param linkedOperation The linked Operation
83
83
  * @param linkType A string indicating the role of the linked operation
84
- * @param parameters Map of `RequestParameter<T>` and/or `ResponseProperty<T>` that will
84
+ * @param parameters Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will
85
85
  * be passed to the linked operation request.
86
86
  */
87
87
  extern dec operationLink(
@@ -106,7 +106,7 @@ namespace Azure {
106
106
  /**
107
107
  * Identifies that an operation is a polling operation for an LRO.
108
108
  * @param linkedOperation The linked Operation
109
- * @param parameters Map of `RequestParameter<T>` and/or `ResponseProperty<T>` that will
109
+ * @param parameters Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will
110
110
  * be passed to the linked operation request.
111
111
  */
112
112
  extern dec pollingOperation(entity: Operation, linkedOperation: Operation, parameters?: {});
@@ -114,7 +114,7 @@ namespace Azure {
114
114
  /**
115
115
  * Identifies that an operation is the final operation for an LRO.
116
116
  * @param linkedOperation The linked Operation
117
- * @param parameters Map of `RequestParameter<T>` and/or `ResponseProperty<T>` that will
117
+ * @param parameters Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will
118
118
  * be passed to the linked operation request.
119
119
  */
120
120
  extern dec finalOperation(entity: Operation, linkedOperation: Operation, parameters?: {});
@@ -122,7 +122,7 @@ namespace Azure {
122
122
  /**
123
123
  * Identifies that an operation is used to retrieve the next page for paged operations.
124
124
  * @param linkedOperation The linked Operation
125
- * @param parameters Map of `RequestParameter<T>` and/or `ResponseProperty<T>` that will
125
+ * @param parameters Map of `RequestParameter<Name>` and/or `ResponseProperty<Name>` that will
126
126
  * be passed to the linked operation request.
127
127
  */
128
128
  extern dec nextPageOperation(entity: Operation, linkedOperation: Operation, parameters?: {});
@@ -169,14 +169,14 @@ namespace Azure {
169
169
  extern dec spreadCustomResponseProperties(entity: Model, customizations: {});
170
170
 
171
171
  /**
172
- * Checks the TResource parameter of an operation signature to ensure it's a valid resource type.
172
+ * Checks the Resource parameter of an operation signature to ensure it's a valid resource type.
173
173
  * Also marks the operation as a resource operation.
174
174
  * @param resourceType The possible resource Type to validate.
175
175
  */
176
176
  extern dec ensureResourceType(entity: TypeSpec.Reflection.Operation, resourceType: unknown);
177
177
 
178
178
  /**
179
- * Checks the TResource parameter of an operation signature to ensure it's a valid resource type.
179
+ * Checks the Resource parameter of an operation signature to ensure it's a valid resource type.
180
180
  */
181
181
  extern dec needsRoute(entity: TypeSpec.Reflection.Operation);
182
182