@microsoft/typespec-msgraph 0.0.1-Preview.14 → 0.0.1-Preview.15
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/components/annotations.js +2 -2
- package/dist/src/components/annotations.js.map +1 -1
- package/dist/src/components/entity-container-element.js +2 -6
- package/dist/src/components/entity-container-element.js.map +1 -1
- package/dist/src/components/open-property-type-constraint-annotation-element.d.ts +5 -0
- package/dist/src/components/open-property-type-constraint-annotation-element.d.ts.map +1 -0
- package/dist/src/components/open-property-type-constraint-annotation-element.js +7 -0
- package/dist/src/components/open-property-type-constraint-annotation-element.js.map +1 -0
- package/dist/src/components/operation-element.js +2 -2
- package/dist/src/components/operation-element.js.map +1 -1
- package/dist/src/components/property-element.js +1 -1
- package/dist/src/components/property-element.js.map +1 -1
- package/dist/src/components/structured-type-element.d.ts.map +1 -1
- package/dist/src/components/structured-type-element.js +3 -1
- package/dist/src/components/structured-type-element.js.map +1 -1
- package/dist/src/components/update-restrictions-annotation.d.ts +2 -1
- package/dist/src/components/update-restrictions-annotation.d.ts.map +1 -1
- package/dist/src/components/update-restrictions-annotation.js +6 -4
- package/dist/src/components/update-restrictions-annotation.js.map +1 -1
- package/dist/src/decorators/address-url-msa.d.ts +12 -0
- package/dist/src/decorators/address-url-msa.d.ts.map +1 -0
- package/dist/src/decorators/address-url-msa.js +19 -0
- package/dist/src/decorators/address-url-msa.js.map +1 -0
- package/dist/src/decorators/address-url.d.ts.map +1 -1
- package/dist/src/decorators/function.d.ts +7 -2
- package/dist/src/decorators/function.d.ts.map +1 -1
- package/dist/src/decorators/function.js +2 -2
- package/dist/src/decorators/function.js.map +1 -1
- package/dist/src/decorators/graph-route.d.ts +1 -0
- package/dist/src/decorators/graph-route.d.ts.map +1 -1
- package/dist/src/decorators/graph-route.js +14 -0
- package/dist/src/decorators/graph-route.js.map +1 -1
- package/dist/src/decorators/index.d.ts +3 -0
- package/dist/src/decorators/index.d.ts.map +1 -1
- package/dist/src/decorators/index.js +3 -0
- package/dist/src/decorators/index.js.map +1 -1
- package/dist/src/decorators/passthrough-address-url-msa.d.ts +12 -0
- package/dist/src/decorators/passthrough-address-url-msa.d.ts.map +1 -0
- package/dist/src/decorators/passthrough-address-url-msa.js +19 -0
- package/dist/src/decorators/passthrough-address-url-msa.js.map +1 -0
- package/dist/src/decorators/passthrough-address-url.d.ts +12 -0
- package/dist/src/decorators/passthrough-address-url.d.ts.map +1 -0
- package/dist/src/decorators/passthrough-address-url.js +19 -0
- package/dist/src/decorators/passthrough-address-url.js.map +1 -0
- package/dist/src/entities/address-url.d.ts +3 -0
- package/dist/src/entities/address-url.d.ts.map +1 -1
- package/dist/src/entities/address-url.js +35 -11
- package/dist/src/entities/address-url.js.map +1 -1
- package/dist/src/entities/annotations.d.ts +9 -2
- package/dist/src/entities/annotations.d.ts.map +1 -1
- package/dist/src/entities/annotations.js +34 -3
- package/dist/src/entities/annotations.js.map +1 -1
- package/dist/src/entities/entity-container.d.ts +6 -0
- package/dist/src/entities/entity-container.d.ts.map +1 -1
- package/dist/src/entities/entity-container.js +7 -1
- package/dist/src/entities/entity-container.js.map +1 -1
- package/dist/src/entities/model.d.ts +5 -1
- package/dist/src/entities/model.d.ts.map +1 -1
- package/dist/src/entities/model.js +52 -6
- package/dist/src/entities/model.js.map +1 -1
- package/dist/src/entities/ms-graph-route.d.ts.map +1 -1
- package/dist/src/entities/ms-graph-route.js +7 -13
- package/dist/src/entities/ms-graph-route.js.map +1 -1
- package/dist/src/entities/operation.d.ts +1 -0
- package/dist/src/entities/operation.d.ts.map +1 -1
- package/dist/src/entities/operation.js +11 -5
- package/dist/src/entities/operation.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +17 -3
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +11 -5
- package/dist/src/lib.js.map +1 -1
- package/dist/src/linter.d.ts +2 -0
- package/dist/src/linter.d.ts.map +1 -0
- package/dist/src/linter.js +15 -0
- package/dist/src/linter.js.map +1 -0
- package/dist/src/rules/address-url.d.ts +12 -0
- package/dist/src/rules/address-url.d.ts.map +1 -1
- package/dist/src/rules/address-url.js +66 -7
- package/dist/src/rules/address-url.js.map +1 -1
- package/dist/src/rules/contains.d.ts +1 -1
- package/dist/src/rules/contains.js +1 -1
- package/dist/src/rules/graph-route.d.ts +2 -0
- package/dist/src/rules/graph-route.d.ts.map +1 -1
- package/dist/src/rules/graph-route.js +57 -1
- package/dist/src/rules/graph-route.js.map +1 -1
- package/dist/src/rules/index.d.ts +2 -0
- package/dist/src/rules/index.d.ts.map +1 -1
- package/dist/src/rules/index.js +2 -0
- package/dist/src/rules/index.js.map +1 -1
- package/dist/src/rules/model.d.ts +4 -0
- package/dist/src/rules/model.d.ts.map +1 -0
- package/dist/src/rules/model.js +36 -0
- package/dist/src/rules/model.js.map +1 -0
- package/dist/src/rules/record-t.d.ts +5 -0
- package/dist/src/rules/record-t.d.ts.map +1 -0
- package/dist/src/rules/record-t.js +78 -0
- package/dist/src/rules/record-t.js.map +1 -0
- package/dist/src/rules/reference-target.d.ts +1 -1
- package/dist/src/rules/reference-target.d.ts.map +1 -1
- package/dist/src/rules/reference-target.js +11 -12
- package/dist/src/rules/reference-target.js.map +1 -1
- package/dist/src/utils.d.ts +3 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +24 -5
- package/dist/src/utils.js.map +1 -1
- package/dist/src/validate.d.ts.map +1 -1
- package/dist/src/validate.js +10 -2
- package/dist/src/validate.js.map +1 -1
- package/lib/decorators.tsp +40 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../src/entities/operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,UAAU,EAAE,MAAM,EAAmC,kBAAkB,EAAE,MAAM,o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AAE,QAAQ,CAAC,IAAI,CAAC,EAAE;YACnF,OAAO,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAClE;QAED,IAAG,kBAAkB,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,EAAC;YAC/D,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;SAC1D;QAED,OAAO;YACL;gBACE,IAAI,EAAE,QAAQ,CAAC,IAAI;gBACnB,UAAU,EAAE,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC;gBAClD,gBAAgB,EAAE,mBAAmB,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC;gBAC7D,UAAU,EAAE,QAAQ,CAAC,QAAQ;gBAC7B,YAAY,EAAE,uBAAuB,CAAC,OAAO,EAAE,QAAQ,CAAC;gBACxD,WAAW,EAAE,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC;gBACtC,aAAa,EAAE,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC;gBACjD,kBAAkB,EAAE,qBAAqB,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAA,QAAQ,CAAC,KAAK,0CAAE,SAAS,CAAC;gBACvF,iBAAiB,EAAE,KAAK;aACzB;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
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,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
package/dist/src/index.js
CHANGED
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
package/dist/src/lib.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export declare const namespace = "MsGraph";
|
|
|
2
2
|
export interface MsGraphEmitterOptions {
|
|
3
3
|
filename?: string;
|
|
4
4
|
}
|
|
5
|
-
export declare const reportDiagnostic: <C extends "decorator-missing-dependencies" | "element-missing-dependencies" | "decorator-invalid-use" | "singleton-invalid-name" | "extends-invalid-use", M extends keyof {
|
|
5
|
+
export declare const reportDiagnostic: <C extends "decorator-missing-dependencies" | "element-missing-dependencies" | "decorator-invalid-use" | "singleton-invalid-name" | "extends-invalid-use" | "type-invalid-use", M extends keyof {
|
|
6
6
|
"decorator-missing-dependencies": {
|
|
7
7
|
readonly default: import("@typespec/compiler").CallableMessage<[string, string, string]>;
|
|
8
8
|
readonly function: import("@typespec/compiler").CallableMessage<[]>;
|
|
@@ -47,8 +47,9 @@ export declare const reportDiagnostic: <C extends "decorator-missing-dependencie
|
|
|
47
47
|
readonly referenceTargetInterfaceMustHaveGraphRoute: import("@typespec/compiler").CallableMessage<[]>;
|
|
48
48
|
readonly referenceTargetMustOnlyBeUsedOnceOnInterface: import("@typespec/compiler").CallableMessage<[]>;
|
|
49
49
|
readonly referenceTargetPathShouldNotHaveParameters: import("@typespec/compiler").CallableMessage<[string]>;
|
|
50
|
-
readonly singletonOrEntitySetHostingBindingsShouldExist: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
51
50
|
readonly interfaceWithGraphRouteMustExtendGraphStandardBaseInterface: import("@typespec/compiler").CallableMessage<[]>;
|
|
51
|
+
readonly duplicateGraphRouteNotAllowed: import("@typespec/compiler").CallableMessage<[string, string, string]>;
|
|
52
|
+
readonly duplicateParametersAreNotAllowedInGraphRoute: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
52
53
|
};
|
|
53
54
|
"singleton-invalid-name": {
|
|
54
55
|
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
@@ -57,6 +58,12 @@ export declare const reportDiagnostic: <C extends "decorator-missing-dependencie
|
|
|
57
58
|
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
58
59
|
readonly namespaces: "A model can only extend other models in a different logical namespace. Use @partial instead.";
|
|
59
60
|
};
|
|
61
|
+
"type-invalid-use": {
|
|
62
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
63
|
+
readonly recordTypeCannotBePrepopulated: import("@typespec/compiler").CallableMessage<[string]>;
|
|
64
|
+
readonly recordTypeCannotBeNull: import("@typespec/compiler").CallableMessage<[string]>;
|
|
65
|
+
readonly recordTypeCannotBeUsedInLine: import("@typespec/compiler").CallableMessage<[string]>;
|
|
66
|
+
};
|
|
60
67
|
}[C]>(program: import("@typespec/compiler").Program, diag: import("@typespec/compiler").DiagnosticReport<{
|
|
61
68
|
"decorator-missing-dependencies": {
|
|
62
69
|
readonly default: import("@typespec/compiler").CallableMessage<[string, string, string]>;
|
|
@@ -102,8 +109,9 @@ export declare const reportDiagnostic: <C extends "decorator-missing-dependencie
|
|
|
102
109
|
readonly referenceTargetInterfaceMustHaveGraphRoute: import("@typespec/compiler").CallableMessage<[]>;
|
|
103
110
|
readonly referenceTargetMustOnlyBeUsedOnceOnInterface: import("@typespec/compiler").CallableMessage<[]>;
|
|
104
111
|
readonly referenceTargetPathShouldNotHaveParameters: import("@typespec/compiler").CallableMessage<[string]>;
|
|
105
|
-
readonly singletonOrEntitySetHostingBindingsShouldExist: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
106
112
|
readonly interfaceWithGraphRouteMustExtendGraphStandardBaseInterface: import("@typespec/compiler").CallableMessage<[]>;
|
|
113
|
+
readonly duplicateGraphRouteNotAllowed: import("@typespec/compiler").CallableMessage<[string, string, string]>;
|
|
114
|
+
readonly duplicateParametersAreNotAllowedInGraphRoute: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
107
115
|
};
|
|
108
116
|
"singleton-invalid-name": {
|
|
109
117
|
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
@@ -112,5 +120,11 @@ export declare const reportDiagnostic: <C extends "decorator-missing-dependencie
|
|
|
112
120
|
readonly default: import("@typespec/compiler").CallableMessage<[string, string]>;
|
|
113
121
|
readonly namespaces: "A model can only extend other models in a different logical namespace. Use @partial instead.";
|
|
114
122
|
};
|
|
123
|
+
"type-invalid-use": {
|
|
124
|
+
readonly default: import("@typespec/compiler").CallableMessage<[string]>;
|
|
125
|
+
readonly recordTypeCannotBePrepopulated: import("@typespec/compiler").CallableMessage<[string]>;
|
|
126
|
+
readonly recordTypeCannotBeNull: import("@typespec/compiler").CallableMessage<[string]>;
|
|
127
|
+
readonly recordTypeCannotBeUsedInLine: import("@typespec/compiler").CallableMessage<[string]>;
|
|
128
|
+
};
|
|
115
129
|
}, C, M>) => void;
|
|
116
130
|
//# sourceMappingURL=lib.d.ts.map
|
package/dist/src/lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,YAAY,CAAC;AAEnC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAeD,eAAO,MAAQ,gBAAgB
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,YAAY,CAAC;AAEnC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAeD,eAAO,MAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoFpB,CAAC"}
|
package/dist/src/lib.js
CHANGED
|
@@ -67,8 +67,9 @@ export const { reportDiagnostic } = createTypeSpecLibrary({
|
|
|
67
67
|
referenceTargetInterfaceMustHaveGraphRoute: paramMessage `The @referenceTarget decorator must be used on an interface with a @graphRoute decorator.`,
|
|
68
68
|
referenceTargetMustOnlyBeUsedOnceOnInterface: paramMessage `The @referenceTarget decorator can only be used once on an interface.`,
|
|
69
69
|
referenceTargetPathShouldNotHaveParameters: paramMessage `The @referenceTarget path "${"target"}" cannot have parameters {}.`,
|
|
70
|
-
singletonOrEntitySetHostingBindingsShouldExist: paramMessage `A singleton or entityset definition should exist to bind "${"firstSegment"}" to "${"target"}"`,
|
|
71
70
|
interfaceWithGraphRouteMustExtendGraphStandardBaseInterface: paramMessage `The @graphRoute decorator can only be used on an interface that ultimately extends a Graph standard base interface i.e. Resource<T> or Collection<T>.`,
|
|
71
|
+
duplicateGraphRouteNotAllowed: paramMessage `The @graphRoute "${"graphRoute"}" on "${"target"}" is already defined on another interface "${"existing"}".`,
|
|
72
|
+
duplicateParametersAreNotAllowedInGraphRoute: paramMessage `The parameters "${"parameters"}" on the @graphRoute "${"graphRoute"}" must have unique names.`,
|
|
72
73
|
},
|
|
73
74
|
},
|
|
74
75
|
"singleton-invalid-name": {
|
|
@@ -84,11 +85,16 @@ export const { reportDiagnostic } = createTypeSpecLibrary({
|
|
|
84
85
|
namespaces: 'A model can only extend other models in a different logical namespace. Use @partial instead.'
|
|
85
86
|
},
|
|
86
87
|
},
|
|
88
|
+
"type-invalid-use": {
|
|
89
|
+
severity: "error",
|
|
90
|
+
messages: {
|
|
91
|
+
default: paramMessage `The ${"type"} has been wrongly used. Refer to Typespec documentation`,
|
|
92
|
+
recordTypeCannotBePrepopulated: paramMessage `The record type "${"type"}" cannot be prepopulated.`,
|
|
93
|
+
recordTypeCannotBeNull: paramMessage `The record type "${"type"}" cannot be null.`,
|
|
94
|
+
recordTypeCannotBeUsedInLine: paramMessage `Using inline record as type on ${"type"} is not supported. Create a complex entity to represent it.`,
|
|
95
|
+
}
|
|
96
|
+
}
|
|
87
97
|
},
|
|
88
|
-
// TODO: Enable the linter rule
|
|
89
|
-
// linter: {
|
|
90
|
-
// rules: [useEvolvableEnumRule, singletonOrEntitySetHostingBindingsShouldExist],
|
|
91
|
-
// },
|
|
92
98
|
emitter: { options: EmitterOptionsSchema },
|
|
93
99
|
});
|
|
94
100
|
//# sourceMappingURL=lib.js.map
|
package/dist/src/lib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,qBAAqB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEzF,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC;AAMnC,MAAM,oBAAoB,GAA0C;IAClE,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE;QACV,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,wFAAwF;SACtG;KACF;IACD,QAAQ,EAAE,EAAE;CACb,CAAA;AAED,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,qBAAqB,CAAC;IACxD,IAAI,EAAE,6BAA6B;IACn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import { modelShouldBeEntityOrComplexType, singletonOrEntitySetHostingBindingsShouldExist, useEvolvableEnumRule } from "./rules/index.js";
|
|
3
|
+
export const $linter = defineLinter({
|
|
4
|
+
rules: [useEvolvableEnumRule, singletonOrEntitySetHostingBindingsShouldExist, modelShouldBeEntityOrComplexType],
|
|
5
|
+
ruleSets: {
|
|
6
|
+
recommended: {
|
|
7
|
+
enable: {
|
|
8
|
+
[`@microsoft/typespec-msgraph/${useEvolvableEnumRule.name}`]: true,
|
|
9
|
+
[`@microsoft/typespec-msgraph/${singletonOrEntitySetHostingBindingsShouldExist.name}`]: true,
|
|
10
|
+
[`@microsoft/typespec-msgraph/${modelShouldBeEntityOrComplexType.name}`]: true,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=linter.js.map
|
|
@@ -0,0 +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,gCAAgC,EAAE,8CAA8C,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE1I,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC;IAClC,KAAK,EAAE,CAAC,oBAAoB,EAAE,8CAA8C,EAAE,gCAAgC,CAAC;IAC/G,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,MAAM,EAAE;gBACN,CAAC,+BAA+B,oBAAoB,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;gBAClE,CAAC,+BAA+B,8CAA8C,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;gBAC5F,CAAC,+BAA+B,gCAAgC,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI;aAC/E;SACF;KACF;CACF,CAAC,CAAA"}
|
|
@@ -3,4 +3,16 @@ import { Program } from "@typespec/compiler";
|
|
|
3
3
|
* @addressUrl only applies to either routed interfaces (entity sets, singletons and navigation properties) or action operations.
|
|
4
4
|
*/
|
|
5
5
|
export declare function validateAddressUrlOnlyAppliesToRoutedInterfacesOrActionOperations(program: Program): void;
|
|
6
|
+
/**
|
|
7
|
+
* @addressUrlMsa only applies to either routed interfaces (entity sets, singletons and navigation properties) or action operations.
|
|
8
|
+
*/
|
|
9
|
+
export declare function validateAddressUrlMsaOnlyAppliesToRoutedInterfacesOrActionOperations(program: Program): void;
|
|
10
|
+
/**
|
|
11
|
+
* @passthroughAddressUrl only applies to either routed interfaces (entity sets, singletons and navigation properties) or action operations.
|
|
12
|
+
*/
|
|
13
|
+
export declare function validatePassthroughAddressUrlOnlyAppliesToRoutedInterfacesOrActionOperations(program: Program): void;
|
|
14
|
+
/**
|
|
15
|
+
* @passthroughAddressUrlMsa only applies to either routed interfaces (entity sets, singletons and navigation properties) or action operations.
|
|
16
|
+
*/
|
|
17
|
+
export declare function validatePassthroughAddressUrlMsaOnlyAppliesToRoutedInterfacesOrActionOperations(program: Program): void;
|
|
6
18
|
//# sourceMappingURL=address-url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-url.d.ts","sourceRoot":"","sources":["../../../src/rules/address-url.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"address-url.d.ts","sourceRoot":"","sources":["../../../src/rules/address-url.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAkD,MAAM,oBAAoB,CAAC;AAI7F;;GAEG;AACH,wBAAgB,iEAAiE,CAC/E,OAAO,EAAE,OAAO,QAgBjB;AAED;;GAEG;AACH,wBAAgB,oEAAoE,CAClF,OAAO,EAAE,OAAO,QAgBjB;AAED;;GAEG;AACH,wBAAgB,4EAA4E,CAC1F,OAAO,EAAE,OAAO,QAgBjB;AAED;;GAEG;AACH,wBAAgB,+EAA+E,CAC7F,OAAO,EAAE,OAAO,QAgBjB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { hasAddressUrl, hasGraphRoute, isAction } from "../index.js";
|
|
1
|
+
import { hasAddressUrl, hasAddressUrlMsa, hasGraphRoute, hasPassthroughAddressUrl, isAction, } from "../index.js";
|
|
2
2
|
import { reportDiagnostic } from "../lib.js";
|
|
3
3
|
import { navigateTypesInNamespace } from "@typespec/compiler";
|
|
4
4
|
import { GetDeclaredNamespaces } from "../entities/namespace.js";
|
|
5
|
+
import { hasPassthroughAddressUrlMsa } from "../decorators/passthrough-address-url-msa.js";
|
|
5
6
|
/**
|
|
6
7
|
* @addressUrl only applies to either routed interfaces (entity sets, singletons and navigation properties) or action operations.
|
|
7
8
|
*/
|
|
@@ -9,18 +10,76 @@ export function validateAddressUrlOnlyAppliesToRoutedInterfacesOrActionOperation
|
|
|
9
10
|
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
10
11
|
navigateTypesInNamespace(namespace, {
|
|
11
12
|
interface: (theInterface) => {
|
|
12
|
-
|
|
13
|
+
if (hasAddressUrl(program, theInterface)) {
|
|
14
|
+
validateAddressUrlApplication(program, theInterface, "@addressUrl");
|
|
15
|
+
}
|
|
13
16
|
},
|
|
14
17
|
operation: (operation) => {
|
|
15
|
-
|
|
18
|
+
if (hasAddressUrl(program, operation)) {
|
|
19
|
+
validateAddressUrlApplication(program, operation, "@addressUrl");
|
|
20
|
+
}
|
|
16
21
|
},
|
|
17
22
|
});
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
/**
|
|
26
|
+
* @addressUrlMsa only applies to either routed interfaces (entity sets, singletons and navigation properties) or action operations.
|
|
27
|
+
*/
|
|
28
|
+
export function validateAddressUrlMsaOnlyAppliesToRoutedInterfacesOrActionOperations(program) {
|
|
29
|
+
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
30
|
+
navigateTypesInNamespace(namespace, {
|
|
31
|
+
interface: (theInterface) => {
|
|
32
|
+
if (hasAddressUrlMsa(program, theInterface)) {
|
|
33
|
+
validateAddressUrlApplication(program, theInterface, "@addressUrlMsa");
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
operation: (operation) => {
|
|
37
|
+
if (hasAddressUrlMsa(program, operation)) {
|
|
38
|
+
validateAddressUrlApplication(program, operation, "@addressUrlMsa");
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
});
|
|
23
42
|
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @passthroughAddressUrl only applies to either routed interfaces (entity sets, singletons and navigation properties) or action operations.
|
|
46
|
+
*/
|
|
47
|
+
export function validatePassthroughAddressUrlOnlyAppliesToRoutedInterfacesOrActionOperations(program) {
|
|
48
|
+
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
49
|
+
navigateTypesInNamespace(namespace, {
|
|
50
|
+
interface: (theInterface) => {
|
|
51
|
+
if (hasPassthroughAddressUrl(program, theInterface)) {
|
|
52
|
+
validateAddressUrlApplication(program, theInterface, "@passthroughAddressUrl");
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
operation: (operation) => {
|
|
56
|
+
if (hasPassthroughAddressUrl(program, operation)) {
|
|
57
|
+
validateAddressUrlApplication(program, operation, "@passthroughAddressUrl");
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @passthroughAddressUrlMsa only applies to either routed interfaces (entity sets, singletons and navigation properties) or action operations.
|
|
65
|
+
*/
|
|
66
|
+
export function validatePassthroughAddressUrlMsaOnlyAppliesToRoutedInterfacesOrActionOperations(program) {
|
|
67
|
+
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
68
|
+
navigateTypesInNamespace(namespace, {
|
|
69
|
+
interface: (theInterface) => {
|
|
70
|
+
if (hasPassthroughAddressUrlMsa(program, theInterface)) {
|
|
71
|
+
validateAddressUrlApplication(program, theInterface, "@passthroughAddressUrlMsa");
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
operation: (operation) => {
|
|
75
|
+
if (hasPassthroughAddressUrlMsa(program, operation)) {
|
|
76
|
+
validateAddressUrlApplication(program, operation, "@passthroughAddressUrlMsa");
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function validateAddressUrlApplication(program, target, decorator) {
|
|
24
83
|
if (target.kind === "Interface" && hasGraphRoute(program, target)) {
|
|
25
84
|
return;
|
|
26
85
|
}
|
|
@@ -32,7 +91,7 @@ function validateAddressUrlApplication(program, target) {
|
|
|
32
91
|
target: target,
|
|
33
92
|
messageId: "wrongType",
|
|
34
93
|
format: {
|
|
35
|
-
decorator:
|
|
94
|
+
decorator: decorator,
|
|
36
95
|
target: "routed interface (entityset, singleton or navigation property) or an action operation",
|
|
37
96
|
},
|
|
38
97
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address-url.js","sourceRoot":"","sources":["../../../src/rules/address-url.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"address-url.js","sourceRoot":"","sources":["../../../src/rules/address-url.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,wBAAwB,EACxB,QAAQ,GACT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAiC,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAE3F;;GAEG;AACH,MAAM,UAAU,iEAAiE,CAC/E,OAAgB;IAEhB,KAAK,MAAM,SAAS,IAAI,qBAAqB,CAAC,OAAO,CAAC,EAAE;QACtD,wBAAwB,CAAC,SAAS,EAAE;YAClC,SAAS,EAAE,CAAC,YAAY,EAAE,EAAE;gBAC1B,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C;AACL,CAAC"}
|
|
@@ -2,5 +2,5 @@ import { Program } from "@typespec/compiler";
|
|
|
2
2
|
/**
|
|
3
3
|
* @contains applies to a navigation property.
|
|
4
4
|
*/
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function validateContainsOnlyAppliesToNavigationProperty(program: Program): void;
|
|
6
6
|
//# sourceMappingURL=contains.d.ts.map
|
|
@@ -6,7 +6,7 @@ import { GetDeclaredNamespaces } from "../entities/namespace.js";
|
|
|
6
6
|
/**
|
|
7
7
|
* @contains applies to a navigation property.
|
|
8
8
|
*/
|
|
9
|
-
export function
|
|
9
|
+
export function validateContainsOnlyAppliesToNavigationProperty(program) {
|
|
10
10
|
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
11
11
|
navigateTypesInNamespace(namespace, {
|
|
12
12
|
modelProperty: (property) => {
|
|
@@ -9,4 +9,6 @@ export declare function validateGraphRouteAndInterfaceExtendsMatchForCollections
|
|
|
9
9
|
* A interface decorated with @graphRoute must ultimately extend one of the standard graph interface i.e Resource<T> or Collection<T>.
|
|
10
10
|
*/
|
|
11
11
|
export declare function validateGraphRouteInterfaceExtendsGraphStandardInterface(program: Program): void;
|
|
12
|
+
export declare function validateDuplicateGraphRoutesNotAllowed(program: Program): void;
|
|
13
|
+
export declare function validateGraphRouteParametersMustBeUnique(program: Program): void;
|
|
12
14
|
//# sourceMappingURL=graph-route.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-route.d.ts","sourceRoot":"","sources":["../../../src/rules/graph-route.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwB,OAAO,EAAkC,MAAM,oBAAoB,CAAC;AAInG;;GAEG;AAEH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,OAAO,QAW9D;AAyBD,wBAAgB,oDAAoD,CAAC,OAAO,EAAE,OAAO,QAWpF;AAqDD,wBAAgB,wDAAwD,CAAC,OAAO,EAAE,OAAO,QA2BxF;AAeD;;GAEG;AACH,wBAAgB,wDAAwD,CAAC,OAAO,EAAE,OAAO,QA0BxF"}
|
|
1
|
+
{"version":3,"file":"graph-route.d.ts","sourceRoot":"","sources":["../../../src/rules/graph-route.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwB,OAAO,EAAkC,MAAM,oBAAoB,CAAC;AAInG;;GAEG;AAEH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,OAAO,QAW9D;AAyBD,wBAAgB,oDAAoD,CAAC,OAAO,EAAE,OAAO,QAWpF;AAqDD,wBAAgB,wDAAwD,CAAC,OAAO,EAAE,OAAO,QA2BxF;AAeD;;GAEG;AACH,wBAAgB,wDAAwD,CAAC,OAAO,EAAE,OAAO,QA0BxF;AAED,wBAAgB,sCAAsC,CAAC,OAAO,EAAE,OAAO,QA2BtE;AAED,wBAAgB,wCAAwC,CAAC,OAAO,EAAE,OAAO,QA6BxE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { reportDiagnostic } from "../lib.js";
|
|
2
|
-
import { extractParamsFromPath, getGraphRoutePaths, hasGraphRoute } from "../index.js";
|
|
2
|
+
import { extractParamsFromPath, getGraphRoutePaths, getGraphRoutes, hasGraphRoute } from "../index.js";
|
|
3
3
|
import { navigateTypesInNamespace } from "@typespec/compiler";
|
|
4
4
|
import { getIdForType, getSourceInterfaces } from "../utils.js";
|
|
5
5
|
import { GetDeclaredNamespaces } from "../entities/namespace.js";
|
|
@@ -158,4 +158,60 @@ export function validateGraphRouteInterfaceExtendsGraphStandardInterface(program
|
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
+
export function validateDuplicateGraphRoutesNotAllowed(program) {
|
|
162
|
+
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
163
|
+
navigateTypesInNamespace(namespace, {
|
|
164
|
+
interface: ($interface) => {
|
|
165
|
+
const existingRoutes = getGraphRoutes(program);
|
|
166
|
+
if (!hasGraphRoute(program, $interface)) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const graphRoutePaths = getGraphRoutePaths(program, $interface);
|
|
170
|
+
for (const graphRoutePath of graphRoutePaths) {
|
|
171
|
+
if (existingRoutes.has(graphRoutePath) && existingRoutes.get(graphRoutePath) !== $interface) {
|
|
172
|
+
reportDiagnostic(program, {
|
|
173
|
+
code: "decorator-invalid-use",
|
|
174
|
+
target: $interface,
|
|
175
|
+
messageId: "duplicateGraphRouteNotAllowed",
|
|
176
|
+
format: {
|
|
177
|
+
target: getIdForType(program, $interface),
|
|
178
|
+
graphRoute: graphRoutePath,
|
|
179
|
+
existing: getIdForType(program, existingRoutes.get(graphRoutePath))
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
export function validateGraphRouteParametersMustBeUnique(program) {
|
|
189
|
+
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
190
|
+
navigateTypesInNamespace(namespace, {
|
|
191
|
+
interface: ($interface) => {
|
|
192
|
+
if (!hasGraphRoute(program, $interface)) {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
const graphRoutePaths = getGraphRoutePaths(program, $interface);
|
|
196
|
+
for (const graphRoutePath of graphRoutePaths) {
|
|
197
|
+
const params = extractParamsFromPath(graphRoutePath);
|
|
198
|
+
const uniqueParams = new Set(params);
|
|
199
|
+
const duplicateParameters = params.filter(param => params.indexOf(param) !== params.lastIndexOf(param));
|
|
200
|
+
if (params.length !== uniqueParams.size) {
|
|
201
|
+
reportDiagnostic(program, {
|
|
202
|
+
code: "decorator-invalid-use",
|
|
203
|
+
target: $interface,
|
|
204
|
+
messageId: "duplicateParametersAreNotAllowedInGraphRoute",
|
|
205
|
+
format: {
|
|
206
|
+
graphRoute: graphRoutePath,
|
|
207
|
+
target: $interface.name,
|
|
208
|
+
parameters: duplicateParameters.join(", ")
|
|
209
|
+
},
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
}
|
|
161
217
|
//# sourceMappingURL=graph-route.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-route.js","sourceRoot":"","sources":["../../../src/rules/graph-route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"graph-route.js","sourceRoot":"","sources":["../../../src/rules/graph-route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvG,OAAO,EAAuC,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE;;GAEG;AAEH,MAAM,UAAU,8BAA8B,CAAC,OAAgB;IAC7D,KAAK,MAAM,SAAS,IAAI,qBAAqB,CAAC,OAAO,CAAC,EAAE;QACtD,wBAAwB,CAAC,SAAS,EAAE;YAClC,SAAS,EAAE,CAAC,UAAU,EAAE,EAAE;gBACxB,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;YACxC,CAAC;YACD,SAAS,EAAE,CAAC,SAAS,EAAE,EAAE;gBACvB,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YACvC,CAAC;SACF,CAAC,CAAC;KACJ;AACH,CAAC;AAAA,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,OAAgB,EAAE,MAAY,EAAE,EAAE;IAC1D,IAAI,CAAC,aAAa,CAAC,OAAO,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IAAI,CAAC;6BAC3C;yBACF,CAAC,CAAC;qBACJ;iBACF;YACH,CAAC;SACF,CAAC,CAAA;KACH;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rules/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oDAAoD,CAAC;AACnE,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,qCAAqC,CAAC;AACpD,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,iCAAiC,CAAC;AAChD,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rules/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oDAAoD,CAAC;AACnE,cAAc,eAAe,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pC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/rules/model.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gCAAgC;;EAmC3C,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createRule, getLocationContext, paramMessage } from "@typespec/compiler";
|
|
2
|
+
import { isExcludedCoreType } from "../utils.js";
|
|
3
|
+
import { isEntity, isComplex } from "../index.js";
|
|
4
|
+
export const modelShouldBeEntityOrComplexType = createRule({
|
|
5
|
+
name: "model-should-be-entity-or-complex-type",
|
|
6
|
+
severity: "warning",
|
|
7
|
+
description: "Model should be entity or complex type",
|
|
8
|
+
messages: {
|
|
9
|
+
default: paramMessage `Model '${"model"}' should be entity or complex type.`,
|
|
10
|
+
},
|
|
11
|
+
create(context) {
|
|
12
|
+
return {
|
|
13
|
+
model: (model) => {
|
|
14
|
+
if (isExcludedCoreType(context.program, model) || getLocationContext(context.program, model).type === "library") {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (isEntity(context.program, model) || isComplex(context.program, model)) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const modelDecorators = model.decorators;
|
|
21
|
+
for (const decorator of modelDecorators) {
|
|
22
|
+
if (decorator.decorator.name === "$operationParameters") {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
context.reportDiagnostic({
|
|
27
|
+
target: model,
|
|
28
|
+
format: {
|
|
29
|
+
model: model.name,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
},
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,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CAEF,CAAC,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Program } from "@typespec/compiler";
|
|
2
|
+
export declare function validateRecordsCannotBePrepopulated(program: Program): void;
|
|
3
|
+
export declare function validateRecordTypeCannotBeNull(program: Program): void;
|
|
4
|
+
export declare function validateRecordTypeCannotBeUsedInLine(program: Program): void;
|
|
5
|
+
//# sourceMappingURL=record-t.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-t.d.ts","sourceRoot":"","sources":["../../../src/rules/record-t.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,OAAO,EAAgD,MAAM,oBAAoB,CAAC;AAKlG,wBAAgB,mCAAmC,CAAC,OAAO,EAAE,OAAO,QAyBnE;AAED,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,OAAO,QA4B9D;AAED,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,OAAO,QAiBpE"}
|