@azure-tools/typespec-azure-core 0.30.0-dev.11 → 0.30.0-dev.12

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/dist/src/lib.d.ts CHANGED
@@ -100,6 +100,12 @@ export declare const libDef: {
100
100
  readonly default: "Azure services should not use the `@format` decorator.";
101
101
  };
102
102
  };
103
+ readonly "no-order-by": {
104
+ readonly severity: "warning";
105
+ readonly messages: {
106
+ readonly default: "List operations with an 'orderBy' parameter are uncommon; support should only be added after large collection sorting performance concerns are considered.";
107
+ };
108
+ };
103
109
  readonly "no-rest-library-interfaces": {
104
110
  readonly severity: "error";
105
111
  readonly messages: {
@@ -203,7 +209,7 @@ export declare const libDef: {
203
209
  readonly projectedName: import("@typespec/compiler").CallableMessage<["propertyName", "propertyName"]>;
204
210
  };
205
211
  };
206
- readonly "avoid-operation-id": {
212
+ readonly "no-operation-id": {
207
213
  readonly severity: "warning";
208
214
  readonly messages: {
209
215
  readonly default: "Operation ID is automatically generated by the OpenAPI emitters and should not normally be specified.";
@@ -268,6 +274,9 @@ export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
268
274
  "no-format": {
269
275
  readonly default: "Azure services should not use the `@format` decorator.";
270
276
  };
277
+ "no-order-by": {
278
+ readonly default: "List operations with an 'orderBy' parameter are uncommon; support should only be added after large collection sorting performance concerns are considered.";
279
+ };
271
280
  "no-rest-library-interfaces": {
272
281
  readonly default: "Resource interfaces from the TypeSpec.Rest.Resource library are incompatible with Azure.Core.";
273
282
  };
@@ -320,14 +329,14 @@ export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
320
329
  readonly default: import("@typespec/compiler").CallableMessage<["propertyName"]>;
321
330
  readonly projectedName: import("@typespec/compiler").CallableMessage<["propertyName", "propertyName"]>;
322
331
  };
323
- "avoid-operation-id": {
332
+ "no-operation-id": {
324
333
  readonly default: "Operation ID is automatically generated by the OpenAPI emitters and should not normally be specified.";
325
334
  };
326
335
  "invalid-body-schema": {
327
336
  readonly array: "Body schema should not be of raw array type.";
328
337
  };
329
338
  }, Record<string, any>>;
330
- export declare const reportDiagnostic: <C extends "byos" | "casing-style" | "lro-status-union-non-string" | "lro-status-property-invalid-type" | "lro-status-missing" | "bad-record-type" | "request-parameter-invalid" | "request-body-problem" | "response-property-invalid" | "no-multiple-discriminator" | "no-fixed-enum-discriminator" | "operation-link-parameter-invalid" | "invalid-resource-type" | "use-extensible-enum" | "use-standard-operations" | "no-format" | "no-rest-library-interfaces" | "no-unknown" | "documentation-required" | "key-visibility-required" | "long-running-polling-operation-required" | "rpc-operation-needs-route" | "invalid-trait-property-count" | "invalid-trait-property-type" | "invalid-trait-context" | "trait-property-without-location" | "expected-trait-missing" | "invalid-parameter" | "expected-success-response" | "lro-polling-data-missing-from-operation-response" | "no-nullable" | "no-object" | "property-name-conflict" | "avoid-operation-id" | "invalid-body-schema", M extends keyof {
339
+ export declare const reportDiagnostic: <C extends "byos" | "casing-style" | "lro-status-union-non-string" | "lro-status-property-invalid-type" | "lro-status-missing" | "bad-record-type" | "request-parameter-invalid" | "request-body-problem" | "response-property-invalid" | "no-multiple-discriminator" | "no-fixed-enum-discriminator" | "operation-link-parameter-invalid" | "invalid-resource-type" | "use-extensible-enum" | "use-standard-operations" | "no-format" | "no-order-by" | "no-rest-library-interfaces" | "no-unknown" | "documentation-required" | "key-visibility-required" | "long-running-polling-operation-required" | "rpc-operation-needs-route" | "invalid-trait-property-count" | "invalid-trait-property-type" | "invalid-trait-context" | "trait-property-without-location" | "expected-trait-missing" | "invalid-parameter" | "expected-success-response" | "lro-polling-data-missing-from-operation-response" | "no-nullable" | "no-object" | "property-name-conflict" | "no-operation-id" | "invalid-body-schema", M extends keyof {
331
340
  byos: {
332
341
  readonly default: import("@typespec/compiler").CallableMessage<["contentType"]>;
333
342
  };
@@ -378,6 +387,9 @@ export declare const reportDiagnostic: <C extends "byos" | "casing-style" | "lro
378
387
  "no-format": {
379
388
  readonly default: "Azure services should not use the `@format` decorator.";
380
389
  };
390
+ "no-order-by": {
391
+ readonly default: "List operations with an 'orderBy' parameter are uncommon; support should only be added after large collection sorting performance concerns are considered.";
392
+ };
381
393
  "no-rest-library-interfaces": {
382
394
  readonly default: "Resource interfaces from the TypeSpec.Rest.Resource library are incompatible with Azure.Core.";
383
395
  };
@@ -430,7 +442,7 @@ export declare const reportDiagnostic: <C extends "byos" | "casing-style" | "lro
430
442
  readonly default: import("@typespec/compiler").CallableMessage<["propertyName"]>;
431
443
  readonly projectedName: import("@typespec/compiler").CallableMessage<["propertyName", "propertyName"]>;
432
444
  };
433
- "avoid-operation-id": {
445
+ "no-operation-id": {
434
446
  readonly default: "Operation ID is automatically generated by the OpenAPI emitters and should not normally be specified.";
435
447
  };
436
448
  "invalid-body-schema": {
@@ -487,6 +499,9 @@ export declare const reportDiagnostic: <C extends "byos" | "casing-style" | "lro
487
499
  "no-format": {
488
500
  readonly default: "Azure services should not use the `@format` decorator.";
489
501
  };
502
+ "no-order-by": {
503
+ readonly default: "List operations with an 'orderBy' parameter are uncommon; support should only be added after large collection sorting performance concerns are considered.";
504
+ };
490
505
  "no-rest-library-interfaces": {
491
506
  readonly default: "Resource interfaces from the TypeSpec.Rest.Resource library are incompatible with Azure.Core.";
492
507
  };
@@ -539,13 +554,13 @@ export declare const reportDiagnostic: <C extends "byos" | "casing-style" | "lro
539
554
  readonly default: import("@typespec/compiler").CallableMessage<["propertyName"]>;
540
555
  readonly projectedName: import("@typespec/compiler").CallableMessage<["propertyName", "propertyName"]>;
541
556
  };
542
- "avoid-operation-id": {
557
+ "no-operation-id": {
543
558
  readonly default: "Operation ID is automatically generated by the OpenAPI emitters and should not normally be specified.";
544
559
  };
545
560
  "invalid-body-schema": {
546
561
  readonly array: "Body schema should not be of raw array type.";
547
562
  };
548
- }, C, M>) => void, createDiagnostic: <C extends "byos" | "casing-style" | "lro-status-union-non-string" | "lro-status-property-invalid-type" | "lro-status-missing" | "bad-record-type" | "request-parameter-invalid" | "request-body-problem" | "response-property-invalid" | "no-multiple-discriminator" | "no-fixed-enum-discriminator" | "operation-link-parameter-invalid" | "invalid-resource-type" | "use-extensible-enum" | "use-standard-operations" | "no-format" | "no-rest-library-interfaces" | "no-unknown" | "documentation-required" | "key-visibility-required" | "long-running-polling-operation-required" | "rpc-operation-needs-route" | "invalid-trait-property-count" | "invalid-trait-property-type" | "invalid-trait-context" | "trait-property-without-location" | "expected-trait-missing" | "invalid-parameter" | "expected-success-response" | "lro-polling-data-missing-from-operation-response" | "no-nullable" | "no-object" | "property-name-conflict" | "avoid-operation-id" | "invalid-body-schema", M extends keyof {
563
+ }, C, M>) => void, createDiagnostic: <C extends "byos" | "casing-style" | "lro-status-union-non-string" | "lro-status-property-invalid-type" | "lro-status-missing" | "bad-record-type" | "request-parameter-invalid" | "request-body-problem" | "response-property-invalid" | "no-multiple-discriminator" | "no-fixed-enum-discriminator" | "operation-link-parameter-invalid" | "invalid-resource-type" | "use-extensible-enum" | "use-standard-operations" | "no-format" | "no-order-by" | "no-rest-library-interfaces" | "no-unknown" | "documentation-required" | "key-visibility-required" | "long-running-polling-operation-required" | "rpc-operation-needs-route" | "invalid-trait-property-count" | "invalid-trait-property-type" | "invalid-trait-context" | "trait-property-without-location" | "expected-trait-missing" | "invalid-parameter" | "expected-success-response" | "lro-polling-data-missing-from-operation-response" | "no-nullable" | "no-object" | "property-name-conflict" | "no-operation-id" | "invalid-body-schema", M extends keyof {
549
564
  byos: {
550
565
  readonly default: import("@typespec/compiler").CallableMessage<["contentType"]>;
551
566
  };
@@ -596,6 +611,9 @@ export declare const reportDiagnostic: <C extends "byos" | "casing-style" | "lro
596
611
  "no-format": {
597
612
  readonly default: "Azure services should not use the `@format` decorator.";
598
613
  };
614
+ "no-order-by": {
615
+ readonly default: "List operations with an 'orderBy' parameter are uncommon; support should only be added after large collection sorting performance concerns are considered.";
616
+ };
599
617
  "no-rest-library-interfaces": {
600
618
  readonly default: "Resource interfaces from the TypeSpec.Rest.Resource library are incompatible with Azure.Core.";
601
619
  };
@@ -648,7 +666,7 @@ export declare const reportDiagnostic: <C extends "byos" | "casing-style" | "lro
648
666
  readonly default: import("@typespec/compiler").CallableMessage<["propertyName"]>;
649
667
  readonly projectedName: import("@typespec/compiler").CallableMessage<["propertyName", "propertyName"]>;
650
668
  };
651
- "avoid-operation-id": {
669
+ "no-operation-id": {
652
670
  readonly default: "Operation ID is automatically generated by the OpenAPI emitters and should not normally be specified.";
653
671
  };
654
672
  "invalid-body-schema": {
@@ -705,6 +723,9 @@ export declare const reportDiagnostic: <C extends "byos" | "casing-style" | "lro
705
723
  "no-format": {
706
724
  readonly default: "Azure services should not use the `@format` decorator.";
707
725
  };
726
+ "no-order-by": {
727
+ readonly default: "List operations with an 'orderBy' parameter are uncommon; support should only be added after large collection sorting performance concerns are considered.";
728
+ };
708
729
  "no-rest-library-interfaces": {
709
730
  readonly default: "Resource interfaces from the TypeSpec.Rest.Resource library are incompatible with Azure.Core.";
710
731
  };
@@ -757,7 +778,7 @@ export declare const reportDiagnostic: <C extends "byos" | "casing-style" | "lro
757
778
  readonly default: import("@typespec/compiler").CallableMessage<["propertyName"]>;
758
779
  readonly projectedName: import("@typespec/compiler").CallableMessage<["propertyName", "propertyName"]>;
759
780
  };
760
- "avoid-operation-id": {
781
+ "no-operation-id": {
761
782
  readonly default: "Operation ID is automatically generated by the OpenAPI emitters and should not normally be specified.";
762
783
  };
763
784
  "invalid-body-schema": {
@@ -1 +1 @@
1
- {"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,eAAe,CAAC;AAEtC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;CAsOT,CAAC;AAEX,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAAgC,CAAC;AAClD,eAAO,MAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sDAAE,iBAAiB,0BAAS,CAAC"}
package/dist/src/lib.js CHANGED
@@ -101,6 +101,12 @@ export const libDef = {
101
101
  default: "Azure services should not use the `@format` decorator.",
102
102
  },
103
103
  },
104
+ "no-order-by": {
105
+ severity: "warning",
106
+ messages: {
107
+ default: `List operations with an 'orderBy' parameter are uncommon; support should only be added after large collection sorting performance concerns are considered.`,
108
+ },
109
+ },
104
110
  "no-rest-library-interfaces": {
105
111
  severity: "error",
106
112
  messages: {
@@ -204,7 +210,7 @@ export const libDef = {
204
210
  projectedName: paramMessage `Use of @projectedName on property '${"propertyName"}' results in '${"propertyName"}' having the same name as its enclosing type in C#. Please use a different @projectedName value.`,
205
211
  },
206
212
  },
207
- "avoid-operation-id": {
213
+ "no-operation-id": {
208
214
  severity: "warning",
209
215
  messages: {
210
216
  default: "Operation ID is automatically generated by the OpenAPI emitters and should not normally be specified.",
@@ -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,SAAS,GAAG,YAAY,CAAC;AAEtC,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,kCAAkC;IACxC,WAAW,EAAE;QACX,IAAI,EAAE;YACJ,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,qBAAqB,aAAa,yNAAyN;aACjR;SACF;QACD,cAAc,EAAE;YACd,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,gBAAgB,MAAM,mBAAmB,QAAQ,EAAE;aACzE;SACF;QACD,6BAA6B,EAAE;YAC7B,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,wCAAwC,MAAM,GAAG;aACvE;SACF;QACD,kCAAkC,EAAE;YAClC,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,sDAAsD;aAChE;SACF;QACD,oBAAoB,EAAE;YACpB,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,uDAAuD,QAAQ,GAAG;aACxF;SACF;QACD,iBAAiB,EAAE;YACjB,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,aAAa,EAAE,YAAY,CAAA,GAAG,MAAM,oBAAoB,SAAS,WAAW,UAAU,YAAY,SAAS,2BAA2B;gBACtI,oBAAoB,EAAE,YAAY,CAAA,GAAG,MAAM,eAAe,SAAS,WAAW,UAAU,gCAAgC;aACzH;SACF;QACD,2BAA2B,E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B,SAAS,EAAE;aAC5E;SACF;QACD,mBAAmB,EAAE;YACnB,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,sBAAsB,cAAc,aAAa,MAAM,aAAa;aAC1F;SACF;QACD,2BAA2B,EAAE;YAC3B,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,4CAA4C;aACtD;SACF;QACD,kDAAkD,EAAE;YAClD,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,+EAA+E;aACzF;SACF;QACD,aAAa,EAAE;YACb,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EACL,kGAAkG;aACrG;SACF;QACD,WAAW,EAAE;YACX,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EACL,oIAAoI;aACvI;SACF;QACD,wBAAwB,EAAE;YACxB,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,aAAa,cAAc,yMAAyM;gBACzP,aAAa,EAAE,YAAY,CAAA,sCAAsC,cAAc,iBAAiB,cAAc,kGAAkG;aACjN;SACF;QACD,iBAAiB,EAAE;YACjB,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EACL,uGAAuG;aAC1G;SACF;QACD,qBAAqB,EAAE;YACrB,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,KAAK,EAAE,8CAA8C;aACtD;SACF;KACF;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,IAAI,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAClD,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { getLinter } from "@typespec/lint";
2
2
  import { checkRpcRoutes } from "./decorators.js";
3
3
  import { $lib } from "./lib.js";
4
- import { avoidOperationIdRule } from "./rules/avoid-operation-id.js";
5
4
  import { byosRule } from "./rules/byos.js";
6
5
  import { casingRule } from "./rules/casing.js";
7
6
  import { extensibleEnumRule } from "./rules/extensible-enums.js";
@@ -9,6 +8,7 @@ import { longRunningOperationsRequirePollingOperation } from "./rules/lro-pollin
9
8
  import { noFixedEnumDiscriminatorRule } from "./rules/no-fixed-enum-discriminator.js";
10
9
  import { noNullableRule } from "./rules/no-nullable.js";
11
10
  import { noObjectRule } from "./rules/no-object.js";
11
+ import { operationIdRule } from "./rules/no-operation-id.js";
12
12
  import { preventFormatUse } from "./rules/prevent-format.js";
13
13
  import { preventMultipleDiscriminator } from "./rules/prevent-multiple-discriminator.js";
14
14
  import { preventRestLibraryInterfaces } from "./rules/prevent-rest-library.js";
@@ -21,7 +21,7 @@ import { requireKeyVisibility } from "./rules/require-key-visibility.js";
21
21
  import { useStandardOperations } from "./rules/use-standard-ops.js";
22
22
  const linter = getLinter($lib);
23
23
  linter.registerRules([
24
- avoidOperationIdRule,
24
+ operationIdRule,
25
25
  bodyArrayRule,
26
26
  byosRule,
27
27
  casingRule,
@@ -1 +1 @@
1
- {"version":3,"file":"linter.js","sourceRoot":"","sources":["../../src/linter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,4CAA4C,EAAE,MAAM,kCAAkC,CAAC;AAChG,OAAO,EAAE,4BAA4B,EAAE,MAAM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B;IACE,eAAe;IACf,aAAa;IACb,QAAQ;IACR,UAAU;IACV,kBAAkB;IAClB,qBAAqB;IACrB,4BAA4B;IAC5B,cAAc;IACd,YAAY;IACZ,gBAAgB;IAChB,4BAA4B;IAC5B,4BAA4B;IAC5B,kBAAkB;IAClB,cAAc;IACd,gBAAgB;IAChB,oBAAoB;IACpB,oBAAoB;IACpB,4CAA4C;CAC7C,EACD;IACE,UAAU,EAAE,IAAI;CACjB,CACF,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,MAAM,CAAC,eAAe,EAAE,CAAC;IACzB,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAE/B,wBAAwB;IACxB,cAAc,CAAC,OAAO,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const operationIdRule: import("@typespec/lint").LintRule;
2
+ //# sourceMappingURL=no-operation-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-operation-id.d.ts","sourceRoot":"","sources":["../../../src/rules/no-operation-id.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,mCAgB1B,CAAC"}
@@ -2,8 +2,8 @@ import { createRule } from "@typespec/lint";
2
2
  import { getOperationId } from "@typespec/openapi";
3
3
  import { reportDiagnostic } from "../lib.js";
4
4
  import { isExcludedCoreType } from "./utils.js";
5
- export const avoidOperationIdRule = createRule({
6
- name: "avoid-operation-id",
5
+ export const operationIdRule = createRule({
6
+ name: "no-operation-id",
7
7
  create({ program }) {
8
8
  return {
9
9
  operation: (operation) => {
@@ -11,7 +11,7 @@ export const avoidOperationIdRule = createRule({
11
11
  return;
12
12
  if (getOperationId(program, operation)) {
13
13
  reportDiagnostic(program, {
14
- code: "avoid-operation-id",
14
+ code: "no-operation-id",
15
15
  format: { operationId: operation.name },
16
16
  target: operation,
17
17
  });
@@ -20,4 +20,4 @@ export const avoidOperationIdRule = createRule({
20
20
  };
21
21
  },
22
22
  });
23
- //# sourceMappingURL=avoid-operation-id.js.map
23
+ //# sourceMappingURL=no-operation-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-operation-id.js","sourceRoot":"","sources":["../../../src/rules/no-operation-id.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;IACxC,IAAI,EAAE,iBAAiB;IACvB,MAAM,CAAC,EAAE,OAAO,EAAE;QAChB,OAAO;YACL,SAAS,EAAE,CAAC,SAAoB,EAAE,EAAE;gBAClC,IAAI,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC;oBAAE,OAAO;gBACnD,IAAI,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE;oBACtC,gBAAgB,CAAC,OAAO,EAAE;wBACxB,IAAI,EAAE,iBAAiB;wBACvB,MAAM,EAAE,EAAE,WAAW,EAAE,SAAS,CAAC,IAAI,EAAE;wBACvC,MAAM,EAAE,SAAS;qBAClB,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const orderByRule: import("@typespec/lint").LintRule;
2
+ //# sourceMappingURL=no-order-by.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-order-by.d.ts","sourceRoot":"","sources":["../../../src/rules/no-order-by.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW,mCAmBtB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { createRule } from "@typespec/lint";
2
+ import { getResourceOperation } from "@typespec/rest";
3
+ import { reportDiagnostic } from "../lib.js";
4
+ import { isExcludedCoreType } from "./utils.js";
5
+ export const orderByRule = createRule({
6
+ name: "no-order-by",
7
+ create({ program }) {
8
+ return {
9
+ operation: (operation) => {
10
+ if (isExcludedCoreType(program, operation))
11
+ return;
12
+ const resOperation = getResourceOperation(program, operation);
13
+ for (const param of operation.parameters.properties.values()) {
14
+ if (param.name.toLowerCase() === "orderby" && (resOperation === null || resOperation === void 0 ? void 0 : resOperation.operation) === "list") {
15
+ reportDiagnostic(program, {
16
+ code: "no-order-by",
17
+ format: { operationId: operation.name },
18
+ target: operation,
19
+ });
20
+ }
21
+ }
22
+ },
23
+ };
24
+ },
25
+ });
26
+ //# sourceMappingURL=no-order-by.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-order-by.js","sourceRoot":"","sources":["../../../src/rules/no-order-by.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;IACpC,IAAI,EAAE,aAAa;IACnB,MAAM,CAAC,EAAE,OAAO,EAAE;QAChB,OAAO;YACL,SAAS,EAAE,CAAC,SAAoB,EAAE,EAAE;gBAClC,IAAI,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC;oBAAE,OAAO;gBACnD,MAAM,YAAY,GAAG,oBAAoB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;gBAC9D,KAAK,MAAM,KAAK,IAAI,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE;oBAC5D,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,SAAS,IAAI,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,MAAK,MAAM,EAAE;wBAChF,gBAAgB,CAAC,OAAO,EAAE;4BACxB,IAAI,EAAE,aAAa;4BACnB,MAAM,EAAE,EAAE,WAAW,EAAE,SAAS,CAAC,IAAI,EAAE;4BACvC,MAAM,EAAE,SAAS;yBAClB,CAAC,CAAC;qBACJ;iBACF;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.30.0-dev.11",
3
+ "version": "0.30.0-dev.12",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Core library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",
@@ -1,2 +0,0 @@
1
- export declare const avoidOperationIdRule: import("@typespec/lint").LintRule;
2
- //# sourceMappingURL=avoid-operation-id.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"avoid-operation-id.d.ts","sourceRoot":"","sources":["../../../src/rules/avoid-operation-id.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,oBAAoB,mCAgB/B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"avoid-operation-id.js","sourceRoot":"","sources":["../../../src/rules/avoid-operation-id.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAAC;IAC7C,IAAI,EAAE,oBAAoB;IAC1B,MAAM,CAAC,EAAE,OAAO,EAAE;QAChB,OAAO;YACL,SAAS,EAAE,CAAC,SAAoB,EAAE,EAAE;gBAClC,IAAI,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC;oBAAE,OAAO;gBACnD,IAAI,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE;oBACtC,gBAAgB,CAAC,OAAO,EAAE;wBACxB,IAAI,EAAE,oBAAoB;wBAC1B,MAAM,EAAE,EAAE,WAAW,EAAE,SAAS,CAAC,IAAI,EAAE;wBACvC,MAAM,EAAE,SAAS;qBAClB,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}