@azure-tools/typespec-azure-core 0.46.0-dev.1 → 0.46.0-dev.2
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 +40 -40
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/linter.js +7 -7
- package/dist/src/linter.js.map +1 -1
- package/dist/src/rules/{record-types.d.ts → bad-record-type.d.ts} +2 -2
- package/dist/src/rules/bad-record-type.d.ts.map +1 -0
- package/dist/src/rules/{record-types.js → bad-record-type.js} +3 -2
- package/dist/src/rules/bad-record-type.js.map +1 -0
- package/dist/src/rules/no-multiple-discriminator.d.ts +4 -0
- package/dist/src/rules/no-multiple-discriminator.d.ts.map +1 -0
- package/dist/src/rules/{prevent-multiple-discriminator.js → no-multiple-discriminator.js} +2 -2
- package/dist/src/rules/no-multiple-discriminator.js.map +1 -0
- package/dist/src/rules/no-nullable.d.ts.map +1 -1
- package/dist/src/rules/no-nullable.js +1 -0
- package/dist/src/rules/no-nullable.js.map +1 -1
- package/dist/src/rules/prevent-format.d.ts +1 -1
- package/dist/src/rules/prevent-format.d.ts.map +1 -1
- package/dist/src/rules/prevent-format.js +2 -8
- package/dist/src/rules/prevent-format.js.map +1 -1
- package/dist/src/rules/spread-discriminated-model.d.ts.map +1 -1
- package/dist/src/rules/spread-discriminated-model.js +1 -0
- package/dist/src/rules/spread-discriminated-model.js.map +1 -1
- package/dist/src/rules/{use-standard-ops.d.ts → use-standard-operations.d.ts} +1 -2
- package/dist/src/rules/use-standard-operations.d.ts.map +1 -0
- package/dist/src/rules/{use-standard-ops.js → use-standard-operations.js} +10 -24
- package/dist/src/rules/use-standard-operations.js.map +1 -0
- package/package.json +7 -7
- package/dist/src/rules/prevent-multiple-discriminator.d.ts +0 -4
- package/dist/src/rules/prevent-multiple-discriminator.d.ts.map +0 -1
- package/dist/src/rules/prevent-multiple-discriminator.js.map +0 -1
- package/dist/src/rules/record-types.d.ts.map +0 -1
- package/dist/src/rules/record-types.js.map +0 -1
- package/dist/src/rules/use-standard-ops.d.ts.map +0 -1
- package/dist/src/rules/use-standard-ops.js.map +0 -1
package/README.md
CHANGED
|
@@ -29,46 +29,46 @@ Available ruleSets:
|
|
|
29
29
|
|
|
30
30
|
### Rules
|
|
31
31
|
|
|
32
|
-
| Name
|
|
33
|
-
|
|
|
34
|
-
| `@azure-tools/typespec-azure-core/operation-missing-api-version`
|
|
35
|
-
| `@azure-tools/typespec-azure-core/auth-required`
|
|
36
|
-
| `@azure-tools/typespec-azure-core/request-body-problem`
|
|
37
|
-
| `@azure-tools/typespec-azure-core/byos`
|
|
38
|
-
| `@azure-tools/typespec-azure-core/casing-style`
|
|
39
|
-
| `@azure-tools/typespec-azure-core/composition-over-inheritance`
|
|
40
|
-
| `@azure-tools/typespec-azure-core/known-encoding`
|
|
41
|
-
| `@azure-tools/typespec-azure-core/long-running-polling-operation-required`
|
|
42
|
-
| [`@azure-tools/typespec-azure-core/no-closed-literal-union`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-closed-literal-union)
|
|
43
|
-
| [`@azure-tools/typespec-azure-core/no-enum`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-enum)
|
|
44
|
-
| `@azure-tools/typespec-azure-core/no-error-status-codes`
|
|
45
|
-
| `@azure-tools/typespec-azure-core/no-explicit-routes-resource-ops`
|
|
46
|
-
| [`@azure-tools/typespec-azure-core/non-breaking-versioning`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/non-breaking-versioning)
|
|
47
|
-
| [`@azure-tools/typespec-azure-core/no-generic-numeric`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-generic-numeric)
|
|
48
|
-
| `@azure-tools/typespec-azure-core/no-nullable`
|
|
49
|
-
| `@azure-tools/typespec-azure-core/no-offsetdatetime`
|
|
50
|
-
| `@azure-tools/typespec-azure-core/no-response-body`
|
|
51
|
-
| `@azure-tools/typespec-azure-core/no-rpc-path-params`
|
|
52
|
-
| `@azure-tools/typespec-azure-core/no-operation-id`
|
|
53
|
-
| `@azure-tools/typespec-azure-core/prefer-csv-collection-format`
|
|
54
|
-
| `@azure-tools/typespec-azure-core/no-format`
|
|
55
|
-
| `@azure-tools/typespec-azure-core/no-multiple-discriminator`
|
|
56
|
-
| `@azure-tools/typespec-azure-core/no-rest-library-interfaces`
|
|
57
|
-
| `@azure-tools/typespec-azure-core/no-unknown`
|
|
58
|
-
| `@azure-tools/typespec-azure-core/property-name-conflict`
|
|
59
|
-
| `@azure-tools/typespec-azure-core/bad-record-type`
|
|
60
|
-
| `@azure-tools/typespec-azure-core/documentation-required`
|
|
61
|
-
| `@azure-tools/typespec-azure-core/key-visibility-required`
|
|
62
|
-
| `@azure-tools/typespec-azure-core/response-schema-problem`
|
|
63
|
-
| `@azure-tools/typespec-azure-core/rpc-operation-request-body`
|
|
64
|
-
| `@azure-tools/typespec-azure-core/spread-discriminated-model`
|
|
65
|
-
| `@azure-tools/typespec-azure-core/use-standard-names`
|
|
66
|
-
| `@azure-tools/typespec-azure-core/use-standard-operations`
|
|
67
|
-
| [`@azure-tools/typespec-azure-core/no-string-discriminator`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-string-discriminator)
|
|
68
|
-
| [`@azure-tools/typespec-azure-core/require-versioned`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/require-versioned)
|
|
69
|
-
| `@azure-tools/typespec-azure-core/friendly-name`
|
|
70
|
-
| [`@azure-tools/typespec-azure-core/no-private-usage`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-private-usage)
|
|
71
|
-
| [`@azure-tools/typespec-azure-core/no-query-explode`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-query-explode)
|
|
32
|
+
| Name | Description |
|
|
33
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
34
|
+
| `@azure-tools/typespec-azure-core/operation-missing-api-version` | Operations need an api version parameter. |
|
|
35
|
+
| `@azure-tools/typespec-azure-core/auth-required` | Enforce service authentication. |
|
|
36
|
+
| `@azure-tools/typespec-azure-core/request-body-problem` | Request body should not be of raw array type. |
|
|
37
|
+
| `@azure-tools/typespec-azure-core/byos` | Use the BYOS pattern recommended for Azure Services. |
|
|
38
|
+
| `@azure-tools/typespec-azure-core/casing-style` | Ensure proper casing style. |
|
|
39
|
+
| `@azure-tools/typespec-azure-core/composition-over-inheritance` | Check that if a model is used in an operation and has derived models that it has a discriminator or recommend to use composition via spread or `is`. |
|
|
40
|
+
| `@azure-tools/typespec-azure-core/known-encoding` | Check for supported encodings. |
|
|
41
|
+
| `@azure-tools/typespec-azure-core/long-running-polling-operation-required` | Long-running operations should have a linked polling operation. |
|
|
42
|
+
| [`@azure-tools/typespec-azure-core/no-closed-literal-union`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-closed-literal-union) | Unions of literals should include the base scalar type to mark them as open enum. |
|
|
43
|
+
| [`@azure-tools/typespec-azure-core/no-enum`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-enum) | Azure services should not use enums. |
|
|
44
|
+
| `@azure-tools/typespec-azure-core/no-error-status-codes` | Recommend using the error response defined by Azure REST API guidelines. |
|
|
45
|
+
| `@azure-tools/typespec-azure-core/no-explicit-routes-resource-ops` | The @route decorator should not be used on standard resource operation signatures. |
|
|
46
|
+
| [`@azure-tools/typespec-azure-core/non-breaking-versioning`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/non-breaking-versioning) | Check that only backward compatible versioning change are done to a service. |
|
|
47
|
+
| [`@azure-tools/typespec-azure-core/no-generic-numeric`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-generic-numeric) | Don't use generic types. Use more specific types instead. |
|
|
48
|
+
| [`@azure-tools/typespec-azure-core/no-nullable`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-nullable) | Use `?` for optional properties. |
|
|
49
|
+
| `@azure-tools/typespec-azure-core/no-offsetdatetime` | Prefer using `utcDateTime` when representing a datetime unless an offset is necessary. |
|
|
50
|
+
| `@azure-tools/typespec-azure-core/no-response-body` | Ensure that the body is set correctly for the response type. |
|
|
51
|
+
| `@azure-tools/typespec-azure-core/no-rpc-path-params` | Operations defined using RpcOperation should not have path parameters. |
|
|
52
|
+
| `@azure-tools/typespec-azure-core/no-operation-id` | Operation ID is automatically generated by the OpenAPI emitters and should not normally be specified. |
|
|
53
|
+
| `@azure-tools/typespec-azure-core/prefer-csv-collection-format` | It is recommended to use "csv" for collection format of parameters. |
|
|
54
|
+
| [`@azure-tools/typespec-azure-core/no-format`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/prevent-format) | Azure services should not use the `@format` decorator. |
|
|
55
|
+
| `@azure-tools/typespec-azure-core/no-multiple-discriminator` | Classes should have at most one discriminator. |
|
|
56
|
+
| `@azure-tools/typespec-azure-core/no-rest-library-interfaces` | Resource interfaces from the TypeSpec.Rest.Resource library are incompatible with Azure.Core. |
|
|
57
|
+
| `@azure-tools/typespec-azure-core/no-unknown` | Azure services must not have properties of type `unknown`. |
|
|
58
|
+
| `@azure-tools/typespec-azure-core/property-name-conflict` | Avoid naming conflicts between a property and a model of the same name. |
|
|
59
|
+
| [`@azure-tools/typespec-azure-core/bad-record-type`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/bad-record-type) | Identify bad record definitions. |
|
|
60
|
+
| `@azure-tools/typespec-azure-core/documentation-required` | Require documentation over enums, models, and operations. |
|
|
61
|
+
| `@azure-tools/typespec-azure-core/key-visibility-required` | Key properties need to have an explicit visibility setting. |
|
|
62
|
+
| `@azure-tools/typespec-azure-core/response-schema-problem` | Warn about operations having multiple non-error response schemas. |
|
|
63
|
+
| `@azure-tools/typespec-azure-core/rpc-operation-request-body` | Warning for RPC body problems. |
|
|
64
|
+
| [`@azure-tools/typespec-azure-core/spread-discriminated-model`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/spread-discriminated-model) | Check a model with a discriminator has not been used in composition. |
|
|
65
|
+
| `@azure-tools/typespec-azure-core/use-standard-names` | Use recommended names for operations. |
|
|
66
|
+
| [`@azure-tools/typespec-azure-core/use-standard-operations`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/use-standard-operations) | Operations should be defined using a signature from the Azure.Core namespace. |
|
|
67
|
+
| [`@azure-tools/typespec-azure-core/no-string-discriminator`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-string-discriminator) | Azure services discriminated models should define the discriminated property as an extensible union. |
|
|
68
|
+
| [`@azure-tools/typespec-azure-core/require-versioned`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/require-versioned) | Azure services should use the versioning library. |
|
|
69
|
+
| `@azure-tools/typespec-azure-core/friendly-name` | Ensures that @friendlyName is used as intended. |
|
|
70
|
+
| [`@azure-tools/typespec-azure-core/no-private-usage`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-private-usage) | Verify that elements inside Private namespace are not referenced. |
|
|
71
|
+
| [`@azure-tools/typespec-azure-core/no-query-explode`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-query-explode) | It is recommended to serialize query parameter without explode: true |
|
|
72
72
|
|
|
73
73
|
## Decorators
|
|
74
74
|
|
package/dist/src/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export * from "./decorators.js";
|
|
|
5
5
|
export { UnionEnum, getUnionAsEnum } from "./helpers/union-enums.js";
|
|
6
6
|
export * from "./lro-helpers.js";
|
|
7
7
|
export * from "./rules/prevent-rest-library.js";
|
|
8
|
-
export * from "./rules/use-standard-
|
|
8
|
+
export * from "./rules/use-standard-operations.js";
|
|
9
9
|
export * from "./traits.js";
|
|
10
10
|
export * from "./utils.js";
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,eAAe,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACrE,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,eAAe,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACrE,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export * from "./decorators.js";
|
|
|
5
5
|
export { getUnionAsEnum } from "./helpers/union-enums.js";
|
|
6
6
|
export * from "./lro-helpers.js";
|
|
7
7
|
export * from "./rules/prevent-rest-library.js";
|
|
8
|
-
export * from "./rules/use-standard-
|
|
8
|
+
export * from "./rules/use-standard-operations.js";
|
|
9
9
|
export * from "./traits.js";
|
|
10
10
|
export * from "./utils.js";
|
|
11
11
|
/** @internal */
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAa,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACrE,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAa,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACrE,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAE3B,gBAAgB;AAChB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/src/linter.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineLinter } from "@typespec/compiler";
|
|
2
2
|
import { apiVersionRule } from "./rules/api-version-parameter.js";
|
|
3
3
|
import { authRequiredRule } from "./rules/auth-required.js";
|
|
4
|
+
import { badRecordTypeRule } from "./rules/bad-record-type.js";
|
|
4
5
|
import { byosRule } from "./rules/byos.js";
|
|
5
6
|
import { casingRule } from "./rules/casing.js";
|
|
6
7
|
import { compositionOverInheritanceRule } from "./rules/composition-over-inheritance.js";
|
|
@@ -12,6 +13,7 @@ import { noEnumRule } from "./rules/no-enum.js";
|
|
|
12
13
|
import { noErrorStatusCodesRule } from "./rules/no-error-status-codes.js";
|
|
13
14
|
import { noExplicitRoutesResourceOps } from "./rules/no-explicit-routes-resource-ops.js";
|
|
14
15
|
import { noGenericNumericRule } from "./rules/no-generic-numeric.js";
|
|
16
|
+
import { noMultipleDiscriminatorRule } from "./rules/no-multiple-discriminator.js";
|
|
15
17
|
import { noNullableRule } from "./rules/no-nullable.js";
|
|
16
18
|
import { noOffsetDateTimeRule } from "./rules/no-offsetdatetime.js";
|
|
17
19
|
import { operationIdRule } from "./rules/no-operation-id.js";
|
|
@@ -22,12 +24,10 @@ import { noRpcPathParamsRule } from "./rules/no-rpc-path-params.js";
|
|
|
22
24
|
import { noStringDiscriminatorRule } from "./rules/no-string-discriminator.js";
|
|
23
25
|
import { nonBreakingVersioningRule } from "./rules/non-breaking-versioning.js";
|
|
24
26
|
import { preferCsvCollectionFormatRule } from "./rules/prefer-csv-collection-format.js";
|
|
25
|
-
import {
|
|
26
|
-
import { preventMultipleDiscriminator } from "./rules/prevent-multiple-discriminator.js";
|
|
27
|
+
import { preventFormatRule } from "./rules/prevent-format.js";
|
|
27
28
|
import { preventRestLibraryInterfaces } from "./rules/prevent-rest-library.js";
|
|
28
29
|
import { preventUnknownType } from "./rules/prevent-unknown.js";
|
|
29
30
|
import { propertyNameRule } from "./rules/property-naming.js";
|
|
30
|
-
import { recordTypeRule } from "./rules/record-types.js";
|
|
31
31
|
import { bodyArrayRule } from "./rules/request-body-array.js";
|
|
32
32
|
import { requireDocumentation } from "./rules/require-docs.js";
|
|
33
33
|
import { requireKeyVisibility } from "./rules/require-key-visibility.js";
|
|
@@ -36,7 +36,7 @@ import { responseSchemaMultiStatusCodeRule } from "./rules/response-schema-multi
|
|
|
36
36
|
import { rpcOperationRequestBodyRule } from "./rules/rpc-operation-request-body.js";
|
|
37
37
|
import { spreadDiscriminatedModelRule } from "./rules/spread-discriminated-model.js";
|
|
38
38
|
import { useStandardNames } from "./rules/use-standard-names.js";
|
|
39
|
-
import { useStandardOperations } from "./rules/use-standard-
|
|
39
|
+
import { useStandardOperations } from "./rules/use-standard-operations.js";
|
|
40
40
|
const rules = [
|
|
41
41
|
apiVersionRule,
|
|
42
42
|
authRequiredRule,
|
|
@@ -58,12 +58,12 @@ const rules = [
|
|
|
58
58
|
noRpcPathParamsRule,
|
|
59
59
|
operationIdRule,
|
|
60
60
|
preferCsvCollectionFormatRule,
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
preventFormatRule,
|
|
62
|
+
noMultipleDiscriminatorRule,
|
|
63
63
|
preventRestLibraryInterfaces,
|
|
64
64
|
preventUnknownType,
|
|
65
65
|
propertyNameRule,
|
|
66
|
-
|
|
66
|
+
badRecordTypeRule,
|
|
67
67
|
requireDocumentation,
|
|
68
68
|
requireKeyVisibility,
|
|
69
69
|
responseSchemaMultiStatusCodeRule,
|
package/dist/src/linter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linter.js","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,4CAA4C,EAAE,MAAM,kCAAkC,CAAC;AAChG,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CA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AM,8BAA8B,CAAC;AACpE,OAAO,EAAE,iCAAiC,EAAE,MAAM,8CAA8C,CAAC;AACjG,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,MAAM,KAAK,GAAG;IACZ,cAAc;IACd,gBAAgB;IAChB,aAAa;IACb,QAAQ;IACR,UAAU;IACV,8BAA8B;IAC9B,iBAAiB;IACjB,4CAA4C;IAC5C,wBAAwB;IACxB,UAAU;IACV,sBAAsB;IACtB,2BAA2B;IAC3B,yBAAyB;IACzB,oBAAoB;IACpB,cAAc;IACd,oBAAoB;IACpB,kBAAkB;IAClB,mBAAmB;IACnB,eAAe;IACf,6BAA6B;IAC7B,iBAAiB;IACjB,2BAA2B;IAC3B,4BAA4B;IAC5B,kBAAkB;IAClB,gBAAgB;IAChB,iBAAiB;IACjB,oBAAoB;IACpB,oBAAoB;IACpB,iCAAiC;IACjC,2BAA2B;IAC3B,4BAA4B;IAC5B,gBAAgB;IAChB,qBAAqB;IACrB,yBAAyB;IACzB,oBAAoB;IACpB,gBAAgB;IAChB,cAAc;IACd,kBAAkB;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC;IAClC,KAAK;IACL,QAAQ,EAAE;QACR,sBAAsB,EAAE;YACtB,MAAM,EAAE;gBACN,CAAC,oCAAoC,yBAAyB,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;aAC7E;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const badRecordTypeRule: import("@typespec/compiler").LinterRuleDefinition<"bad-record-type", {
|
|
2
2
|
readonly extendUnknown: import("@typespec/compiler").CallableMessage<["name", "keyword", "typeName", "keyword"]>;
|
|
3
3
|
readonly recordWithProperties: import("@typespec/compiler").CallableMessage<["name", "keyword", "typeName"]>;
|
|
4
4
|
}>;
|
|
5
|
-
//# sourceMappingURL=record-
|
|
5
|
+
//# sourceMappingURL=bad-record-type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bad-record-type.d.ts","sourceRoot":"","sources":["../../../src/rules/bad-record-type.ts"],"names":[],"mappings":"AA4EA,eAAO,MAAM,iBAAiB;;;EAyB5B,CAAC"}
|
|
@@ -52,10 +52,11 @@ function validatePropertyRecordType(context, type, target) {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
export const
|
|
55
|
+
export const badRecordTypeRule = createRule({
|
|
56
56
|
name: "bad-record-type",
|
|
57
57
|
description: "Identify bad record definitions.",
|
|
58
58
|
severity: "warning",
|
|
59
|
+
url: "https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/bad-record-type",
|
|
59
60
|
messages: {
|
|
60
61
|
extendUnknown: paramMessage `${"name"} should not use '${"keyword"} Record<${"typeName"}>'. Use '${"keyword"} Record<string>' instead.`,
|
|
61
62
|
recordWithProperties: paramMessage `${"name"} that uses '${"keyword"} Record<${"typeName"}>' should not have properties.`,
|
|
@@ -78,4 +79,4 @@ export const recordTypeRule = createRule({
|
|
|
78
79
|
};
|
|
79
80
|
},
|
|
80
81
|
});
|
|
81
|
-
//# sourceMappingURL=record-
|
|
82
|
+
//# sourceMappingURL=bad-record-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bad-record-type.js","sourceRoot":"","sources":["../../../src/rules/bad-record-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,UAAU,EACV,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B,SAAS,oBAAoB,CAC3B,OAA8C,EAC9C,IAAU,EACV,MAAa;IAEb,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,IAAI,I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,YAAY,CAAA,GAAG,MAAM,eAAe,SAAS,WAAW,UAAU,gCAAgC;KACzH;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,KAAK,EAAE,CAAC,KAAY,EAAE,EAAE;gBACtB,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;oBAC7C,oBAAoB,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBAC5D,CAAC;qBAAM,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;oBAC3B,yBAAyB,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;gBAC7D,CAAC;YACH,CAAC;YACD,aAAa,EAAE,CAAC,IAAmB,EAAE,EAAE;gBACrC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;oBACpD,0BAA0B,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;gBACvD,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const noMultipleDiscriminatorRule: import("@typespec/compiler").LinterRuleDefinition<"no-multiple-discriminator", {
|
|
2
|
+
readonly default: import("@typespec/compiler").CallableMessage<["name", "values"]>;
|
|
3
|
+
}>;
|
|
4
|
+
//# sourceMappingURL=no-multiple-discriminator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-multiple-discriminator.d.ts","sourceRoot":"","sources":["../../../src/rules/no-multiple-discriminator.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,2BAA2B;;EA+BtC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRule, getDiscriminator, paramMessage, } from "@typespec/compiler";
|
|
2
|
-
export const
|
|
2
|
+
export const noMultipleDiscriminatorRule = createRule({
|
|
3
3
|
name: "no-multiple-discriminator",
|
|
4
4
|
description: "Classes should have at most one discriminator.",
|
|
5
5
|
severity: "warning",
|
|
@@ -31,4 +31,4 @@ export const preventMultipleDiscriminator = createRule({
|
|
|
31
31
|
};
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
|
-
//# sourceMappingURL=
|
|
34
|
+
//# sourceMappingURL=no-multiple-discriminator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-multiple-discriminator.js","sourceRoot":"","sources":["../../../src/rules/no-multiple-discriminator.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,gBAAgB,EAChB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,MAAM,2BAA2B,GAAG,UAAU,CAAC;IACpD,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,gDAAgD;IAC7D,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY,CAAA,wBAAwB,MAAM,8DAA8D,QAAQ,GAAG;KAC7H;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,KAAK,EAAE,CAAC,KAAY,EAAE,EAAE;gBACtB,MAAM,cAAc,GAAG,IAAI,KAAK,EAAiB,CAAC;gBAClD,IAAI,OAAO,GAAsB,KAAK,CAAC;gBACvC,OAAO,OAAO,EAAE,CAAC;oBACf,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;oBACjE,IAAI,aAAa,EAAE,CAAC;wBAClB,cAAc,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;oBACrC,CAAC;oBACD,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;gBAC9B,CAAC;gBACD,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC9B,OAAO,CAAC,gBAAgB,CAAC;wBACvB,MAAM,EAAE,KAAK;wBACb,MAAM,EAAE;4BACN,IAAI,EAAE,KAAK,CAAC,IAAI;4BAChB,MAAM,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;yBACjE;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-nullable.d.ts","sourceRoot":"","sources":["../../../src/rules/no-nullable.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;
|
|
1
|
+
{"version":3,"file":"no-nullable.d.ts","sourceRoot":"","sources":["../../../src/rules/no-nullable.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;EAuBzB,CAAC"}
|
|
@@ -3,6 +3,7 @@ export const noNullableRule = createRule({
|
|
|
3
3
|
name: "no-nullable",
|
|
4
4
|
description: "Use `?` for optional properties.",
|
|
5
5
|
severity: "warning",
|
|
6
|
+
url: "https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-nullable",
|
|
6
7
|
messages: {
|
|
7
8
|
default: "Don't use `| null`. If you meant to have an optional property, use `?`. (e.g. `myProp?: string`)",
|
|
8
9
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-nullable.js","sourceRoot":"","sources":["../../../src/rules/no-nullable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,UAAU,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE3E,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,kCAAkC;IAC/C,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE;QACR,OAAO,EACL,kGAAkG;KACrG;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,aAAa,EA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;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const preventFormatRule: import("@typespec/compiler").LinterRuleDefinition<"no-format", {
|
|
2
2
|
readonly default: "Azure services should not use the `@format` decorator.";
|
|
3
3
|
}>;
|
|
4
4
|
//# sourceMappingURL=prevent-format.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prevent-format.d.ts","sourceRoot":"","sources":["../../../src/rules/prevent-format.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prevent-format.d.ts","sourceRoot":"","sources":["../../../src/rules/prevent-format.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;EA8B5B,CAAC"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { createRule } from "@typespec/compiler";
|
|
2
|
-
|
|
3
|
-
export const preventFormatUse = createRule({
|
|
2
|
+
export const preventFormatRule = createRule({
|
|
4
3
|
name: "no-format",
|
|
5
4
|
description: "Azure services should not use the `@format` decorator.",
|
|
6
5
|
severity: "warning",
|
|
6
|
+
url: "https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/prevent-format",
|
|
7
7
|
messages: {
|
|
8
8
|
default: "Azure services should not use the `@format` decorator.",
|
|
9
9
|
},
|
|
10
10
|
create(context) {
|
|
11
11
|
return {
|
|
12
12
|
scalar: (scalar) => {
|
|
13
|
-
if (isExcludedCoreType(context.program, scalar)) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
13
|
for (const dec of scalar.decorators) {
|
|
17
14
|
if (dec.decorator.name === "$format") {
|
|
18
15
|
context.reportDiagnostic({
|
|
@@ -22,9 +19,6 @@ export const preventFormatUse = createRule({
|
|
|
22
19
|
}
|
|
23
20
|
},
|
|
24
21
|
modelProperty: (model) => {
|
|
25
|
-
if (isExcludedCoreType(context.program, model)) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
22
|
for (const dec of model.decorators) {
|
|
29
23
|
if (dec.decorator.name === "$format") {
|
|
30
24
|
context.reportDiagnostic({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prevent-format.js","sourceRoot":"","sources":["../../../src/rules/prevent-format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"prevent-format.js","sourceRoot":"","sources":["../../../src/rules/prevent-format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;IAC1C,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,wDAAwD;IACrE,QAAQ,EAAE,SAAS;IACnB,GAAG,EAAE,uFAAuF;IAC5F,QAAQ,EAAE;QACR,OAAO,EAAE,wDAAwD;KAClE;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,MAAM,EAAE,CAAC,MAAc,EAAE,EAAE;gBACzB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;oBACpC,IAAI,GAAG,CAAC,SAAS,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;wBACrC,OAAO,CAAC,gBAAgB,CAAC;4BACvB,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM;yBACrC,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;YACD,aAAa,EAAE,CAAC,KAAoB,EAAE,EAAE;gBACtC,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;oBACnC,IAAI,GAAG,CAAC,SAAS,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;wBACrC,OAAO,CAAC,gBAAgB,CAAC;4BACvB,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;yBACpC,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spread-discriminated-model.d.ts","sourceRoot":"","sources":["../../../src/rules/spread-discriminated-model.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B;;
|
|
1
|
+
{"version":3,"file":"spread-discriminated-model.d.ts","sourceRoot":"","sources":["../../../src/rules/spread-discriminated-model.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B;;EA+CvC,CAAC"}
|
|
@@ -3,6 +3,7 @@ export const spreadDiscriminatedModelRule = createRule({
|
|
|
3
3
|
name: "spread-discriminated-model",
|
|
4
4
|
description: "Check a model with a discriminator has not been used in composition.",
|
|
5
5
|
severity: "warning",
|
|
6
|
+
url: "https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/spread-discriminated-model",
|
|
6
7
|
messages: {
|
|
7
8
|
default: paramMessage `Model '${"name"}' is being spread but has a discriminator. The relation between those 2 models will be lost and defeat the purpose of \`@discriminator\` Consider using \`extends\` instead.`,
|
|
8
9
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spread-discriminated-model.js","sourceRoot":"","sources":["../../../src/rules/spread-discriminated-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEnG,MAAM,CAAC,MAAM,4BAA4B,GAAG,UAAU,CAAC;IACrD,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE,sEAAsE;IACnF,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY,CAAA,UAAU,MAAM,8KAA8K;KACpN;IACD,MAAM,CAAC,OAAO;QACZ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AAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,WAAW,CACnE,IAAI,KAAK,CAAC;wBACb,OAAO,CAAC,gBAAgB,CAAC;4BACvB,MAAM,EAAE;gCACN,IAAI,EAAE,WAAW,CAAC,IAAI;6BACvB;4BACD,MAAM,EAAE,gBAAgB;yBACzB,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export declare function __unsupported_enable_checkStandardOperations(enabled: boolean): void;
|
|
2
1
|
export declare const useStandardOperations: import("@typespec/compiler").LinterRuleDefinition<"use-standard-operations", {
|
|
3
2
|
readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
|
|
4
3
|
}>;
|
|
5
|
-
//# sourceMappingURL=use-standard-
|
|
4
|
+
//# sourceMappingURL=use-standard-operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-standard-operations.d.ts","sourceRoot":"","sources":["../../../src/rules/use-standard-operations.ts"],"names":[],"mappings":"AAyBA,eAAO,MAAM,qBAAqB;;EAiDhC,CAAC"}
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
// HACK HACK HACK: This should be removed once Azure.Core-compatible
|
|
4
|
-
// Azure.ResourceManager operations are added
|
|
5
|
-
let checkStandardOperationsEnabled = true;
|
|
6
|
-
export function __unsupported_enable_checkStandardOperations(enabled) {
|
|
7
|
-
checkStandardOperationsEnabled = enabled;
|
|
8
|
-
}
|
|
9
|
-
function derivesFromAzureCoreOperation(program, operation) {
|
|
1
|
+
import { createRule, getNamespaceFullName, isTemplateDeclarationOrInstance, paramMessage, } from "@typespec/compiler";
|
|
2
|
+
function derivesFromAzureCoreOperation(operation) {
|
|
10
3
|
// Check every link in the signature chain
|
|
11
|
-
while (operation.
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
while (operation.sourceOperation) {
|
|
5
|
+
if (operation.sourceOperation.namespace &&
|
|
6
|
+
getNamespaceFullName(operation.sourceOperation.namespace) === "Azure.Core") {
|
|
14
7
|
return true;
|
|
15
8
|
}
|
|
16
9
|
// See if the base operation ultimately derives from an Azure.Core operation
|
|
17
|
-
operation =
|
|
10
|
+
operation = operation.sourceOperation;
|
|
18
11
|
}
|
|
19
12
|
return false;
|
|
20
13
|
}
|
|
@@ -22,23 +15,17 @@ export const useStandardOperations = createRule({
|
|
|
22
15
|
name: "use-standard-operations",
|
|
23
16
|
description: "Operations should be defined using a signature from the Azure.Core namespace.",
|
|
24
17
|
severity: "warning",
|
|
18
|
+
url: "https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/use-standard-operations",
|
|
25
19
|
messages: {
|
|
26
20
|
default: paramMessage `Operation '${"name"}' should be defined using a signature from the Azure.Core namespace.`,
|
|
27
21
|
},
|
|
28
22
|
create(context) {
|
|
29
23
|
return {
|
|
30
24
|
operation: (operationContext) => {
|
|
31
|
-
// HACK HACK HACK: This should be removed once Azure.Core-compatible
|
|
32
|
-
// Azure.ResourceManager operations are added
|
|
33
|
-
if (!checkStandardOperationsEnabled)
|
|
34
|
-
return;
|
|
35
25
|
// Can we skip this operation? Either it or the interface it's defined in
|
|
36
26
|
// has to be defined in an approved namespace, or the operation itself must
|
|
37
27
|
// be templated.
|
|
38
|
-
if ((operationContext
|
|
39
|
-
isExcludedCoreType(context.program, operationContext.interface)) ||
|
|
40
|
-
(!operationContext.interface && isExcludedCoreType(context.program, operationContext)) ||
|
|
41
|
-
isTemplateDeclarationOrInstance(operationContext)) {
|
|
28
|
+
if (isTemplateDeclarationOrInstance(operationContext)) {
|
|
42
29
|
return;
|
|
43
30
|
}
|
|
44
31
|
// If the operation comes from a TypeSpec.Rest.Resource interface, skip it
|
|
@@ -50,8 +37,7 @@ export const useStandardOperations = createRule({
|
|
|
50
37
|
}
|
|
51
38
|
// Otherwise, if the operation signature is a raw declaration or does not
|
|
52
39
|
// derive from an operation in Azure.Core, it violates this linting rule.
|
|
53
|
-
if (operationContext
|
|
54
|
-
!derivesFromAzureCoreOperation(context.program, operationContext)) {
|
|
40
|
+
if (!derivesFromAzureCoreOperation(operationContext)) {
|
|
55
41
|
context.reportDiagnostic({
|
|
56
42
|
// If the namespace where the operation's interface is defined is
|
|
57
43
|
// different than the namespace we're in, mark the operation's
|
|
@@ -70,4 +56,4 @@ export const useStandardOperations = createRule({
|
|
|
70
56
|
};
|
|
71
57
|
},
|
|
72
58
|
});
|
|
73
|
-
//# sourceMappingURL=use-standard-
|
|
59
|
+
//# sourceMappingURL=use-standard-operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-standard-operations.js","sourceRoot":"","sources":["../../../src/rules/use-standard-operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,oBAAoB,EACpB,+BAA+B,EAC/B,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B,SAAS,6BAA6B,CAAC,SAAoB;IACzD,0CAA0C;IAC1C,OAAO,SAAS,CAAC,eAAe,EAAE,CAAC;QACjC,IACE,SAAS,CAAC,eAAe,CAAC,SAAS;YACnC,oBAAoB,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,KAAK,YAAY,EAC1E,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QAED,4EAA4E;QAC5E,SAAS,GAAG,SAAS,CAAC,eAAe,CAAC;IACxC,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,CAAC;IAC9C,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,+EAA+E;IAC5F,QAAQ,EAAE,SAAS;IACnB,GAAG,EAAE,gGAAgG;IACrG,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY,CAAA,cAAc,MAAM,sEAAsE;KAChH;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,SAAS,EAAE,CAAC,gBAA2B,EAAE,EAAE;gBACzC,0EAA0E;gBAC1E,2EAA2E;gBAC3E,gBAAgB;gBAChB,IAAI,+BAA+B,CAAC,gBAAgB,CAAC,EAAE,CAAC;oBACtD,OAAO;gBACT,CAAC;gBAED,0EAA0E;gBAC1E,qEAAqE;gBACrE,IACE,gBAAgB,CAAC,SAAS;oBAC1B,gBAAgB,CAAC,SAAS;oBAC1B,oBAAoB,CAAC,gBAAgB,CAAC,SAAS,CAAC,KAAK,wBAAwB,EAC7E,CAAC;oBACD,OAAO;gBACT,CAAC;gBAED,yEAAyE;gBACzE,yEAAyE;gBACzE,IAAI,CAAC,6BAA6B,CAAC,gBAAgB,CAAC,EAAE,CAAC;oBACrD,OAAO,CAAC,gBAAgB,CAAC;wBACvB,iEAAiE;wBACjE,8DAA8D;wBAC9D,+DAA+D;wBAC/D,oBAAoB;wBACpB,MAAM,EACJ,gBAAgB,CAAC,SAAS;4BAC1B,gBAAgB,CAAC,SAAS,CAAC,SAAS,KAAK,gBAAgB,CAAC,SAAS;4BACjE,CAAC,CAAC,gBAAgB,CAAC,SAAS;4BAC5B,CAAC,CAAC,gBAAgB;wBACtB,MAAM,EAAE;4BACN,IAAI,EAAE,gBAAgB,CAAC,IAAI;yBAC5B;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-core",
|
|
3
|
-
"version": "0.46.0-dev.
|
|
3
|
+
"version": "0.46.0-dev.2",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Core library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
"!dist/test/**"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@typespec/compiler": "~0.59.
|
|
43
|
-
"@typespec/http": "~0.59.
|
|
44
|
-
"@typespec/rest": "~0.59.
|
|
42
|
+
"@typespec/compiler": "~0.59.1 || >=0.60.0-dev <0.60.0",
|
|
43
|
+
"@typespec/http": "~0.59.1 || >=0.60.0-dev <0.60.0",
|
|
44
|
+
"@typespec/rest": "~0.59.1 || >=0.60.0-dev <0.60.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "~18.11.19",
|
|
48
|
-
"@typespec/compiler": "~0.59.
|
|
49
|
-
"@typespec/http": "~0.59.
|
|
48
|
+
"@typespec/compiler": "~0.59.1 || >=0.60.0-dev <0.60.0",
|
|
49
|
+
"@typespec/http": "~0.59.1 || >=0.60.0-dev <0.60.0",
|
|
50
50
|
"@typespec/library-linter": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
51
51
|
"@typespec/openapi": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
52
|
-
"@typespec/rest": "~0.59.
|
|
52
|
+
"@typespec/rest": "~0.59.1 || >=0.60.0-dev <0.60.0",
|
|
53
53
|
"@typespec/versioning": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
54
54
|
"@vitest/coverage-v8": "^2.0.4",
|
|
55
55
|
"@vitest/ui": "^2.0.4",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const preventMultipleDiscriminator: import("@typespec/compiler").LinterRuleDefinition<"no-multiple-discriminator", {
|
|
2
|
-
readonly default: import("@typespec/compiler").CallableMessage<["name", "values"]>;
|
|
3
|
-
}>;
|
|
4
|
-
//# sourceMappingURL=prevent-multiple-discriminator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prevent-multiple-discriminator.d.ts","sourceRoot":"","sources":["../../../src/rules/prevent-multiple-discriminator.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,4BAA4B;;EA+BvC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prevent-multiple-discriminator.js","sourceRoot":"","sources":["../../../src/rules/prevent-multiple-discriminator.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,gBAAgB,EAChB,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,MAAM,4BAA4B,GAAG,UAAU,CAAC;IACrD,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,gDAAgD;IAC7D,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY,CAAA,wBAAwB,MAAM,8DAA8D,QAAQ,GAAG;KAC7H;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,KAAK,EAAE,CAAC,KAAY,EAAE,EAAE;gBACtB,MAAM,cAAc,GAAG,IAAI,KAAK,EAAiB,CAAC;gBAClD,IAAI,OAAO,GAAsB,KAAK,CAAC;gBACvC,OAAO,OAAO,EAAE,CAAC;oBACf,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;oBACjE,IAAI,aAAa,EAAE,CAAC;wBAClB,cAAc,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;oBACrC,CAAC;oBACD,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;gBAC9B,CAAC;gBACD,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC9B,OAAO,CAAC,gBAAgB,CAAC;wBACvB,MAAM,EAAE,KAAK;wBACb,MAAM,EAAE;4BACN,IAAI,EAAE,KAAK,CAAC,IAAI;4BAChB,MAAM,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;yBACjE;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"record-types.d.ts","sourceRoot":"","sources":["../../../src/rules/record-types.ts"],"names":[],"mappings":"AA4EA,eAAO,MAAM,cAAc;;;EAwBzB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"record-types.js","sourceRoot":"","sources":["../../../src/rules/record-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,UAAU,EACV,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B,SAAS,oBAAoB,CAC3B,OAA8C,EAC9C,IAAU,EACV,MAAa;IAEb,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QACzD,OAAO,CAAC,gBAAgB,CAAC;YACvB,SAAS,EAAE,eAAe;YAC1B,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;SAClE,CAAC,CAAC;IACL,CAAC;SAAM,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QAChE,OAAO,CAAC,gBAAgB,CAAC;YACvB,SAAS,EAAE,sBAAsB;YACjC,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;SAClE,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,SAAS,yBAAyB,CAChC,OAA8C,EAC9C,SAAgB,EAChB,MAAa;IAEb,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QACvB,OAAO;IACT,CAAC;IACD,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;IAC3C,IAAI,UAAU,CA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