@azure-tools/typespec-azure-core 0.30.0-dev.26 → 0.30.0-dev.28

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":"byos.d.ts","sourceRoot":"","sources":["../../../src/rules/byos.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,QAAQ,mCAoBnB,CAAC"}
1
+ {"version":3,"file":"byos.d.ts","sourceRoot":"","sources":["../../../src/rules/byos.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,QAAQ,mCAwBnB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { ignoreDiagnostics } from "@typespec/compiler";
1
+ import { ignoreDiagnostics, isTemplateInstance } from "@typespec/compiler";
2
2
  import { getHttpOperation } from "@typespec/http";
3
3
  import { createRule } from "@typespec/lint";
4
4
  import { reportDiagnostic } from "../lib.js";
@@ -8,6 +8,10 @@ export const byosRule = createRule({
8
8
  create({ program }) {
9
9
  return {
10
10
  operation: (operation) => {
11
+ if (isTemplateInstance(operation)) {
12
+ // Operation template instance are just referenced in `op is`. Main operation will be validated.
13
+ return;
14
+ }
11
15
  const httpOperation = ignoreDiagnostics(getHttpOperation(program, operation));
12
16
  if (httpOperation.parameters.body !== undefined) {
13
17
  for (const contentType of httpOperation.parameters.body.contentTypes) {
@@ -1 +1 @@
1
- {"version":3,"file":"byos.js","sourceRoot":"","sources":["../../../src/rules/byos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAa,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,CAAC,0BAA0B,EAAE,qBAAqB,CAAC,CAAC,CAAC;AACxF,MAAM,CA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AS,CAAC,EAAE;oBACjC,gGAAgG;oBAChG,OAAO;iBACR;gBACD,MAAM,aAAa,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;gBAC9E,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,KAAK,SAAS,EAAE;oBAC/C,KAAK,MAAM,WAAW,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,EAAE;wBACpE,IAAI,kBAAkB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;4BACvC,gBAAgB,CAAC,OAAO,EAAE;gCACxB,IAAI,EAAE,MAAM;gCACZ,MAAM,EAAE,EAAE,WAAW,EAAE;gCACvB,MAAM,EAAE,SAAS;6BAClB,CAAC,CAAC;yBACJ;qBACF;iBACF;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -261,7 +261,6 @@ model CustomizationFields {
261
261
  * @template Traits Traits which apply to the operation.
262
262
  * @template TErrorResponse The type of the error response. If not provided, the default error response type will be used.
263
263
  */
264
- #suppress "@azure-tools/typespec-providerhub/operation-requires-documentation" "This is a library operation."
265
264
  op Operation<
266
265
  TParams,
267
266
  TResponse,
package/lib/models.tsp CHANGED
@@ -82,6 +82,7 @@ model MaxPageSizeQueryParameter {
82
82
 
83
83
  @doc("Provides the standard 'orderby' query parameter for list operations.")
84
84
  model OrderByQueryParameter {
85
+ #suppress "@azure-tools/typespec-azure-core/prefer-csv-collection-format" "By design"
85
86
  @query({
86
87
  format: "multi",
87
88
  })
@@ -108,6 +109,7 @@ model SelectQueryParameter {
108
109
 
109
110
  @doc("Provides the standard 'expand' query parameter for list operations.")
110
111
  model ExpandQueryParameter {
112
+ #suppress "@azure-tools/typespec-azure-core/prefer-csv-collection-format" "By design"
111
113
  @query({
112
114
  format: "multi",
113
115
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/typespec-azure-core",
3
- "version": "0.30.0-dev.26",
3
+ "version": "0.30.0-dev.28",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Core library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",
@@ -42,22 +42,22 @@
42
42
  "!dist/test/**"
43
43
  ],
44
44
  "peerDependencies": {
45
- "@typespec/compiler": ">=0.43.0",
46
- "@typespec/http": ">=0.43.1",
47
- "@typespec/rest": ">=0.43.0"
45
+ "@typespec/compiler": "~0.43.0 || >=0.44.0-dev <0.44.0",
46
+ "@typespec/http": "~0.43.1 || >=0.44.0-dev <0.44.0",
47
+ "@typespec/rest": "~0.43.0 || >=0.44.0-dev <0.44.0"
48
48
  },
49
49
  "dependencies": {
50
- "@typespec/lint": ">=0.43.0"
50
+ "@typespec/lint": "~0.43.0 || >=0.44.0-dev <0.44.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@typespec/compiler": ">=0.43.0",
54
- "@typespec/http": ">=0.43.1",
55
- "@typespec/rest": ">=0.43.0",
56
- "@typespec/eslint-config-typespec": ">=0.6.0",
57
- "@typespec/library-linter": ">=0.43.0",
58
- "@typespec/eslint-plugin": ">=0.43.0",
59
- "@typespec/openapi": ">=0.43.0",
60
- "@typespec/versioning": ">=0.43.0",
53
+ "@typespec/compiler": "~0.43.0 || >=0.44.0-dev <0.44.0",
54
+ "@typespec/http": "~0.43.1 || >=0.44.0-dev <0.44.0",
55
+ "@typespec/rest": "~0.43.0 || >=0.44.0-dev <0.44.0",
56
+ "@typespec/eslint-config-typespec": "~0.6.0 || >=0.7.0-dev <0.7.0",
57
+ "@typespec/library-linter": "~0.43.0 || >=0.44.0-dev <0.44.0",
58
+ "@typespec/eslint-plugin": "~0.43.0 || >=0.44.0-dev <0.44.0",
59
+ "@typespec/openapi": "~0.43.0 || >=0.44.0-dev <0.44.0",
60
+ "@typespec/versioning": "~0.43.0 || >=0.44.0-dev <0.44.0",
61
61
  "@types/mocha": "~10.0.0",
62
62
  "@types/node": "~18.11.9",
63
63
  "eslint": "^8.36.0",