@azure-tools/typespec-azure-core 0.63.0-dev.4 → 0.63.0
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 +1 -0
- package/dist/src/linter.d.ts.map +1 -1
- package/dist/src/linter.js +2 -0
- package/dist/src/linter.js.map +1 -1
- package/dist/src/rules/no-unnamed-union.d.ts +4 -0
- package/dist/src/rules/no-unnamed-union.d.ts.map +1 -0
- package/dist/src/rules/no-unnamed-union.js +56 -0
- package/dist/src/rules/no-unnamed-union.js.map +1 -0
- package/package.json +13 -14
package/README.md
CHANGED
|
@@ -49,6 +49,7 @@ Available ruleSets:
|
|
|
49
49
|
| `@azure-tools/typespec-azure-core/no-response-body` | Ensure that the body is set correctly for the response type. |
|
|
50
50
|
| `@azure-tools/typespec-azure-core/no-rpc-path-params` | Operations defined using RpcOperation should not have path parameters. |
|
|
51
51
|
| `@azure-tools/typespec-azure-core/no-openapi` | Azure specs should not be using decorators from @typespec/openapi or @azure-tools/typespec-autorest |
|
|
52
|
+
| [`@azure-tools/typespec-azure-core/no-unnamed-union`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-unnamed-union) | Azure services should not define a union expression but create a declaration. |
|
|
52
53
|
| [`@azure-tools/typespec-azure-core/no-header-explode`](https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-header-explode) | It is recommended to serialize header parameter without explode: true |
|
|
53
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. |
|
|
54
55
|
| `@azure-tools/typespec-azure-core/no-multiple-discriminator` | Classes should have at most one discriminator. |
|
package/dist/src/linter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"linter.d.ts","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AAqFA,eAAO,MAAM,OAAO,+CASlB,CAAC"}
|
package/dist/src/linter.js
CHANGED
|
@@ -24,6 +24,7 @@ import { noQueryExplodeRule } from "./rules/no-query-explode.js";
|
|
|
24
24
|
import { noResponseBodyRule } from "./rules/no-response-body.js";
|
|
25
25
|
import { noRpcPathParamsRule } from "./rules/no-rpc-path-params.js";
|
|
26
26
|
import { noStringDiscriminatorRule } from "./rules/no-string-discriminator.js";
|
|
27
|
+
import { noUnnamedUnionRule } from "./rules/no-unnamed-union.js";
|
|
27
28
|
import { nonBreakingVersioningRule } from "./rules/non-breaking-versioning.js";
|
|
28
29
|
import { apiVersionRule } from "./rules/operation-missing-api-version.js";
|
|
29
30
|
import { preventFormatRule } from "./rules/prevent-format.js";
|
|
@@ -59,6 +60,7 @@ const rules = [
|
|
|
59
60
|
noResponseBodyRule,
|
|
60
61
|
noRpcPathParamsRule,
|
|
61
62
|
noOpenAPIRule,
|
|
63
|
+
noUnnamedUnionRule,
|
|
62
64
|
noHeaderExplodeRule,
|
|
63
65
|
preventFormatRule,
|
|
64
66
|
noMultipleDiscriminatorRule,
|
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,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,M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IACtB,2BAA2B;IAC3B,yBAAyB;IACzB,oBAAoB;IACpB,cAAc;IACd,oBAAoB;IACpB,kBAAkB;IAClB,mBAAmB;IACnB,aAAa;IACb,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;IACjB,2BAA2B;IAC3B,4BAA4B;IAC5B,kBAAkB;IAClB,iBAAiB;IACjB,oBAAoB;IACpB,oBAAoB;IACpB,iCAAiC;IACjC,2BAA2B;IAC3B,4BAA4B;IAC5B,gBAAgB;IAChB,qBAAqB;IACrB,yBAAyB;IACzB,oBAAoB;IACpB,gBAAgB;IAChB,cAAc;IACd,aAAa;IACb,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-unnamed-union.d.ts","sourceRoot":"","sources":["../../../src/rules/no-unnamed-union.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB;;EAmD7B,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { createRule, paramMessage } from "@typespec/compiler";
|
|
2
|
+
import { $ } from "@typespec/compiler/typekit";
|
|
3
|
+
import { getHeaderFieldName, isHeader, isStatusCode } from "@typespec/http";
|
|
4
|
+
export const noUnnamedUnionRule = createRule({
|
|
5
|
+
name: "no-unnamed-union",
|
|
6
|
+
description: "Azure services should not define a union expression but create a declaration.",
|
|
7
|
+
severity: "warning",
|
|
8
|
+
url: "https://azure.github.io/typespec-azure/docs/libraries/azure-core/rules/no-unnamed-union",
|
|
9
|
+
messages: {
|
|
10
|
+
default: paramMessage `Union expression should be defined as a named union declaration.`,
|
|
11
|
+
},
|
|
12
|
+
create(context) {
|
|
13
|
+
const program = context.program;
|
|
14
|
+
const excludedUnions = new Set();
|
|
15
|
+
const invalidUnions = new Set();
|
|
16
|
+
return {
|
|
17
|
+
modelProperty: (prop) => {
|
|
18
|
+
const type = prop.type;
|
|
19
|
+
if (type.kind !== "Union" || type.name) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (isStatusCode(program, prop) ||
|
|
23
|
+
(isHeader(program, prop) &&
|
|
24
|
+
getHeaderFieldName(program, prop).toLowerCase() === "content-type")) {
|
|
25
|
+
excludedUnions.add(type);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
operation: (operation) => {
|
|
29
|
+
if (operation.returnType.kind === "Union") {
|
|
30
|
+
excludedUnions.add(operation.returnType);
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
union: (union) => {
|
|
34
|
+
if (union.kind === "Union" && !union.name && !isOnlyNullableUnion(program, union)) {
|
|
35
|
+
invalidUnions.add(union);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
exit: () => {
|
|
39
|
+
for (const union of invalidUnions) {
|
|
40
|
+
if (!excludedUnions.has(union)) {
|
|
41
|
+
context.reportDiagnostic({
|
|
42
|
+
format: { enumName: union.name },
|
|
43
|
+
target: union,
|
|
44
|
+
codefixes: [],
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
/** Check if the union is only there to make the type nullable */
|
|
53
|
+
function isOnlyNullableUnion(program, union) {
|
|
54
|
+
return ([...union.variants.values()].filter((v) => v.type !== $(program).intrinsic.null).length === 1);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=no-unnamed-union.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-unnamed-union.js","sourceRoot":"","sources":["../../../src/rules/no-unnamed-union.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE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AAK,EAAE,CAAC,KAAK,EAAE,EAAE;gBACf,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC;oBAClF,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBAC3B,CAAC;YACH,CAAC;YACD,IAAI,EAAE,GAAG,EAAE;gBACT,KAAK,MAAM,KAAK,IAAI,aAAa,EAAE,CAAC;oBAClC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;wBAC/B,OAAO,CAAC,gBAAgB,CAAC;4BACvB,MAAM,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAE;4BAChC,MAAM,EAAE,KAAK;4BACb,SAAS,EAAE,EAAE;yBACd,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,iEAAiE;AACjE,SAAS,mBAAmB,CAAC,OAAgB,EAAE,KAAY;IACzD,OAAO,CACL,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAC9F,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-core",
|
|
3
|
-
"version": "0.63.0
|
|
3
|
+
"version": "0.63.0",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Core library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|
|
@@ -47,30 +47,29 @@
|
|
|
47
47
|
"!dist/test/**"
|
|
48
48
|
],
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@typespec/compiler": "^1.
|
|
51
|
-
"@typespec/http": "^1.
|
|
52
|
-
"@typespec/rest": "^0.
|
|
50
|
+
"@typespec/compiler": "^1.7.0",
|
|
51
|
+
"@typespec/http": "^1.7.0",
|
|
52
|
+
"@typespec/rest": "^0.77.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "~24.10.1",
|
|
56
|
-
"@typespec/compiler": "^1.6.0",
|
|
57
|
-
"@typespec/http": "^1.6.0",
|
|
58
|
-
"@typespec/library-linter": "^0.76.0 || >=0.77.0-dev <0.77.0",
|
|
59
|
-
"@typespec/openapi": "^1.6.0",
|
|
60
|
-
"@typespec/rest": "^0.76.0 || >=0.77.0-dev <0.77.0",
|
|
61
|
-
"@typespec/tspd": "^0.73.1 || >=0.74.0-dev <0.74.0",
|
|
62
|
-
"@typespec/versioning": "^0.76.0 || >=0.77.0-dev <0.77.0",
|
|
63
56
|
"@vitest/coverage-v8": "^4.0.4",
|
|
64
57
|
"@vitest/ui": "^4.0.4",
|
|
65
58
|
"c8": "^10.1.3",
|
|
66
59
|
"rimraf": "~6.1.2",
|
|
67
60
|
"typescript": "~5.9.2",
|
|
68
|
-
"vitest": "^4.0.4"
|
|
61
|
+
"vitest": "^4.0.4",
|
|
62
|
+
"@typespec/compiler": "^1.7.0",
|
|
63
|
+
"@typespec/library-linter": "^0.77.0",
|
|
64
|
+
"@typespec/openapi": "^1.7.0",
|
|
65
|
+
"@typespec/http": "^1.7.0",
|
|
66
|
+
"@typespec/rest": "^0.77.0",
|
|
67
|
+
"@typespec/tspd": "^0.73.2",
|
|
68
|
+
"@typespec/versioning": "^0.77.0"
|
|
69
69
|
},
|
|
70
|
-
"dependencies": {},
|
|
71
70
|
"scripts": {
|
|
72
71
|
"clean": "rimraf ./dist ./temp",
|
|
73
|
-
"build": "
|
|
72
|
+
"build": "pnpm run gen-extern-signature && tsc -p . && pnpm run lint-typespec-library",
|
|
74
73
|
"watch": "tsc -p . --watch",
|
|
75
74
|
"gen-extern-signature": "tspd --enable-experimental gen-extern-signature .",
|
|
76
75
|
"lint-typespec-library": "tsp compile . --warn-as-error --import @typespec/library-linter --no-emit",
|