@azure-tools/typespec-azure-core 0.61.0-dev.6 → 0.61.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.
@@ -1 +1 @@
1
- {"version":3,"file":"rpc-operation-request-body.d.ts","sourceRoot":"","sources":["../../../src/rules/rpc-operation-request-body.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,2BAA2B;;;EAoCtC,CAAC"}
1
+ {"version":3,"file":"rpc-operation-request-body.d.ts","sourceRoot":"","sources":["../../../src/rules/rpc-operation-request-body.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,2BAA2B;;;EAyCtC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { createRule, paramMessage } from "@typespec/compiler";
2
- import { getHttpOperation } from "@typespec/http";
2
+ import { getHttpOperation, isBodyIgnore } from "@typespec/http";
3
3
  export const rpcOperationRequestBodyRule = createRule({
4
4
  name: "rpc-operation-request-body",
5
5
  description: "Warning for RPC body problems.",
@@ -20,7 +20,9 @@ export const rpcOperationRequestBodyRule = createRule({
20
20
  operation.namespace?.name === "Core" &&
21
21
  operation.namespace?.namespace?.name === "Azure") {
22
22
  const httpOperation = getHttpOperation(context.program, originalOperation)[0];
23
- const bodyParam = httpOperation.parameters.body;
23
+ const bodyParam = httpOperation.parameters.properties.find((p) => p.kind === "body" ||
24
+ p.kind === "bodyRoot" ||
25
+ (p.kind === "bodyProperty" && isBodyIgnore(context.program, p.property) === false));
24
26
  const verb = httpOperation.verb.toLowerCase();
25
27
  if ((verb === "get" || verb === "delete") && bodyParam !== undefined) {
26
28
  context.reportDiagnostic({
@@ -1 +1 @@
1
- {"version":3,"file":"rpc-operation-request-body.js","sourceRoot":"","sources":["../../../src/rules/rpc-operation-request-body.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,M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J,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"rpc-operation-request-body.js","sourceRoot":"","sources":["../../../src/rules/rpc-operation-request-body.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEhE,MAAM,CAAC,MAAM,2BAA2B,GAAG,UAAU,CAAC;IACpD,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE,gCAAgC;IAC7C,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE;QACR,OAAO,EAAE,uDAAuD;QAChE,aAAa,EAAE,YAAY,CAAA,uBAAuB,MAAM,uBAAuB;KAChF;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,SAAS,EAAE,CAAC,SAAoB,EAAE,EAAE;gBAClC,IAAI,SAAS,CAAC,IAAI,EAAE,kBAAkB,CAAC,MAAM,KAAK,CAAC;oBAAE,OAAO;gBAE5D,MAAM,iBAAiB,GAAG,SAAS,CAAC;gBACpC,OAAO,SAAS,CAAC,eAAe,EAAE,CAAC;oBACjC,SAAS,GAAG,SAAS,CAAC,eAAe,CAAC;oBACtC,IACE,SAAS,CAAC,IAAI,KAAK,cAAc;wBACjC,SAAS,CAAC,SAAS,EAAE,IAAI,KAAK,MAAM;wBACpC,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,KAAK,OAAO,EAChD,CAAC;wBACD,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;wBAC9E,MAAM,SAAS,GAAG,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CACxD,CAAC,CAAC,EAAE,EAAE,CACJ,CAAC,CAAC,IAAI,KAAK,MAAM;4BACjB,CAAC,CAAC,IAAI,KAAK,UAAU;4BACrB,CAAC,CAAC,CAAC,IAAI,KAAK,cAAc,IAAI,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,KAAK,CAAC,CACrF,CAAC;wBACF,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;wBAC9C,IAAI,CAAC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,QAAQ,CAAC,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;4BACrE,OAAO,CAAC,gBAAgB,CAAC;gCACvB,MAAM,EAAE,iBAAiB;gCACzB,SAAS,EAAE,eAAe;gCAC1B,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;6BACvB,CAAC,CAAC;wBACL,CAAC;oBACH,CAAC;gBACH,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.61.0-dev.6",
3
+ "version": "0.61.0",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Core library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",
@@ -43,27 +43,26 @@
43
43
  "!dist/test/**"
44
44
  ],
45
45
  "peerDependencies": {
46
- "@typespec/compiler": "^1.4.0",
47
- "@typespec/http": "^1.4.0",
48
- "@typespec/rest": "^0.74.0 || >=0.75.0-dev <0.75.0"
46
+ "@typespec/http": "^1.5.0",
47
+ "@typespec/compiler": "^1.5.0",
48
+ "@typespec/rest": "^0.75.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "~24.3.0",
52
- "@typespec/compiler": "^1.4.0",
53
- "@typespec/http": "^1.4.0",
54
- "@typespec/library-linter": "^0.74.0 || >=0.75.0-dev <0.75.0",
55
- "@typespec/openapi": "^1.4.0",
56
- "@typespec/rest": "^0.74.0 || >=0.75.0-dev <0.75.0",
57
- "@typespec/tspd": "^0.73.0 || >=0.74.0-dev <0.74.0",
58
- "@typespec/versioning": "^0.74.0 || >=0.75.0-dev <0.75.0",
59
52
  "@vitest/coverage-v8": "^3.1.2",
60
53
  "@vitest/ui": "^3.1.2",
61
54
  "c8": "^10.1.3",
62
55
  "rimraf": "~6.0.1",
63
56
  "typescript": "~5.9.2",
64
- "vitest": "^3.1.2"
57
+ "vitest": "^3.1.2",
58
+ "@typespec/compiler": "^1.5.0",
59
+ "@typespec/http": "^1.5.0",
60
+ "@typespec/openapi": "^1.5.0",
61
+ "@typespec/library-linter": "^0.75.0",
62
+ "@typespec/rest": "^0.75.0",
63
+ "@typespec/tspd": "^0.73.0",
64
+ "@typespec/versioning": "^0.75.0"
65
65
  },
66
- "dependencies": {},
67
66
  "scripts": {
68
67
  "clean": "rimraf ./dist ./temp",
69
68
  "build": "npm run gen-extern-signature && tsc -p . && npm run lint-typespec-library",