@azure-tools/typespec-azure-resource-manager 0.74.0-dev.0 → 0.74.0-dev.10

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 (83) hide show
  1. package/README.md +9 -1
  2. package/dist/generated-defs/Azure.ResourceManager.BaseTypes.d.ts +11 -0
  3. package/dist/generated-defs/Azure.ResourceManager.BaseTypes.d.ts.map +1 -1
  4. package/dist/generated-defs/Azure.ResourceManager.Legacy.d.ts +33 -0
  5. package/dist/generated-defs/Azure.ResourceManager.Legacy.d.ts.map +1 -1
  6. package/dist/generated-defs/Azure.ResourceManager.d.ts +33 -0
  7. package/dist/generated-defs/Azure.ResourceManager.d.ts.map +1 -1
  8. package/dist/src/codefixes/delete-property.d.ts +4 -0
  9. package/dist/src/codefixes/delete-property.d.ts.map +1 -0
  10. package/dist/src/codefixes/delete-property.js +17 -0
  11. package/dist/src/codefixes/delete-property.js.map +1 -0
  12. package/dist/src/lib.d.ts +167 -2
  13. package/dist/src/lib.d.ts.map +1 -1
  14. package/dist/src/lib.js +66 -0
  15. package/dist/src/lib.js.map +1 -1
  16. package/dist/src/linter.d.ts.map +1 -1
  17. package/dist/src/linter.js +24 -0
  18. package/dist/src/linter.js.map +1 -1
  19. package/dist/src/operations.d.ts +1 -2
  20. package/dist/src/operations.d.ts.map +1 -1
  21. package/dist/src/operations.js +19 -43
  22. package/dist/src/operations.js.map +1 -1
  23. package/dist/src/private.decorators.d.ts +2 -1
  24. package/dist/src/private.decorators.d.ts.map +1 -1
  25. package/dist/src/private.decorators.js +40 -10
  26. package/dist/src/private.decorators.js.map +1 -1
  27. package/dist/src/resource-name.d.ts +27 -0
  28. package/dist/src/resource-name.d.ts.map +1 -0
  29. package/dist/src/resource-name.js +82 -0
  30. package/dist/src/resource-name.js.map +1 -0
  31. package/dist/src/resource.d.ts +128 -11
  32. package/dist/src/resource.d.ts.map +1 -1
  33. package/dist/src/resource.js +378 -31
  34. package/dist/src/resource.js.map +1 -1
  35. package/dist/src/rules/http-response-utils.d.ts +16 -0
  36. package/dist/src/rules/http-response-utils.d.ts.map +1 -0
  37. package/dist/src/rules/http-response-utils.js +31 -0
  38. package/dist/src/rules/http-response-utils.js.map +1 -0
  39. package/dist/src/rules/list-response-envelope.d.ts +1 -0
  40. package/dist/src/rules/list-response-envelope.d.ts.map +1 -1
  41. package/dist/src/rules/list-response-envelope.js +58 -7
  42. package/dist/src/rules/list-response-envelope.js.map +1 -1
  43. package/dist/src/rules/model-utils.d.ts +4 -0
  44. package/dist/src/rules/model-utils.d.ts.map +1 -0
  45. package/dist/src/rules/model-utils.js +18 -0
  46. package/dist/src/rules/model-utils.js.map +1 -0
  47. package/dist/src/rules/no-empty-post-response.d.ts +4 -0
  48. package/dist/src/rules/no-empty-post-response.d.ts.map +1 -0
  49. package/dist/src/rules/no-empty-post-response.js +38 -0
  50. package/dist/src/rules/no-empty-post-response.js.map +1 -0
  51. package/dist/src/rules/no-tags-on-proxy-resource.d.ts +4 -0
  52. package/dist/src/rules/no-tags-on-proxy-resource.d.ts.map +1 -0
  53. package/dist/src/rules/no-tags-on-proxy-resource.js +58 -0
  54. package/dist/src/rules/no-tags-on-proxy-resource.js.map +1 -0
  55. package/dist/src/rules/resource-missing-read.d.ts +4 -0
  56. package/dist/src/rules/resource-missing-read.d.ts.map +1 -0
  57. package/dist/src/rules/resource-missing-read.js +55 -0
  58. package/dist/src/rules/resource-missing-read.js.map +1 -0
  59. package/dist/src/rules/scope-path-segment-casing.d.ts +4 -0
  60. package/dist/src/rules/scope-path-segment-casing.d.ts.map +1 -0
  61. package/dist/src/rules/scope-path-segment-casing.js +37 -0
  62. package/dist/src/rules/scope-path-segment-casing.js.map +1 -0
  63. package/dist/src/rules/use-resource-path-for-put.d.ts +4 -0
  64. package/dist/src/rules/use-resource-path-for-put.d.ts.map +1 -0
  65. package/dist/src/rules/use-resource-path-for-put.js +35 -0
  66. package/dist/src/rules/use-resource-path-for-put.js.map +1 -0
  67. package/dist/src/rules/use-scope-for-extension-routing.d.ts +4 -0
  68. package/dist/src/rules/use-scope-for-extension-routing.d.ts.map +1 -0
  69. package/dist/src/rules/use-scope-for-extension-routing.js +37 -0
  70. package/dist/src/rules/use-scope-for-extension-routing.js.map +1 -0
  71. package/dist/src/rules/use-standard-error.d.ts +5 -0
  72. package/dist/src/rules/use-standard-error.d.ts.map +1 -0
  73. package/dist/src/rules/use-standard-error.js +66 -0
  74. package/dist/src/rules/use-standard-error.js.map +1 -0
  75. package/dist/src/rules/use-standard-response-codes.d.ts +6 -0
  76. package/dist/src/rules/use-standard-response-codes.d.ts.map +1 -0
  77. package/dist/src/rules/use-standard-response-codes.js +67 -0
  78. package/dist/src/rules/use-standard-response-codes.js.map +1 -0
  79. package/dist/src/state.d.ts +1 -0
  80. package/dist/src/state.d.ts.map +1 -1
  81. package/dist/src/state.js +1 -0
  82. package/dist/src/state.js.map +1 -1
  83. package/package.json +11 -11
package/README.md CHANGED
@@ -33,12 +33,14 @@ Available ruleSets:
33
33
  | [`@azure-tools/typespec-azure-resource-manager/use-relationship-required-properties`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/use-relationship-required-properties) | Resources decorated with @azureBaseType for the Relationship base type must be extension resources with the required Relationship schema. |
34
34
  | [`@azure-tools/typespec-azure-resource-manager/arm-no-record`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/arm-no-record) | Don't use Record types for ARM resources. |
35
35
  | [`@azure-tools/typespec-azure-resource-manager/arm-no-path-casing-conflicts`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/arm-no-path-casing-conflicts) | Operation paths must be unique when compared case-insensitively. |
36
+ | [`@azure-tools/typespec-azure-resource-manager/scope-path-segment-casing`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/scope-path-segment-casing) | ARM paths must use the canonical subscriptions and resourceGroups segment casing. |
36
37
  | [`@azure-tools/typespec-azure-resource-manager/no-override-props`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-override-props) | Disallow redefining properties already defined in a base type. |
37
38
  | [`@azure-tools/typespec-azure-resource-manager/arm-common-types-version`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/arm-common-types-version) | Specify the ARM common-types version using @armCommonTypesVersion. |
38
39
  | [`@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/arm-delete-operation-response-codes) | Ensure delete operations have the appropriate status codes. |
39
40
  | [`@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/arm-put-operation-response-codes) | Ensure put operations have the appropriate status codes. |
40
41
  | [`@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/arm-post-operation-response-codes) | Ensure post operations have the appropriate status codes. |
41
42
  | [`@azure-tools/typespec-azure-resource-manager/lro-response-mismatch`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/lro-response-mismatch) | Ensure that the final result of a long-running operation matches the response. |
43
+ | [`@azure-tools/typespec-azure-resource-manager/use-standard-error`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/use-standard-error) | Non-HEAD operations must define a response marked with @error and use ErrorResponse from ARM common types for marked error payloads. |
42
44
  | [`@azure-tools/typespec-azure-resource-manager/arm-resource-action-no-segment`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/arm-resource-action-no-segment) | `@armResourceAction` should not be used with `@segment`. |
43
45
  | [`@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-property`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/arm-resource-duplicate-property) | Warn about duplicate properties in resources. |
44
46
  | [`@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/arm-resource-invalid-envelope-property) | Check for invalid resource envelope properties. |
@@ -56,7 +58,7 @@ Available ruleSets:
56
58
  | [`@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/arm-custom-resource-usage-discourage) | Verify the usage of @customAzureResource decorator. |
57
59
  | [`@azure-tools/typespec-azure-resource-manager/arm-feature-file-usage-discourage`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/arm-feature-file-usage-discourage) | Verify the usage of @featureFiles decorator. |
58
60
  | [`@azure-tools/typespec-azure-resource-manager/beyond-nesting-levels`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/beyond-nesting-levels) | Tracked Resources must use 3 or fewer levels of nesting. |
59
- | [`@azure-tools/typespec-azure-resource-manager/list-response-envelope`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/list-response-envelope) | ARM collection GET response models must declare only the `value` and `nextLink` properties. |
61
+ | [`@azure-tools/typespec-azure-resource-manager/list-response-envelope`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/list-response-envelope) | ARM list responses must use a value array and the standard nextLink envelope. |
60
62
  | [`@azure-tools/typespec-azure-resource-manager/no-query-in-collection`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-query-in-collection) | ARM collection GET operations must not declare query parameters beyond api-version and $filter. |
61
63
  | [`@azure-tools/typespec-azure-resource-manager/use-interface`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/use-interface) | Validate ARM Resource operations are defined inside an interface declaration. |
62
64
  | [`@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-resource-delete-operation) | Check for resources that must have a delete operation. |
@@ -73,14 +75,20 @@ Available ruleSets:
73
75
  | [`@azure-tools/typespec-azure-resource-manager/patch-envelope`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/patch-envelope) | Patch envelope properties should match the resource properties. |
74
76
  | [`@azure-tools/typespec-azure-resource-manager/arm-resource-patch`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/arm-resource-patch) | Validate ARM PATCH operations. |
75
77
  | [`@azure-tools/typespec-azure-resource-manager/resource-name`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/resource-name) | Check the resource name. |
78
+ | [`@azure-tools/typespec-azure-resource-manager/resource-missing-read`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/resource-missing-read) | ARM resources with create or update operations must define a read operation. |
76
79
  | [`@azure-tools/typespec-azure-resource-manager/retry-after`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/retry-after) | Check if retry-after header appears in response body. |
77
80
  | [`@azure-tools/typespec-azure-resource-manager/unsupported-type`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/unsupported-type) | Check for unsupported ARM types. |
78
81
  | [`@azure-tools/typespec-azure-resource-manager/use-model-request-body`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/use-model-request-body) | Request bodies must use plain models. |
82
+ | [`@azure-tools/typespec-azure-resource-manager/use-standard-response-codes`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/use-standard-response-codes) | Use standard ARM response codes; GET operations in services must include 200 and may only add 202 or default. |
79
83
  | [`@azure-tools/typespec-azure-resource-manager/secret-prop`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/secret-prop) | RPC-v1-13: Check that property with names indicating sensitive information(e.g. contains auth, password, token, secret, etc.) are marked with @secret decorator. |
80
84
  | [`@azure-tools/typespec-azure-resource-manager/no-empty-model`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-empty-model) | ARM Properties with type:object that don't reference a model definition are not allowed. ARM doesn't allow generic type definitions as this leads to bad customer experience. |
85
+ | [`@azure-tools/typespec-azure-resource-manager/no-empty-post-response`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-empty-post-response) | Synchronous ARM resource POST responses with status 200 must have a body. |
81
86
  | [`@azure-tools/typespec-azure-resource-manager/no-reserved-resource-property`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-reserved-resource-property) | Reserved property names (for example 'billingData') must not be present in a resource's property bag. The property name is matched case-insensitively. |
87
+ | [`@azure-tools/typespec-azure-resource-manager/no-tags-on-proxy-resource`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-tags-on-proxy-resource) | Non-tracked ARM resources must not declare a tags property on the resource envelope. |
82
88
  | [`@azure-tools/typespec-azure-resource-manager/no-tenant-level-apis`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-tenant-level-apis) | ARM PUT operations whose resolved paths begin with '/providers' are not allowed, except paths ending in '/operations'. |
83
89
  | [`@azure-tools/typespec-azure-resource-manager/no-query-in-point-op`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/no-query-in-point-op) | Point operations must not declare query parameters beyond api-version. |
90
+ | [`@azure-tools/typespec-azure-resource-manager/use-resource-path-for-put`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/use-resource-path-for-put) | ARM PUT paths must end in resource type and resource name pairs. |
91
+ | [`@azure-tools/typespec-azure-resource-manager/use-scope-for-extension-routing`](https://azure.github.io/typespec-azure/docs/libraries/azure-resource-manager/rules/use-scope-for-extension-routing/) | Require scope-based paths when explicitly enabled for RPaaS extension routing. |
84
92
 
85
93
  ## Decorators
86
94
 
@@ -1,6 +1,17 @@
1
1
  import type { DecoratorContext, DecoratorValidatorCallbacks, Model } from "@typespec/compiler";
2
+ /**
3
+ * An ARM-managed base type descriptor identifying the schema contract a resource conforms to.
4
+ * Used as a parameter to the `@azureBaseType` decorator to indicate which
5
+ * base types a resource conforms to.
6
+ */
2
7
  export interface BaseTypeInfo {
8
+ /**
9
+ * The base type identifier.
10
+ */
3
11
  readonly baseType: "Agent" | "Relationship" | string;
12
+ /**
13
+ * The schema version of the base type.
14
+ */
4
15
  readonly version: string;
5
16
  }
6
17
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Azure.ResourceManager.BaseTypes.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.ResourceManager.BaseTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE/F,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,cAAc,GAAG,MAAM,CAAC;IACrD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,QAAQ,EAAE,YAAY,KACnB,2BAA2B,GAAG,IAAI,CAAC;AAExC,MAAM,MAAM,uCAAuC,GAAG;IACpD,aAAa,EAAE,sBAAsB,CAAC;CACvC,CAAC"}
1
+ {"version":3,"file":"Azure.ResourceManager.BaseTypes.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.ResourceManager.BaseTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE/F;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,cAAc,GAAG,MAAM,CAAC;IACrD;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,QAAQ,EAAE,YAAY,KACnB,2BAA2B,GAAG,IAAI,CAAC;AAExC,MAAM,MAAM,uCAAuC,GAAG;IACpD,aAAa,EAAE,sBAAsB,CAAC;CACvC,CAAC"}
@@ -1,16 +1,49 @@
1
1
  import type { DecoratorContext, DecoratorValidatorCallbacks, Enum, EnumMember, Interface, Model, ModelProperty, Namespace, Operation } from "@typespec/compiler";
2
+ /**
3
+ * Options for customizing the behavior of a custom azure resource
4
+ */
2
5
  export interface CustomResourceOptions {
6
+ /**
7
+ * Should the resource be marked as an Azure resource
8
+ */
3
9
  readonly isAzureResource?: boolean;
4
10
  }
11
+ /**
12
+ * Route options for an operation
13
+ */
5
14
  export interface ArmOperationOptions {
15
+ /**
16
+ * Should a static route be used
17
+ */
6
18
  readonly useStaticRoute?: boolean;
19
+ /**
20
+ * The status route for operations to use
21
+ */
7
22
  readonly route?: string;
8
23
  }
24
+ /**
25
+ * Options for defining a feature and the associated file
26
+ */
9
27
  export interface ArmFeatureOptions {
28
+ /**
29
+ * The feature name
30
+ */
10
31
  readonly featureName: string;
32
+ /**
33
+ * The associated file name for the features
34
+ */
11
35
  readonly fileName: string;
36
+ /**
37
+ * The feature description in Swagger
38
+ */
12
39
  readonly description: string;
40
+ /**
41
+ * The feature title in Swagger
42
+ */
13
43
  readonly title?: string;
44
+ /**
45
+ * The feature terms of service in Swagger
46
+ */
14
47
  readonly termsOfService?: string;
15
48
  }
16
49
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Azure.ResourceManager.Legacy.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.ResourceManager.Legacy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,2BAA2B,EAC3B,IAAI,EACJ,UAAU,EACV,SAAS,EACT,KAAK,EACL,aAAa,EACb,SAAS,EACT,SAAS,EACV,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,C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gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,IAAI,KACX,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACpC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,iBAAiB,KACvB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAC7B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,EACjD,WAAW,EAAE,UAAU,KACpB,2BAA2B,GAAG,IAAI,CAAC;AAExC,MAAM,MAAM,oCAAoC,GAAG;IACjD,mBAAmB,EAAE,4BAA4B,CAAC;IAClD,eAAe,EAAE,wBAAwB,CAAC;IAC1C,iBAAiB,EAAE,0BAA0B,CAAC;IAC9C,eAAe,EAAE,wBAAwB,CAAC;IAC1C,mBAAmB,EAAE,4BAA4B,CAAC;IAClD,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,cAAc,EAAE,uBAAuB,CAAC;IACxC,OAAO,EAAE,gBAAgB,CAAC;CAC3B,CAAC"}
1
+ {"version":3,"file":"Azure.ResourceManager.Legacy.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.ResourceManager.Legacy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,2BAA2B,EAC3B,IAAI,EACJ,UAAU,EACV,SAAS,EACT,KAAK,EACL,aAAa,EACb,SAAS,EACT,SAAS,EACV,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC;;OAE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AAM,iBAAiB,GAAG,CAC9B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,IAAI,KACX,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACpC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,iBAAiB,KACvB,2BAA2B,GAAG,IAAI,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAC7B,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,EACjD,WAAW,EAAE,UAAU,KACpB,2BAA2B,GAAG,IAAI,CAAC;AAExC,MAAM,MAAM,oCAAoC,GAAG;IACjD,mBAAmB,EAAE,4BAA4B,CAAC;IAClD,eAAe,EAAE,wBAAwB,CAAC;IAC1C,iBAAiB,EAAE,0BAA0B,CAAC;IAC9C,eAAe,EAAE,wBAAwB,CAAC;IAC1C,mBAAmB,EAAE,4BAA4B,CAAC;IAClD,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,cAAc,EAAE,uBAAuB,CAAC;IACxC,OAAO,EAAE,gBAAgB,CAAC;CAC3B,CAAC"}
@@ -1,15 +1,48 @@
1
1
  import type { DecoratorContext, DecoratorValidatorCallbacks, Enum, EnumMember, EnumValue, Interface, Model, ModelProperty, Namespace, Operation, Type } from "@typespec/compiler";
2
+ /**
3
+ * Interface-level operation options
4
+ */
2
5
  export interface ResourceOperationOptions {
6
+ /**
7
+ * The resource type for the operations in the interface
8
+ */
3
9
  readonly resourceType?: Record<string, unknown>;
10
+ /**
11
+ * If true, turns off autoRoute for the interface, so individual operations can choose static (`@route`) or automatic (`@autoRoute`) routing.
12
+ */
4
13
  readonly allowStaticRoutes?: boolean;
14
+ /**
15
+ * If true, turns off the default tagging of operations in the interface, so that individual operations must be individually tagged
16
+ */
5
17
  readonly omitTags?: boolean;
6
18
  }
19
+ /**
20
+ * Options for defining a feature file and its associated output
21
+ */
7
22
  export interface ArmFeatureFileOptions {
23
+ /**
24
+ * The feature name
25
+ */
8
26
  readonly featureName: string;
27
+ /**
28
+ * The associated file name for the features
29
+ */
9
30
  readonly fileName: string;
31
+ /**
32
+ * The feature description in Swagger
33
+ */
10
34
  readonly description: string;
35
+ /**
36
+ * The feature title in Swagger
37
+ */
11
38
  readonly title?: string;
39
+ /**
40
+ * The feature terms of service in Swagger
41
+ */
12
42
  readonly termsOfService?: string;
43
+ /**
44
+ * The API version to use for clients generated from this feature file
45
+ */
13
46
  readonly version?: string;
14
47
  }
15
48
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Azure.ResourceManager.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.ResourceManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,2BAA2B,EAC3B,IAAI,EACJ,UAAU,EACV,SAAS,EACT,SAAS,EACT,KAAK,EACL,aAAa,EACb,SAAS,EACT,SAAS,EACT,IAAI,EACL,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;GA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,EAAE,wBAAwB,CAAC;IAC1C,yBAAyB,EAAE,kCAAkC,CAAC;IAC9D,qBAAqB,EAAE,8BAA8B,CAAC;IACtD,qBAAqB,EAAE,8BAA8B,CAAC;IACtD,kBAAkB,EAAE,2BAA2B,CAAC;IAChD,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,YAAY,EAAE,qBAAqB,CAAC;IACpC,kBAAkB,EAAE,2BAA2B,CAAC;IAChD,WAAW,EAAE,oBAAoB,CAAC;CACnC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type CodeFix } from "@typespec/compiler";
2
+ import { type ModelPropertyNode } from "@typespec/compiler/ast";
3
+ export declare function createDeletePropertyCodeFix(node: ModelPropertyNode): CodeFix;
4
+ //# sourceMappingURL=delete-property.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-property.d.ts","sourceRoot":"","sources":["../../../src/codefixes/delete-property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE5E,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAiB5E"}
@@ -0,0 +1,17 @@
1
+ import { defineCodeFix, getSourceLocation } from "@typespec/compiler";
2
+ import { skipTrivia } from "@typespec/compiler/ast";
3
+ export function createDeletePropertyCodeFix(node) {
4
+ return defineCodeFix({
5
+ id: "delete-property",
6
+ label: `Delete property '${node.id.sv}'`,
7
+ fix(context) {
8
+ const location = getSourceLocation(node);
9
+ const text = location.file.text;
10
+ const limit = node.parent?.end ?? text.length;
11
+ const cursor = skipTrivia(text, location.end, limit);
12
+ const hasSeparator = cursor < limit && (text[cursor] === ";" || text[cursor] === ",");
13
+ return context.replaceText({ ...location, end: hasSeparator ? cursor + 1 : location.end }, "");
14
+ },
15
+ });
16
+ }
17
+ //# sourceMappingURL=delete-property.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-property.js","sourceRoot":"","sources":["../../../src/codefixes/delete-property.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAgB,MAAM,oBAAoB,CAAC;AACpF,OAAO,EAAE,UAAU,EAA0B,MAAM,wBAAwB,CAAC;AAE5E,MAAM,UAAU,2BAA2B,CAAC,IAAuB;IACjE,OAAO,aAAa,CAAC;QACnB,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,oBAAoB,IAAI,CAAC,EAAE,CAAC,EAAE,GAAG;QACxC,GAAG,CAAC,OAAO;YACT,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACzC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YAChC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC;YAC9C,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAErD,MAAM,YAAY,GAAG,MAAM,GAAG,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC;YACtF,OAAO,OAAO,CAAC,WAAW,CACxB,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,EAC9D,EAAE,CACH,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
package/dist/src/lib.d.ts CHANGED
@@ -28,6 +28,39 @@ export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
28
28
  "arm-resource-missing": {
29
29
  readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
30
30
  };
31
+ "arm-resource-version-not-found": {
32
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "availableVersions"]>;
33
+ };
34
+ "arm-resource-version-not-supported": {
35
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
36
+ };
37
+ "arm-resource-version-transient": {
38
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
39
+ };
40
+ "arm-resource-version-projection-failed": {
41
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
42
+ };
43
+ "arm-resource-service-versions-empty": {
44
+ readonly default: "At least one ARM service version must be selected.";
45
+ };
46
+ "arm-resource-service-options-conflict": {
47
+ readonly default: "The 'version' and 'serviceVersions' options cannot be used together.";
48
+ };
49
+ "arm-resource-service-duplicate": {
50
+ readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
51
+ };
52
+ "arm-resource-service-not-arm": {
53
+ readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
54
+ };
55
+ "arm-resource-service-version-mismatch": {
56
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "versionNamespace", "selectedNamespace"]>;
57
+ };
58
+ "arm-resource-service-version-invalid": {
59
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "namespace"]>;
60
+ };
61
+ "arm-resource-invalid-metadata-name": {
62
+ readonly default: import("@typespec/compiler").CallableMessage<["kind", "name"]>;
63
+ };
31
64
  "arm-common-types-incompatible-version": {
32
65
  readonly default: import("@typespec/compiler").CallableMessage<["selectedVersion", "supportedVersions"]>;
33
66
  };
@@ -67,7 +100,7 @@ export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
67
100
  readonly default: "Azure Resource Manager BaseTypes are experimental and may be subject to breaking changes.";
68
101
  };
69
102
  }, Record<string, any>, never>;
70
- export declare const reportDiagnostic: <C extends "arm-common-types-incompatible-version" | "arm-common-types-invalid-version" | "arm-resource-circular-ancestry" | "arm-resource-duplicate-base-parameter" | "arm-resource-invalid-base-type" | "arm-resource-missing" | "arm-resource-missing-arm-namespace" | "arm-resource-missing-name-key-decorator" | "arm-resource-missing-name-property" | "arm-resource-missing-name-segment-decorator" | "basetypes-experimental" | "decorator-in-namespace" | "decorator-param-wrong-type" | "invalid-feature-file-version" | "invalid-parameter-rename" | "invalid-version-for-common-type" | "legacy-type-usage" | "parent-type" | "resource-without-path-and-segment" | "resource-without-provider-namespace" | "template-type-constraint-no-met", M extends keyof {
103
+ export declare const reportDiagnostic: <C extends "arm-common-types-incompatible-version" | "arm-common-types-invalid-version" | "arm-resource-circular-ancestry" | "arm-resource-duplicate-base-parameter" | "arm-resource-invalid-base-type" | "arm-resource-invalid-metadata-name" | "arm-resource-missing" | "arm-resource-missing-arm-namespace" | "arm-resource-missing-name-key-decorator" | "arm-resource-missing-name-property" | "arm-resource-missing-name-segment-decorator" | "arm-resource-service-duplicate" | "arm-resource-service-not-arm" | "arm-resource-service-options-conflict" | "arm-resource-service-version-invalid" | "arm-resource-service-version-mismatch" | "arm-resource-service-versions-empty" | "arm-resource-version-not-found" | "arm-resource-version-not-supported" | "arm-resource-version-projection-failed" | "arm-resource-version-transient" | "basetypes-experimental" | "decorator-in-namespace" | "decorator-param-wrong-type" | "invalid-feature-file-version" | "invalid-parameter-rename" | "invalid-version-for-common-type" | "legacy-type-usage" | "parent-type" | "resource-without-path-and-segment" | "resource-without-provider-namespace" | "template-type-constraint-no-met", M extends keyof {
71
104
  "decorator-param-wrong-type": {
72
105
  readonly armUpdateProviderNamespace: "The parameter to @armUpdateProviderNamespace must be an operation with a 'provider' parameter.";
73
106
  readonly armIdentifiersIncorrectEntity: "The @identifiers decorator must be applied to a property that is an array of objects";
@@ -97,6 +130,39 @@ export declare const reportDiagnostic: <C extends "arm-common-types-incompatible
97
130
  "arm-resource-missing": {
98
131
  readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
99
132
  };
133
+ "arm-resource-version-not-found": {
134
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "availableVersions"]>;
135
+ };
136
+ "arm-resource-version-not-supported": {
137
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
138
+ };
139
+ "arm-resource-version-transient": {
140
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
141
+ };
142
+ "arm-resource-version-projection-failed": {
143
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
144
+ };
145
+ "arm-resource-service-versions-empty": {
146
+ readonly default: "At least one ARM service version must be selected.";
147
+ };
148
+ "arm-resource-service-options-conflict": {
149
+ readonly default: "The 'version' and 'serviceVersions' options cannot be used together.";
150
+ };
151
+ "arm-resource-service-duplicate": {
152
+ readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
153
+ };
154
+ "arm-resource-service-not-arm": {
155
+ readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
156
+ };
157
+ "arm-resource-service-version-mismatch": {
158
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "versionNamespace", "selectedNamespace"]>;
159
+ };
160
+ "arm-resource-service-version-invalid": {
161
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "namespace"]>;
162
+ };
163
+ "arm-resource-invalid-metadata-name": {
164
+ readonly default: import("@typespec/compiler").CallableMessage<["kind", "name"]>;
165
+ };
100
166
  "arm-common-types-incompatible-version": {
101
167
  readonly default: import("@typespec/compiler").CallableMessage<["selectedVersion", "supportedVersions"]>;
102
168
  };
@@ -165,6 +231,39 @@ export declare const reportDiagnostic: <C extends "arm-common-types-incompatible
165
231
  "arm-resource-missing": {
166
232
  readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
167
233
  };
234
+ "arm-resource-version-not-found": {
235
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "availableVersions"]>;
236
+ };
237
+ "arm-resource-version-not-supported": {
238
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
239
+ };
240
+ "arm-resource-version-transient": {
241
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
242
+ };
243
+ "arm-resource-version-projection-failed": {
244
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
245
+ };
246
+ "arm-resource-service-versions-empty": {
247
+ readonly default: "At least one ARM service version must be selected.";
248
+ };
249
+ "arm-resource-service-options-conflict": {
250
+ readonly default: "The 'version' and 'serviceVersions' options cannot be used together.";
251
+ };
252
+ "arm-resource-service-duplicate": {
253
+ readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
254
+ };
255
+ "arm-resource-service-not-arm": {
256
+ readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
257
+ };
258
+ "arm-resource-service-version-mismatch": {
259
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "versionNamespace", "selectedNamespace"]>;
260
+ };
261
+ "arm-resource-service-version-invalid": {
262
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "namespace"]>;
263
+ };
264
+ "arm-resource-invalid-metadata-name": {
265
+ readonly default: import("@typespec/compiler").CallableMessage<["kind", "name"]>;
266
+ };
168
267
  "arm-common-types-incompatible-version": {
169
268
  readonly default: import("@typespec/compiler").CallableMessage<["selectedVersion", "supportedVersions"]>;
170
269
  };
@@ -203,7 +302,7 @@ export declare const reportDiagnostic: <C extends "arm-common-types-incompatible
203
302
  "basetypes-experimental": {
204
303
  readonly default: "Azure Resource Manager BaseTypes are experimental and may be subject to breaking changes.";
205
304
  };
206
- }, C, M>) => void, createDiagnostic: <C extends "arm-common-types-incompatible-version" | "arm-common-types-invalid-version" | "arm-resource-circular-ancestry" | "arm-resource-duplicate-base-parameter" | "arm-resource-invalid-base-type" | "arm-resource-missing" | "arm-resource-missing-arm-namespace" | "arm-resource-missing-name-key-decorator" | "arm-resource-missing-name-property" | "arm-resource-missing-name-segment-decorator" | "basetypes-experimental" | "decorator-in-namespace" | "decorator-param-wrong-type" | "invalid-feature-file-version" | "invalid-parameter-rename" | "invalid-version-for-common-type" | "legacy-type-usage" | "parent-type" | "resource-without-path-and-segment" | "resource-without-provider-namespace" | "template-type-constraint-no-met", M extends keyof {
305
+ }, C, M>) => void, createDiagnostic: <C extends "arm-common-types-incompatible-version" | "arm-common-types-invalid-version" | "arm-resource-circular-ancestry" | "arm-resource-duplicate-base-parameter" | "arm-resource-invalid-base-type" | "arm-resource-invalid-metadata-name" | "arm-resource-missing" | "arm-resource-missing-arm-namespace" | "arm-resource-missing-name-key-decorator" | "arm-resource-missing-name-property" | "arm-resource-missing-name-segment-decorator" | "arm-resource-service-duplicate" | "arm-resource-service-not-arm" | "arm-resource-service-options-conflict" | "arm-resource-service-version-invalid" | "arm-resource-service-version-mismatch" | "arm-resource-service-versions-empty" | "arm-resource-version-not-found" | "arm-resource-version-not-supported" | "arm-resource-version-projection-failed" | "arm-resource-version-transient" | "basetypes-experimental" | "decorator-in-namespace" | "decorator-param-wrong-type" | "invalid-feature-file-version" | "invalid-parameter-rename" | "invalid-version-for-common-type" | "legacy-type-usage" | "parent-type" | "resource-without-path-and-segment" | "resource-without-provider-namespace" | "template-type-constraint-no-met", M extends keyof {
207
306
  "decorator-param-wrong-type": {
208
307
  readonly armUpdateProviderNamespace: "The parameter to @armUpdateProviderNamespace must be an operation with a 'provider' parameter.";
209
308
  readonly armIdentifiersIncorrectEntity: "The @identifiers decorator must be applied to a property that is an array of objects";
@@ -233,6 +332,39 @@ export declare const reportDiagnostic: <C extends "arm-common-types-incompatible
233
332
  "arm-resource-missing": {
234
333
  readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
235
334
  };
335
+ "arm-resource-version-not-found": {
336
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "availableVersions"]>;
337
+ };
338
+ "arm-resource-version-not-supported": {
339
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
340
+ };
341
+ "arm-resource-version-transient": {
342
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
343
+ };
344
+ "arm-resource-version-projection-failed": {
345
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
346
+ };
347
+ "arm-resource-service-versions-empty": {
348
+ readonly default: "At least one ARM service version must be selected.";
349
+ };
350
+ "arm-resource-service-options-conflict": {
351
+ readonly default: "The 'version' and 'serviceVersions' options cannot be used together.";
352
+ };
353
+ "arm-resource-service-duplicate": {
354
+ readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
355
+ };
356
+ "arm-resource-service-not-arm": {
357
+ readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
358
+ };
359
+ "arm-resource-service-version-mismatch": {
360
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "versionNamespace", "selectedNamespace"]>;
361
+ };
362
+ "arm-resource-service-version-invalid": {
363
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "namespace"]>;
364
+ };
365
+ "arm-resource-invalid-metadata-name": {
366
+ readonly default: import("@typespec/compiler").CallableMessage<["kind", "name"]>;
367
+ };
236
368
  "arm-common-types-incompatible-version": {
237
369
  readonly default: import("@typespec/compiler").CallableMessage<["selectedVersion", "supportedVersions"]>;
238
370
  };
@@ -301,6 +433,39 @@ export declare const reportDiagnostic: <C extends "arm-common-types-incompatible
301
433
  "arm-resource-missing": {
302
434
  readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
303
435
  };
436
+ "arm-resource-version-not-found": {
437
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "availableVersions"]>;
438
+ };
439
+ "arm-resource-version-not-supported": {
440
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
441
+ };
442
+ "arm-resource-version-transient": {
443
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
444
+ };
445
+ "arm-resource-version-projection-failed": {
446
+ readonly default: import("@typespec/compiler").CallableMessage<["version"]>;
447
+ };
448
+ "arm-resource-service-versions-empty": {
449
+ readonly default: "At least one ARM service version must be selected.";
450
+ };
451
+ "arm-resource-service-options-conflict": {
452
+ readonly default: "The 'version' and 'serviceVersions' options cannot be used together.";
453
+ };
454
+ "arm-resource-service-duplicate": {
455
+ readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
456
+ };
457
+ "arm-resource-service-not-arm": {
458
+ readonly default: import("@typespec/compiler").CallableMessage<["namespace"]>;
459
+ };
460
+ "arm-resource-service-version-mismatch": {
461
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "versionNamespace", "selectedNamespace"]>;
462
+ };
463
+ "arm-resource-service-version-invalid": {
464
+ readonly default: import("@typespec/compiler").CallableMessage<["version", "namespace"]>;
465
+ };
466
+ "arm-resource-invalid-metadata-name": {
467
+ readonly default: import("@typespec/compiler").CallableMessage<["kind", "name"]>;
468
+ };
304
469
  "arm-common-types-incompatible-version": {
305
470
  readonly default: import("@typespec/compiler").CallableMessage<["selectedVersion", "supportedVersions"]>;
306
471
  };
@@ -1 +1 @@
1
- {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAiJf,CAAC;AAEH,eAAO,MAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAAS,CAAC"}
1
+ {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAmNf,CAAC;AAEH,eAAO,MAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAAS,CAAC"}
package/dist/src/lib.js CHANGED
@@ -58,6 +58,72 @@ export const $lib = createTypeSpecLibrary({
58
58
  default: paramMessage `No @armResource registration found for type ${"type"}`,
59
59
  },
60
60
  },
61
+ "arm-resource-version-not-found": {
62
+ severity: "error",
63
+ messages: {
64
+ default: paramMessage `API version '${"version"}' was not found. Available versions: ${"availableVersions"}.`,
65
+ },
66
+ },
67
+ "arm-resource-version-not-supported": {
68
+ severity: "error",
69
+ messages: {
70
+ default: paramMessage `API version '${"version"}' cannot be selected because the ARM service is not versioned.`,
71
+ },
72
+ },
73
+ "arm-resource-version-transient": {
74
+ severity: "error",
75
+ messages: {
76
+ default: paramMessage `API version '${"version"}' cannot be selected because the ARM service uses transient versioning.`,
77
+ },
78
+ },
79
+ "arm-resource-version-projection-failed": {
80
+ severity: "error",
81
+ messages: {
82
+ default: paramMessage `API version '${"version"}' could not be projected.`,
83
+ },
84
+ },
85
+ "arm-resource-service-versions-empty": {
86
+ severity: "error",
87
+ messages: {
88
+ default: "At least one ARM service version must be selected.",
89
+ },
90
+ },
91
+ "arm-resource-service-options-conflict": {
92
+ severity: "error",
93
+ messages: {
94
+ default: "The 'version' and 'serviceVersions' options cannot be used together.",
95
+ },
96
+ },
97
+ "arm-resource-service-duplicate": {
98
+ severity: "error",
99
+ messages: {
100
+ default: paramMessage `ARM service namespace '${"namespace"}' was selected more than once.`,
101
+ },
102
+ },
103
+ "arm-resource-service-not-arm": {
104
+ severity: "error",
105
+ messages: {
106
+ default: paramMessage `Namespace '${"namespace"}' is not an ARM provider service.`,
107
+ },
108
+ },
109
+ "arm-resource-service-version-mismatch": {
110
+ severity: "error",
111
+ messages: {
112
+ default: paramMessage `API version '${"version"}' belongs to namespace '${"versionNamespace"}', not selected namespace '${"selectedNamespace"}'.`,
113
+ },
114
+ },
115
+ "arm-resource-service-version-invalid": {
116
+ severity: "error",
117
+ messages: {
118
+ default: paramMessage `API version '${"version"}' is not registered for ARM service namespace '${"namespace"}'.`,
119
+ },
120
+ },
121
+ "arm-resource-invalid-metadata-name": {
122
+ severity: "error",
123
+ messages: {
124
+ default: paramMessage `The metadata name resolver returned an empty ${"kind"} name for '${"name"}'.`,
125
+ },
126
+ },
61
127
  "arm-common-types-incompatible-version": {
62
128
  severity: "warning",
63
129
  messages: {
@@ -1 +1 @@
1
- {"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEzE,MAAM,CAAC,MAAM,IAAI,GAAG,qBAAqB,CAAC;IACxC,IAAI,EAAE,8CAA8C;IACpD,WAAW,EAAE;QACX,4BAA4B,EAAE;YAC5B,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,0BAA0B,EACxB,gGAAgG;gBAClG,6BAA6B,EAC3B,sFAAsF;gBACxF,wBAAwB,EACtB,+FAA+F;aAClG;SACF;QACD,gCAAgC,EAAE;YAChC,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EACL,oLAAoL;aACvL;SACF;QACD,uCAAuC,EAAE;YACvC,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EACL,uNAAuN;aAC1N;SACF;QACD,oCAAoC,EAAE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AA,kBAAkB,SAAS,4CAA4C;gBAC5F,OAAO,EAAE,YAAY,CAAA,kBAAkB,SAAS,qDAAqD;aACtG;SACF;QACD,mBAAmB,EAAE;YACnB,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EACL,8GAA8G;aACjH;SACF;QACD,iCAAiC,EAAE;YACjC,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,uCAAuC,SAAS,uBAAuB,cAAc,kCAAkC,iBAAiB,4BAA4B;aAC1L;SACF;QACD,8BAA8B,EAAE;YAC9B,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,kFAAkF;aAC5F;SACF;QACD,wBAAwB,EAAE;YACxB,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EACL,2FAA2F;aAC9F;SACF;KACF;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AA+GA,eAAO,MAAM,OAAO,+CAElB,CAAC"}
1
+ {"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AA+HA,eAAO,MAAM,OAAO,+CAYlB,CAAC"}