@microsoft/typespec-msgraph 0.0.1-Preview.9 → 1.0.0-Preview.2
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/acceptable-media-types-annotation.js.map +1 -1
- package/dist/src/components/alternate-keys-annotation.js +2 -1
- package/dist/src/components/alternate-keys-annotation.js.map +1 -1
- package/dist/src/components/annotations.d.ts +3 -3
- package/dist/src/components/annotations.d.ts.map +1 -1
- package/dist/src/components/annotations.js +51 -8
- package/dist/src/components/annotations.js.map +1 -1
- package/dist/src/components/common-elements.d.ts +7 -7
- package/dist/src/components/common-elements.d.ts.map +1 -1
- package/dist/src/components/common-elements.js.map +1 -1
- package/dist/src/components/delta-annotation.d.ts +6 -0
- package/dist/src/components/delta-annotation.d.ts.map +1 -0
- package/dist/src/components/delta-annotation.js +18 -0
- package/dist/src/components/delta-annotation.js.map +1 -0
- package/dist/src/components/entity-container-element.d.ts.map +1 -1
- package/dist/src/components/entity-container-element.js +16 -6
- package/dist/src/components/entity-container-element.js.map +1 -1
- package/dist/src/components/enum-type-element.d.ts.map +1 -1
- package/dist/src/components/enum-type-element.js +6 -3
- package/dist/src/components/enum-type-element.js.map +1 -1
- package/dist/src/components/filter-restrictions-annotation.js +1 -1
- package/dist/src/components/filter-restrictions-annotation.js.map +1 -1
- package/dist/src/components/is-url-annotation.d.ts +5 -0
- package/dist/src/components/is-url-annotation.d.ts.map +1 -0
- package/dist/src/components/is-url-annotation.js +6 -0
- package/dist/src/components/is-url-annotation.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/src/components/operation-element.js +30 -15
- package/dist/src/components/operation-element.js.map +1 -1
- package/dist/src/components/permissions-annotation.js.map +1 -1
- package/dist/src/components/property-element.d.ts.map +1 -1
- package/dist/src/components/property-element.js +8 -4
- package/dist/src/components/property-element.js.map +1 -1
- package/dist/src/components/reference-target-element.d.ts +9 -0
- package/dist/src/components/reference-target-element.d.ts.map +1 -0
- package/dist/src/components/reference-target-element.js +3 -0
- package/dist/src/components/reference-target-element.js.map +1 -0
- package/dist/src/components/revisions-annotation.d.ts.map +1 -1
- package/dist/src/components/revisions-annotation.js +2 -1
- package/dist/src/components/revisions-annotation.js.map +1 -1
- package/dist/src/components/schema-element.d.ts.map +1 -1
- package/dist/src/components/schema-element.js +8 -3
- package/dist/src/components/schema-element.js.map +1 -1
- package/dist/src/components/select-supported-annotation.d.ts +5 -0
- package/dist/src/components/select-supported-annotation.d.ts.map +1 -0
- package/dist/src/components/select-supported-annotation.js +6 -0
- package/dist/src/components/select-supported-annotation.js.map +1 -0
- package/dist/src/components/structured-type-element.d.ts.map +1 -1
- package/dist/src/components/structured-type-element.js +8 -6
- package/dist/src/components/structured-type-element.js.map +1 -1
- package/dist/src/components/term-element.d.ts +9 -0
- package/dist/src/components/term-element.d.ts.map +1 -0
- package/dist/src/components/term-element.js +8 -0
- package/dist/src/components/term-element.js.map +1 -0
- package/dist/src/components/top-supported-annotation.js +1 -1
- package/dist/src/components/top-supported-annotation.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 +4 -4
- package/dist/src/components/update-restrictions-annotation.js.map +1 -1
- package/dist/src/decorators/abstract.d.ts +2 -0
- package/dist/src/decorators/abstract.d.ts.map +1 -1
- package/dist/src/decorators/abstract.js +2 -0
- package/dist/src/decorators/abstract.js.map +1 -1
- package/dist/src/decorators/action.d.ts +2 -0
- package/dist/src/decorators/action.d.ts.map +1 -1
- package/dist/src/decorators/action.js +2 -0
- package/dist/src/decorators/action.js.map +1 -1
- package/dist/src/decorators/additional-query-parameters.d.ts +2 -0
- package/dist/src/decorators/additional-query-parameters.d.ts.map +1 -1
- package/dist/src/decorators/additional-query-parameters.js +2 -0
- package/dist/src/decorators/additional-query-parameters.js.map +1 -1
- package/dist/src/decorators/address-url-msa.d.ts +14 -0
- package/dist/src/decorators/address-url-msa.d.ts.map +1 -0
- package/dist/src/decorators/address-url-msa.js +21 -0
- package/dist/src/decorators/address-url-msa.js.map +1 -0
- package/dist/src/decorators/address-url.d.ts +18 -0
- package/dist/src/decorators/address-url.d.ts.map +1 -0
- package/dist/src/decorators/address-url.js +21 -0
- package/dist/src/decorators/address-url.js.map +1 -0
- package/dist/src/decorators/ags-attribute.d.ts +7 -3
- package/dist/src/decorators/ags-attribute.d.ts.map +1 -1
- package/dist/src/decorators/ags-attribute.js +102 -3
- package/dist/src/decorators/ags-attribute.js.map +1 -1
- package/dist/src/decorators/allowed-values.d.ts +2 -0
- package/dist/src/decorators/allowed-values.d.ts.map +1 -1
- package/dist/src/decorators/allowed-values.js +2 -0
- package/dist/src/decorators/allowed-values.js.map +1 -1
- package/dist/src/decorators/complex.d.ts +2 -0
- package/dist/src/decorators/complex.d.ts.map +1 -1
- package/dist/src/decorators/complex.js +2 -0
- package/dist/src/decorators/complex.js.map +1 -1
- package/dist/src/decorators/computed.d.ts +2 -0
- package/dist/src/decorators/computed.d.ts.map +1 -1
- package/dist/src/decorators/computed.js +2 -0
- package/dist/src/decorators/computed.js.map +1 -1
- package/dist/src/decorators/contains.d.ts +2 -0
- package/dist/src/decorators/contains.d.ts.map +1 -1
- package/dist/src/decorators/contains.js +2 -0
- package/dist/src/decorators/contains.js.map +1 -1
- package/dist/src/decorators/count.d.ts +2 -0
- package/dist/src/decorators/count.d.ts.map +1 -1
- package/dist/src/decorators/count.js +2 -0
- package/dist/src/decorators/count.js.map +1 -1
- package/dist/src/decorators/delta.d.ts +10 -0
- package/dist/src/decorators/delta.d.ts.map +1 -0
- package/dist/src/decorators/delta.js +14 -0
- package/dist/src/decorators/delta.js.map +1 -0
- package/dist/src/decorators/deprecated-definition.d.ts +2 -0
- package/dist/src/decorators/deprecated-definition.d.ts.map +1 -1
- package/dist/src/decorators/deprecated-definition.js.map +1 -1
- package/dist/src/decorators/entity.d.ts +3 -0
- package/dist/src/decorators/entity.d.ts.map +1 -1
- package/dist/src/decorators/entity.js +7 -1
- package/dist/src/decorators/entity.js.map +1 -1
- package/dist/src/decorators/expand.d.ts +3 -0
- package/dist/src/decorators/expand.d.ts.map +1 -1
- package/dist/src/decorators/expand.js +7 -1
- package/dist/src/decorators/expand.js.map +1 -1
- package/dist/src/decorators/experimental.d.ts +11 -0
- package/dist/src/decorators/experimental.d.ts.map +1 -0
- package/dist/src/decorators/experimental.js +15 -0
- package/dist/src/decorators/experimental.js.map +1 -0
- package/dist/src/decorators/filter.d.ts +2 -0
- package/dist/src/decorators/filter.d.ts.map +1 -1
- package/dist/src/decorators/filter.js +6 -4
- package/dist/src/decorators/filter.js.map +1 -1
- package/dist/src/decorators/function.d.ts +9 -2
- package/dist/src/decorators/function.d.ts.map +1 -1
- package/dist/src/decorators/function.js +7 -2
- package/dist/src/decorators/function.js.map +1 -1
- package/dist/src/decorators/global-operation.d.ts +11 -0
- package/dist/src/decorators/global-operation.d.ts.map +1 -0
- package/dist/src/decorators/global-operation.js +15 -0
- package/dist/src/decorators/global-operation.js.map +1 -0
- package/dist/src/decorators/graph-deprecated.d.ts +13 -0
- package/dist/src/decorators/graph-deprecated.d.ts.map +1 -0
- package/dist/src/decorators/graph-deprecated.js +21 -0
- package/dist/src/decorators/graph-deprecated.js.map +1 -0
- package/dist/src/decorators/graph-partial.d.ts +12 -0
- package/dist/src/decorators/graph-partial.d.ts.map +1 -0
- package/dist/src/decorators/graph-partial.js +18 -0
- package/dist/src/decorators/graph-partial.js.map +1 -0
- package/dist/src/decorators/graph-route.d.ts +5 -1
- package/dist/src/decorators/graph-route.d.ts.map +1 -1
- package/dist/src/decorators/graph-route.js +62 -19
- package/dist/src/decorators/graph-route.js.map +1 -1
- package/dist/src/decorators/graphFlags.d.ts +11 -0
- package/dist/src/decorators/graphFlags.d.ts.map +1 -0
- package/dist/src/decorators/graphFlags.js +15 -0
- package/dist/src/decorators/graphFlags.js.map +1 -0
- package/dist/src/decorators/immutable.d.ts +2 -0
- package/dist/src/decorators/immutable.d.ts.map +1 -1
- package/dist/src/decorators/immutable.js +2 -0
- package/dist/src/decorators/immutable.js.map +1 -1
- package/dist/src/decorators/index.d.ts +22 -4
- package/dist/src/decorators/index.d.ts.map +1 -1
- package/dist/src/decorators/index.js +22 -4
- package/dist/src/decorators/index.js.map +1 -1
- package/dist/src/decorators/is-owner.d.ts +5 -2
- package/dist/src/decorators/is-owner.d.ts.map +1 -1
- package/dist/src/decorators/is-owner.js +9 -4
- package/dist/src/decorators/is-owner.js.map +1 -1
- package/dist/src/decorators/limited-charset.d.ts +11 -0
- package/dist/src/decorators/limited-charset.d.ts.map +1 -0
- package/dist/src/decorators/limited-charset.js +15 -0
- package/dist/src/decorators/limited-charset.js.map +1 -0
- package/dist/src/decorators/media.d.ts +12 -0
- package/dist/src/decorators/media.d.ts.map +1 -0
- package/dist/src/decorators/media.js +18 -0
- package/dist/src/decorators/media.js.map +1 -0
- package/dist/src/decorators/open.d.ts +2 -0
- package/dist/src/decorators/open.d.ts.map +1 -1
- package/dist/src/decorators/open.js +2 -0
- package/dist/src/decorators/open.js.map +1 -1
- package/dist/src/decorators/operation-parameters.d.ts +2 -0
- package/dist/src/decorators/operation-parameters.d.ts.map +1 -1
- package/dist/src/decorators/operation-parameters.js +2 -0
- package/dist/src/decorators/operation-parameters.js.map +1 -1
- package/dist/src/decorators/order-by.d.ts +2 -0
- package/dist/src/decorators/order-by.d.ts.map +1 -1
- package/dist/src/decorators/order-by.js +2 -0
- package/dist/src/decorators/order-by.js.map +1 -1
- package/dist/src/decorators/ownerless.d.ts +10 -0
- package/dist/src/decorators/ownerless.d.ts.map +1 -0
- package/dist/src/decorators/ownerless.js +14 -0
- package/dist/src/decorators/ownerless.js.map +1 -0
- package/dist/src/decorators/passthrough-address-url-msa.d.ts +14 -0
- package/dist/src/decorators/passthrough-address-url-msa.d.ts.map +1 -0
- package/dist/src/decorators/passthrough-address-url-msa.js +20 -0
- package/dist/src/decorators/passthrough-address-url-msa.js.map +1 -0
- package/dist/src/decorators/passthrough-address-url.d.ts +14 -0
- package/dist/src/decorators/passthrough-address-url.d.ts.map +1 -0
- package/dist/src/decorators/passthrough-address-url.js +20 -0
- package/dist/src/decorators/passthrough-address-url.js.map +1 -0
- package/dist/src/decorators/prefixed-graph-routes.d.ts +10 -0
- package/dist/src/decorators/prefixed-graph-routes.d.ts.map +1 -0
- package/dist/src/decorators/prefixed-graph-routes.js +27 -0
- package/dist/src/decorators/prefixed-graph-routes.js.map +1 -0
- package/dist/src/decorators/private-preview-definition.d.ts +2 -0
- package/dist/src/decorators/private-preview-definition.d.ts.map +1 -1
- package/dist/src/decorators/private-preview-definition.js +2 -0
- package/dist/src/decorators/private-preview-definition.js.map +1 -1
- package/dist/src/decorators/private-preview.d.ts +4 -2
- package/dist/src/decorators/private-preview.d.ts.map +1 -1
- package/dist/src/decorators/private-preview.js +2 -0
- package/dist/src/decorators/private-preview.js.map +1 -1
- package/dist/src/decorators/privileged.d.ts +2 -0
- package/dist/src/decorators/privileged.d.ts.map +1 -1
- package/dist/src/decorators/privileged.js +2 -0
- package/dist/src/decorators/privileged.js.map +1 -1
- package/dist/src/decorators/public-namespace.d.ts +2 -0
- package/dist/src/decorators/public-namespace.d.ts.map +1 -1
- package/dist/src/decorators/public-namespace.js +6 -1
- package/dist/src/decorators/public-namespace.js.map +1 -1
- package/dist/src/decorators/read-only.d.ts +2 -0
- package/dist/src/decorators/read-only.d.ts.map +1 -1
- package/dist/src/decorators/read-only.js +2 -0
- package/dist/src/decorators/read-only.js.map +1 -1
- package/dist/src/decorators/reference-target.d.ts +17 -0
- package/dist/src/decorators/reference-target.d.ts.map +1 -0
- package/dist/src/decorators/reference-target.js +59 -0
- package/dist/src/decorators/reference-target.js.map +1 -0
- package/dist/src/decorators/references.d.ts +2 -0
- package/dist/src/decorators/references.d.ts.map +1 -1
- package/dist/src/decorators/references.js +2 -0
- package/dist/src/decorators/references.js.map +1 -1
- package/dist/src/decorators/required-for-create.d.ts +2 -0
- package/dist/src/decorators/required-for-create.d.ts.map +1 -1
- package/dist/src/decorators/required-for-create.js +2 -0
- package/dist/src/decorators/required-for-create.js.map +1 -1
- package/dist/src/decorators/return-source.d.ts +11 -0
- package/dist/src/decorators/return-source.d.ts.map +1 -0
- package/dist/src/decorators/return-source.js +28 -0
- package/dist/src/decorators/return-source.js.map +1 -0
- package/dist/src/decorators/search.d.ts +2 -0
- package/dist/src/decorators/search.d.ts.map +1 -1
- package/dist/src/decorators/search.js +2 -0
- package/dist/src/decorators/search.js.map +1 -1
- package/dist/src/decorators/select.d.ts +11 -0
- package/dist/src/decorators/select.d.ts.map +1 -0
- package/dist/src/decorators/select.js +15 -0
- package/dist/src/decorators/select.js.map +1 -0
- package/dist/src/decorators/shared-entity.d.ts +9 -0
- package/dist/src/decorators/shared-entity.d.ts.map +1 -0
- package/dist/src/decorators/shared-entity.js +15 -0
- package/dist/src/decorators/shared-entity.js.map +1 -0
- package/dist/src/decorators/skip.d.ts +2 -0
- package/dist/src/decorators/skip.d.ts.map +1 -1
- package/dist/src/decorators/skip.js +2 -0
- package/dist/src/decorators/skip.js.map +1 -1
- package/dist/src/decorators/term.d.ts +13 -0
- package/dist/src/decorators/term.d.ts.map +1 -0
- package/dist/src/decorators/term.js +14 -0
- package/dist/src/decorators/term.js.map +1 -0
- package/dist/src/decorators/top.d.ts +2 -0
- package/dist/src/decorators/top.d.ts.map +1 -1
- package/dist/src/decorators/top.js +2 -0
- package/dist/src/decorators/top.js.map +1 -1
- package/dist/src/decorators/workload-name-msa.d.ts +2 -0
- package/dist/src/decorators/workload-name-msa.d.ts.map +1 -1
- package/dist/src/decorators/workload-name-msa.js +2 -0
- package/dist/src/decorators/workload-name-msa.js.map +1 -1
- package/dist/src/decorators/workload-name.d.ts +2 -0
- package/dist/src/decorators/workload-name.d.ts.map +1 -1
- package/dist/src/decorators/workload-name.js +2 -0
- package/dist/src/decorators/workload-name.js.map +1 -1
- package/dist/src/decorators/workload-namespace.d.ts +12 -0
- package/dist/src/decorators/workload-namespace.d.ts.map +1 -0
- package/dist/src/decorators/workload-namespace.js +21 -0
- package/dist/src/decorators/workload-namespace.js.map +1 -0
- package/dist/src/decorators/write-only.d.ts +2 -0
- package/dist/src/decorators/write-only.d.ts.map +1 -1
- package/dist/src/decorators/write-only.js +2 -0
- package/dist/src/decorators/write-only.js.map +1 -1
- package/dist/src/dom/error-interceptor.d.ts +2 -0
- package/dist/src/dom/error-interceptor.d.ts.map +1 -0
- package/dist/src/dom/error-interceptor.js +13 -0
- package/dist/src/dom/error-interceptor.js.map +1 -0
- package/dist/src/dom/reconciler.js.map +1 -1
- package/dist/src/dom/renderer.d.ts +1 -0
- package/dist/src/dom/renderer.d.ts.map +1 -1
- package/dist/src/dom/renderer.js +1 -0
- package/dist/src/dom/renderer.js.map +1 -1
- package/dist/src/emitter.d.ts.map +1 -1
- package/dist/src/emitter.js +30 -3
- package/dist/src/emitter.js.map +1 -1
- package/dist/src/entities/address-url.d.ts +8 -0
- package/dist/src/entities/address-url.d.ts.map +1 -0
- package/dist/src/entities/address-url.js +47 -0
- package/dist/src/entities/address-url.js.map +1 -0
- package/dist/src/entities/annotations.d.ts +17 -4
- package/dist/src/entities/annotations.d.ts.map +1 -1
- package/dist/src/entities/annotations.js +120 -74
- package/dist/src/entities/annotations.js.map +1 -1
- package/dist/src/entities/entity-container.d.ts +21 -0
- package/dist/src/entities/entity-container.d.ts.map +1 -1
- package/dist/src/entities/entity-container.js +33 -4
- package/dist/src/entities/entity-container.js.map +1 -1
- package/dist/src/entities/enum.d.ts +3 -1
- package/dist/src/entities/enum.d.ts.map +1 -1
- package/dist/src/entities/enum.js +10 -5
- package/dist/src/entities/enum.js.map +1 -1
- package/dist/src/entities/model.d.ts +34 -10
- package/dist/src/entities/model.d.ts.map +1 -1
- package/dist/src/entities/model.js +310 -14
- package/dist/src/entities/model.js.map +1 -1
- package/dist/src/entities/ms-graph-route.d.ts +13 -0
- package/dist/src/entities/ms-graph-route.d.ts.map +1 -0
- package/dist/src/entities/ms-graph-route.js +67 -0
- package/dist/src/entities/ms-graph-route.js.map +1 -0
- package/dist/src/entities/namespace.d.ts +25 -4
- package/dist/src/entities/namespace.d.ts.map +1 -1
- package/dist/src/entities/namespace.js +314 -18
- package/dist/src/entities/namespace.js.map +1 -1
- package/dist/src/entities/operation.d.ts +18 -0
- package/dist/src/entities/operation.d.ts.map +1 -1
- package/dist/src/entities/operation.js +142 -20
- package/dist/src/entities/operation.js.map +1 -1
- package/dist/src/entities/property.d.ts.map +1 -1
- package/dist/src/entities/property.js +7 -0
- package/dist/src/entities/property.js.map +1 -1
- package/dist/src/entities/revision-definition.d.ts +3 -2
- package/dist/src/entities/revision-definition.d.ts.map +1 -1
- package/dist/src/entities/revision-definition.js +17 -6
- package/dist/src/entities/revision-definition.js.map +1 -1
- package/dist/src/entities/term.d.ts +8 -0
- package/dist/src/entities/term.d.ts.map +1 -0
- package/dist/src/entities/term.js +14 -0
- package/dist/src/entities/term.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +123 -109
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +72 -10
- package/dist/src/lib.js.map +1 -1
- package/dist/src/linter.d.ts +1 -2
- package/dist/src/linter.d.ts.map +1 -1
- package/dist/src/linter.js +32 -42
- package/dist/src/linter.js.map +1 -1
- package/dist/src/path-tree.d.ts +16 -0
- package/dist/src/path-tree.d.ts.map +1 -0
- package/dist/src/path-tree.js +76 -0
- package/dist/src/path-tree.js.map +1 -0
- package/dist/src/rules/abstract.d.ts +2 -1
- package/dist/src/rules/abstract.d.ts.map +1 -1
- package/dist/src/rules/abstract.js +8 -8
- package/dist/src/rules/abstract.js.map +1 -1
- package/dist/src/rules/address-url.d.ts +20 -0
- package/dist/src/rules/address-url.d.ts.map +1 -0
- package/dist/src/rules/address-url.js +248 -0
- package/dist/src/rules/address-url.js.map +1 -0
- package/dist/src/rules/allowed-values.d.ts +2 -1
- package/dist/src/rules/allowed-values.d.ts.map +1 -1
- package/dist/src/rules/allowed-values.js +7 -7
- package/dist/src/rules/allowed-values.js.map +1 -1
- package/dist/src/rules/alternate-key.d.ts +4 -3
- package/dist/src/rules/alternate-key.d.ts.map +1 -1
- package/dist/src/rules/alternate-key.js +23 -23
- package/dist/src/rules/alternate-key.js.map +1 -1
- package/dist/src/rules/collection-navigation-properties-not-nullable.d.ts +2 -1
- package/dist/src/rules/collection-navigation-properties-not-nullable.d.ts.map +1 -1
- package/dist/src/rules/collection-navigation-properties-not-nullable.js +9 -9
- package/dist/src/rules/collection-navigation-properties-not-nullable.js.map +1 -1
- package/dist/src/rules/complex.d.ts +3 -0
- package/dist/src/rules/complex.d.ts.map +1 -0
- package/dist/src/rules/complex.js +27 -0
- package/dist/src/rules/complex.js.map +1 -0
- package/dist/src/rules/computed.d.ts +2 -3
- package/dist/src/rules/computed.d.ts.map +1 -1
- package/dist/src/rules/computed.js +14 -16
- package/dist/src/rules/computed.js.map +1 -1
- package/dist/src/rules/contains.d.ts +2 -1
- package/dist/src/rules/contains.d.ts.map +1 -1
- package/dist/src/rules/contains.js +9 -8
- package/dist/src/rules/contains.js.map +1 -1
- package/dist/src/rules/count.d.ts +2 -1
- package/dist/src/rules/count.d.ts.map +1 -1
- package/dist/src/rules/count.js +9 -8
- package/dist/src/rules/count.js.map +1 -1
- package/dist/src/rules/delta.d.ts +8 -0
- package/dist/src/rules/delta.d.ts.map +1 -0
- package/dist/src/rules/delta.js +208 -0
- package/dist/src/rules/delta.js.map +1 -0
- package/dist/src/rules/disallowed-typespec-decorators.d.ts +2 -1
- package/dist/src/rules/disallowed-typespec-decorators.d.ts.map +1 -1
- package/dist/src/rules/disallowed-typespec-decorators.js +29 -25
- package/dist/src/rules/disallowed-typespec-decorators.js.map +1 -1
- package/dist/src/rules/documentation.d.ts +4 -0
- package/dist/src/rules/documentation.d.ts.map +1 -0
- package/dist/src/rules/documentation.js +91 -0
- package/dist/src/rules/documentation.js.map +1 -0
- package/dist/src/rules/entity.d.ts +9 -2
- package/dist/src/rules/entity.d.ts.map +1 -1
- package/dist/src/rules/entity.js +170 -17
- package/dist/src/rules/entity.js.map +1 -1
- package/dist/src/rules/enum.d.ts +5 -1
- package/dist/src/rules/enum.d.ts.map +1 -1
- package/dist/src/rules/enum.js +35 -6
- package/dist/src/rules/enum.js.map +1 -1
- package/dist/src/rules/expand.d.ts +3 -2
- package/dist/src/rules/expand.d.ts.map +1 -1
- package/dist/src/rules/expand.js +25 -20
- package/dist/src/rules/expand.js.map +1 -1
- package/dist/src/rules/extends-on-same-type.d.ts +2 -1
- package/dist/src/rules/extends-on-same-type.d.ts.map +1 -1
- package/dist/src/rules/extends-on-same-type.js +9 -8
- package/dist/src/rules/extends-on-same-type.js.map +1 -1
- package/dist/src/rules/filter.d.ts +6 -3
- package/dist/src/rules/filter.d.ts.map +1 -1
- package/dist/src/rules/filter.js +100 -32
- package/dist/src/rules/filter.js.map +1 -1
- package/dist/src/rules/function.d.ts +3 -1
- package/dist/src/rules/function.d.ts.map +1 -1
- package/dist/src/rules/function.js +48 -9
- package/dist/src/rules/function.js.map +1 -1
- package/dist/src/rules/global-operation.d.ts +4 -0
- package/dist/src/rules/global-operation.d.ts.map +1 -0
- package/dist/src/rules/global-operation.js +60 -0
- package/dist/src/rules/global-operation.js.map +1 -0
- package/dist/src/rules/graph-deprecated.d.ts +8 -0
- package/dist/src/rules/graph-deprecated.d.ts.map +1 -0
- package/dist/src/rules/graph-deprecated.js +152 -0
- package/dist/src/rules/graph-deprecated.js.map +1 -0
- package/dist/src/rules/graph-partial.d.ts +9 -0
- package/dist/src/rules/graph-partial.d.ts.map +1 -0
- package/dist/src/rules/graph-partial.js +84 -0
- package/dist/src/rules/graph-partial.js.map +1 -0
- package/dist/src/rules/graph-route.d.ts +13 -2
- package/dist/src/rules/graph-route.d.ts.map +1 -1
- package/dist/src/rules/graph-route.js +324 -17
- package/dist/src/rules/graph-route.js.map +1 -1
- package/dist/src/rules/index.d.ts +16 -3
- package/dist/src/rules/index.d.ts.map +1 -1
- package/dist/src/rules/index.js +16 -3
- package/dist/src/rules/index.js.map +1 -1
- package/dist/src/rules/limited-charset.d.ts +3 -0
- package/dist/src/rules/limited-charset.d.ts.map +1 -0
- package/dist/src/rules/limited-charset.js +42 -0
- package/dist/src/rules/limited-charset.js.map +1 -0
- package/dist/src/rules/media.d.ts +10 -0
- package/dist/src/rules/media.d.ts.map +1 -0
- package/dist/src/rules/media.js +122 -0
- package/dist/src/rules/media.js.map +1 -0
- package/dist/src/rules/model.d.ts +10 -0
- package/dist/src/rules/model.d.ts.map +1 -0
- package/dist/src/rules/model.js +131 -0
- package/dist/src/rules/model.js.map +1 -0
- package/dist/src/rules/namespace.d.ts +5 -2
- package/dist/src/rules/namespace.d.ts.map +1 -1
- package/dist/src/rules/namespace.js +87 -35
- package/dist/src/rules/namespace.js.map +1 -1
- package/dist/src/rules/open.d.ts +2 -1
- package/dist/src/rules/open.d.ts.map +1 -1
- package/dist/src/rules/open.js +9 -8
- package/dist/src/rules/open.js.map +1 -1
- package/dist/src/rules/operation-inside-interface.d.ts +6 -1
- package/dist/src/rules/operation-inside-interface.d.ts.map +1 -1
- package/dist/src/rules/operation-inside-interface.js +78 -7
- package/dist/src/rules/operation-inside-interface.js.map +1 -1
- package/dist/src/rules/order-by.d.ts +3 -2
- package/dist/src/rules/order-by.d.ts.map +1 -1
- package/dist/src/rules/order-by.js +19 -19
- package/dist/src/rules/order-by.js.map +1 -1
- package/dist/src/rules/ownerless.d.ts +11 -0
- package/dist/src/rules/ownerless.d.ts.map +1 -0
- package/dist/src/rules/ownerless.js +170 -0
- package/dist/src/rules/ownerless.js.map +1 -0
- package/dist/src/rules/record-t.d.ts +11 -0
- package/dist/src/rules/record-t.d.ts.map +1 -0
- package/dist/src/rules/record-t.js +129 -0
- package/dist/src/rules/record-t.js.map +1 -0
- package/dist/src/rules/reference-target.d.ts +6 -0
- package/dist/src/rules/reference-target.d.ts.map +1 -0
- package/dist/src/rules/reference-target.js +113 -0
- package/dist/src/rules/reference-target.js.map +1 -0
- package/dist/src/rules/references.d.ts +2 -1
- package/dist/src/rules/references.d.ts.map +1 -1
- package/dist/src/rules/references.js +9 -8
- package/dist/src/rules/references.js.map +1 -1
- package/dist/src/rules/required-for-create.d.ts +2 -1
- package/dist/src/rules/required-for-create.d.ts.map +1 -1
- package/dist/src/rules/required-for-create.js +11 -10
- package/dist/src/rules/required-for-create.js.map +1 -1
- package/dist/src/rules/return-source.d.ts +3 -0
- package/dist/src/rules/return-source.d.ts.map +1 -0
- package/dist/src/rules/return-source.js +27 -0
- package/dist/src/rules/return-source.js.map +1 -0
- package/dist/src/rules/search.d.ts +2 -1
- package/dist/src/rules/search.d.ts.map +1 -1
- package/dist/src/rules/search.js +9 -8
- package/dist/src/rules/search.js.map +1 -1
- package/dist/src/rules/shared-entity.d.ts +8 -0
- package/dist/src/rules/shared-entity.d.ts.map +1 -0
- package/dist/src/rules/shared-entity.js +176 -0
- package/dist/src/rules/shared-entity.js.map +1 -0
- package/dist/src/rules/skip.d.ts +2 -1
- package/dist/src/rules/skip.d.ts.map +1 -1
- package/dist/src/rules/skip.js +9 -8
- package/dist/src/rules/skip.js.map +1 -1
- package/dist/src/rules/top.d.ts +2 -1
- package/dist/src/rules/top.d.ts.map +1 -1
- package/dist/src/rules/top.js +9 -8
- package/dist/src/rules/top.js.map +1 -1
- package/dist/src/testing/index.d.ts +1 -0
- package/dist/src/testing/index.d.ts.map +1 -1
- package/dist/src/testing/index.js +21 -0
- package/dist/src/testing/index.js.map +1 -1
- package/dist/src/utils.d.ts +70 -4
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +609 -54
- package/dist/src/utils.js.map +1 -1
- package/dist/src/validate.d.ts +3 -0
- package/dist/src/validate.d.ts.map +1 -0
- package/dist/src/validate.js +98 -0
- package/dist/src/validate.js.map +1 -0
- package/lib/bodies.tsp +71 -0
- package/lib/decorators.tsp +222 -29
- package/lib/lib.tsp +3 -1
- package/lib/msgraph.tsp +1 -0
- package/lib/porcelain.tsp +78 -23
- package/lib/responses.tsp +17 -40
- package/lib/shared-models.tsp +6 -51
- package/package.json +24 -26
- package/dist/src/decorators/flags.d.ts +0 -9
- package/dist/src/decorators/flags.d.ts.map +0 -1
- package/dist/src/decorators/flags.js +0 -13
- package/dist/src/decorators/flags.js.map +0 -1
- package/dist/src/decorators/has-stream.d.ts +0 -10
- package/dist/src/decorators/has-stream.d.ts.map +0 -1
- package/dist/src/decorators/has-stream.js +0 -17
- package/dist/src/decorators/has-stream.js.map +0 -1
- package/dist/src/rules/has-stream.d.ts +0 -2
- package/dist/src/rules/has-stream.d.ts.map +0 -1
- package/dist/src/rules/has-stream.js +0 -29
- package/dist/src/rules/has-stream.js.map +0 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { createRule, getDoc, paramMessage } from "@typespec/compiler";
|
|
2
|
+
import { isAction, isComplex, isEntity, isFunction } from "../index.js";
|
|
3
|
+
import { isExcludedCoreType } from "../utils.js";
|
|
4
|
+
export const validateCoreElementsHaveDocString = createRule({
|
|
5
|
+
name: "require-documentation-for-core-elements",
|
|
6
|
+
severity: "warning",
|
|
7
|
+
description: "Require documentation for models, model properties, enums, enum members, actions and functions",
|
|
8
|
+
messages: {
|
|
9
|
+
default: paramMessage `Models, model properties, enums, enum members, actions and functions must have documentation`
|
|
10
|
+
},
|
|
11
|
+
create(context) {
|
|
12
|
+
return {
|
|
13
|
+
model: (model) => {
|
|
14
|
+
if (isExcludedCoreType(context.program, model)) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (!isEntity(context.program, model) && !isComplex(context.program, model))
|
|
18
|
+
return;
|
|
19
|
+
const doc = getDoc(context.program, model);
|
|
20
|
+
if (!doc || doc.trim().length === 0) {
|
|
21
|
+
context.reportDiagnostic({
|
|
22
|
+
target: model,
|
|
23
|
+
format: {
|
|
24
|
+
target: model.name
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
for (const property of model.properties.values()) {
|
|
29
|
+
if (isExcludedCoreType(context.program, property)) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const propDoc = getDoc(context.program, property);
|
|
33
|
+
if (!propDoc || propDoc.trim().length === 0) {
|
|
34
|
+
context.reportDiagnostic({
|
|
35
|
+
target: property,
|
|
36
|
+
format: {
|
|
37
|
+
target: property.name
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
enum: (enumType) => {
|
|
44
|
+
if (isExcludedCoreType(context.program, enumType)) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const doc = getDoc(context.program, enumType);
|
|
48
|
+
if (!doc || doc.trim().length === 0) {
|
|
49
|
+
context.reportDiagnostic({
|
|
50
|
+
target: enumType,
|
|
51
|
+
format: {
|
|
52
|
+
target: enumType.name
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
for (const member of enumType.members.values()) {
|
|
57
|
+
if (member.name === "unknownFutureValue") {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const memberDoc = getDoc(context.program, member);
|
|
61
|
+
if (!memberDoc || memberDoc.trim().length === 0) {
|
|
62
|
+
context.reportDiagnostic({
|
|
63
|
+
target: member,
|
|
64
|
+
format: {
|
|
65
|
+
target: member.name
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
operation: (operation) => {
|
|
72
|
+
if (isExcludedCoreType(context.program, operation) || operation.kind !== "Operation") {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (!isAction(context.program, operation) && !isFunction(context.program, operation)) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const doc = getDoc(context.program, operation);
|
|
79
|
+
if (!doc || doc.trim().length === 0) {
|
|
80
|
+
context.reportDiagnostic({
|
|
81
|
+
target: operation,
|
|
82
|
+
format: {
|
|
83
|
+
target: operation.name
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=documentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentation.js","sourceRoot":"","sources":["../../../src/rules/documentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAA0B,MAAM,aAAa,CAAC;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,CAAC,MAAM,iCAAiC,GAAG,UAAU,CAAC;IAC1D,IAAI,EAAE,yCAAyC;IAC/C,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,gGAAgG;IAC7G,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY,CAAA,8FAA8F;KACpH;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;gBACf,IAAI,kBAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC;oBAC/C,OAAO;gBACT,CAAC;gBAED,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC;o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AAI;yBACvB;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAA;IACH,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export declare
|
|
1
|
+
import { Program } from "@typespec/compiler";
|
|
2
|
+
export declare function validateEntityMustHaveKey(program: Program): void;
|
|
3
|
+
export declare function validateKeyOnlyOnEntityNonNullablePrimitiveProperty(program: Program): void;
|
|
4
|
+
export declare function validateExtendOnlyAppliesOnDifferentNamespaces(program: Program): void;
|
|
5
|
+
export declare function validatePropertyTypeOfEntityTypeMustHaveContainsOrReferences(program: Program): void;
|
|
6
|
+
export declare function validateEntityAndComplexAreMutuallyExclusive(program: Program): void;
|
|
7
|
+
export declare const entityAndComplexPropertyNameShouldNotBeName: import("@typespec/compiler").LinterRuleDefinition<"entity-complex-property-names-should-not-be-name", {
|
|
8
|
+
readonly default: import("@typespec/compiler").CallableMessage<[]>;
|
|
9
|
+
}>;
|
|
3
10
|
//# sourceMappingURL=entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/rules/entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/rules/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EACsH,MAAM,oBAAoB,CAAC;AAMjK,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,QAsDzD;AAED,wBAAgB,mDAAmD,CAAC,OAAO,EAAE,OAAO,QA2CnF;AAGD,wBAAgB,8CAA8C,CAAC,OAAO,EAAE,OAAO,QA2B9E;AAED,wBAAgB,4DAA4D,CAAE,OAAO,EAAE,OAAO,QA0B7F;AAED,wBAAgB,4CAA4C,CAAC,OAAO,EAAE,OAAO,QAmB5E;AAED,eAAO,MAAM,2CAA2C;;EA2BtD,CAAA"}
|
package/dist/src/rules/entity.js
CHANGED
|
@@ -1,21 +1,48 @@
|
|
|
1
|
-
import { isKey, walkPropertiesInherited } from "@typespec/compiler";
|
|
2
|
-
import {
|
|
3
|
-
import { isEntity } from "../index.js";
|
|
1
|
+
import { isKey, navigateTypesInNamespace, walkPropertiesInherited, isArrayModelType, createRule, paramMessage } from "@typespec/compiler";
|
|
2
|
+
import { isComplex, isDirectEntity, isOwnerless, isSharedEntity, isPartial, isEntity } from "../index.js";
|
|
4
3
|
import { reportDiagnostic } from "../lib.js";
|
|
5
|
-
import { isTypeNullable, isExcludedLibraryType } from "../utils.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { isTypeNullable, isExcludedLibraryType, isSameNamespace, extractTypesFromUnion, getInterfaceNavigationSourceType, isNavigationProperty, isTypeDefinedInExternalLibrary, isTypeDefinedInLocalProject, isParentSharedEntity } from "../utils.js";
|
|
5
|
+
import { GetDeclaredNamespaces } from "../entities/namespace.js";
|
|
6
|
+
export function validateEntityMustHaveKey(program) {
|
|
7
|
+
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
8
|
+
navigateTypesInNamespace(namespace, {
|
|
10
9
|
model: (model) => {
|
|
11
|
-
if (!
|
|
10
|
+
if (!isDirectEntity(program, model) && !isParentSharedEntity(program, model)) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (isPartial(program, model)) {
|
|
12
14
|
return;
|
|
13
15
|
}
|
|
14
|
-
|
|
16
|
+
const properties = walkPropertiesInherited(model);
|
|
17
|
+
for (const property of properties) {
|
|
15
18
|
if (isKey(program, property)) {
|
|
16
19
|
return;
|
|
17
20
|
}
|
|
18
21
|
}
|
|
22
|
+
// If the model is a binding type in an ownerless singleton route skip check.'
|
|
23
|
+
let modelIsOwnerless = false;
|
|
24
|
+
navigateTypesInNamespace(namespace, {
|
|
25
|
+
interface: (interfaceModel) => {
|
|
26
|
+
if (isOwnerless(program, interfaceModel)) {
|
|
27
|
+
let bindingType = getInterfaceNavigationSourceType(program, interfaceModel);
|
|
28
|
+
if (bindingType && bindingType === model) {
|
|
29
|
+
modelIsOwnerless = true;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
// Or if it is explicitly marked with an equivalent @agsAttribute
|
|
35
|
+
if (model.decorators.find((da) => {
|
|
36
|
+
var _a;
|
|
37
|
+
return ((_a = da.definition) === null || _a === void 0 ? void 0 : _a.name) === "@agsAttribute" &&
|
|
38
|
+
da.args.findIndex((darg) => darg.jsValue === "IsOwnerlessSingleton") !== -1 &&
|
|
39
|
+
da.args.findIndex((darg) => darg.jsValue === "true") !== -1;
|
|
40
|
+
})) {
|
|
41
|
+
modelIsOwnerless = true;
|
|
42
|
+
}
|
|
43
|
+
if (modelIsOwnerless) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
19
46
|
reportDiagnostic(program, {
|
|
20
47
|
code: "decorator-missing-dependencies",
|
|
21
48
|
target: model,
|
|
@@ -26,13 +53,13 @@ export const entityMustHaveKeyRule = createRule({
|
|
|
26
53
|
},
|
|
27
54
|
});
|
|
28
55
|
},
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
;
|
|
60
|
+
export function validateKeyOnlyOnEntityNonNullablePrimitiveProperty(program) {
|
|
61
|
+
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
62
|
+
navigateTypesInNamespace(namespace, {
|
|
36
63
|
modelProperty: (property) => {
|
|
37
64
|
if (!property.model || !isKey(program, property)) {
|
|
38
65
|
return;
|
|
@@ -64,7 +91,133 @@ export const keyOnlyOnEntityNonNullablePrimitivePropertyRule = createRule({
|
|
|
64
91
|
return;
|
|
65
92
|
}
|
|
66
93
|
},
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
;
|
|
98
|
+
// TODO: Add unit tests for this function
|
|
99
|
+
export function validateExtendOnlyAppliesOnDifferentNamespaces(program) {
|
|
100
|
+
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
101
|
+
navigateTypesInNamespace(namespace, {
|
|
102
|
+
model: (model) => {
|
|
103
|
+
if (!model.baseModel) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if (isTypeDefinedInExternalLibrary(program, model.baseModel) && isTypeDefinedInExternalLibrary(program, model)) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (isTypeDefinedInLocalProject(program, model.baseModel) && isTypeDefinedInLocalProject(program, model)) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (isSameNamespace(program, model, model.baseModel)) {
|
|
113
|
+
reportDiagnostic(program, {
|
|
114
|
+
code: "extends-invalid-use",
|
|
115
|
+
target: model,
|
|
116
|
+
messageId: "namespaces",
|
|
117
|
+
format: {},
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
;
|
|
125
|
+
export function validatePropertyTypeOfEntityTypeMustHaveContainsOrReferences(program) {
|
|
126
|
+
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
127
|
+
navigateTypesInNamespace(namespace, {
|
|
128
|
+
modelProperty: (property) => {
|
|
129
|
+
if (property.type.kind === "Model" && isPropertyParentModelAndPropertyTypeEntity(program, property)) {
|
|
130
|
+
if (!isNavigationProperty(program, property)) {
|
|
131
|
+
reportModelPropertyDiagnostics(program, property);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (property.type.kind === "Union" && !isTypeDefinedInExternalLibrary(program, property)) {
|
|
136
|
+
const unionTypes = extractTypesFromUnion(property.type);
|
|
137
|
+
for (const unionType of unionTypes) {
|
|
138
|
+
if (unionType.kind === "Model" && isEntity(program, unionType)) {
|
|
139
|
+
if (!isNavigationProperty(program, property)) {
|
|
140
|
+
reportModelPropertyDiagnostics(program, property, unionType.name);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
export function validateEntityAndComplexAreMutuallyExclusive(program) {
|
|
151
|
+
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
152
|
+
navigateTypesInNamespace(namespace, {
|
|
153
|
+
model: (model) => {
|
|
154
|
+
if (isEntity(program, model) && isComplex(program, model)) {
|
|
155
|
+
reportDiagnostic(program, {
|
|
156
|
+
code: "decorator-invalid-use",
|
|
157
|
+
target: model,
|
|
158
|
+
messageId: "entityAndComplexAreMutuallyExclusive",
|
|
159
|
+
format: {
|
|
160
|
+
model: model.name,
|
|
161
|
+
decorator: isSharedEntity(program, model) ? "@sharedEntity" : "@entity",
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
export const entityAndComplexPropertyNameShouldNotBeName = createRule({
|
|
170
|
+
name: "entity-complex-property-names-should-not-be-name",
|
|
171
|
+
severity: "warning",
|
|
172
|
+
description: "Enforce property names should not be 'name'",
|
|
173
|
+
messages: {
|
|
174
|
+
default: paramMessage `Prefer using 'displayName' instead of 'name'`
|
|
175
|
+
},
|
|
176
|
+
create(context) {
|
|
177
|
+
return {
|
|
178
|
+
model: (model) => {
|
|
179
|
+
if (!isEntity(context.program, model) && !isComplex(context.program, model)) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
for (const property of model.properties.values()) {
|
|
183
|
+
if (property.name.toLowerCase() === "name") {
|
|
184
|
+
context.reportDiagnostic({
|
|
185
|
+
target: property,
|
|
186
|
+
format: {
|
|
187
|
+
property: property.name
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
67
193
|
};
|
|
68
194
|
},
|
|
69
195
|
});
|
|
196
|
+
function isPropertyParentModelAndPropertyTypeEntity(program, property) {
|
|
197
|
+
const propertyType = getPropertyType(program, property);
|
|
198
|
+
return !isTypeDefinedInExternalLibrary(program, property) &&
|
|
199
|
+
property.model &&
|
|
200
|
+
propertyType.kind === "Model" &&
|
|
201
|
+
isEntity(program, property.model) &&
|
|
202
|
+
isEntity(program, propertyType);
|
|
203
|
+
}
|
|
204
|
+
function reportModelPropertyDiagnostics(program, property, propertyTypeName) {
|
|
205
|
+
const propertyType = getPropertyType(program, property);
|
|
206
|
+
reportDiagnostic(program, {
|
|
207
|
+
code: "element-missing-dependencies",
|
|
208
|
+
target: property,
|
|
209
|
+
messageId: "propertyMissingContainsOrReferences",
|
|
210
|
+
format: {
|
|
211
|
+
property: property.name,
|
|
212
|
+
entity: propertyTypeName !== null && propertyTypeName !== void 0 ? propertyTypeName : propertyType.name,
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
function getPropertyType(program, property) {
|
|
217
|
+
let propertyType = property.type;
|
|
218
|
+
if (propertyType.kind === "Model" && isArrayModelType(program, propertyType)) {
|
|
219
|
+
propertyType = propertyType.indexer.value;
|
|
220
|
+
}
|
|
221
|
+
return propertyType;
|
|
222
|
+
}
|
|
70
223
|
//# sourceMappingURL=entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../src/rules/entity.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../src/rules/entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,EAAE,wBAAwB,EAC9C,uBAAuB,EAAiE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAC,MAAM,oBAAoB,CAAC;AACjK,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,cAAc,E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cAAhB,gBAAgB,GAAK,YAAsB,CAAC,IAAI;SACzD;KACF,CAAC,CAAC;AACL,CAAC;AAED,SAAS,eAAe,CAAC,OAAgB,EAAE,QAAuB;IAChE,IAAI,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC;IACjC,IAAI,YAAY,CAAC,IAAI,KAAK,OAAO,IAAI,gBAAgB,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE,CAAC;QAC7E,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC;IAC5C,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
package/dist/src/rules/enum.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { Program } from "@typespec/compiler";
|
|
2
|
+
export declare const useEvolvableEnumRule: import("@typespec/compiler").LinterRuleDefinition<"use-evolvable-enum", {
|
|
3
|
+
readonly default: import("@typespec/compiler").CallableMessage<["enum"]>;
|
|
4
|
+
}>;
|
|
5
|
+
export declare function validateEnumMemberUnknownFutureValueShouldNotHaveDocString(program: Program): void;
|
|
2
6
|
//# sourceMappingURL=enum.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../src/rules/enum.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../../src/rules/enum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA8D,MAAM,oBAAoB,CAAC;AAKzG,eAAO,MAAM,oBAAoB;;EA2B/B,CAAC;AAEH,wBAAgB,0DAA0D,CAAC,OAAO,EAAE,OAAO,QAyB1F"}
|
package/dist/src/rules/enum.js
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
import { createRule } from "@typespec/
|
|
2
|
-
import { reportDiagnostic } from "../lib.js";
|
|
1
|
+
import { createRule, getDoc, navigateTypesInNamespace, paramMessage } from "@typespec/compiler";
|
|
3
2
|
import { isExcludedCoreType } from "../utils.js";
|
|
3
|
+
import { GetDeclaredNamespaces } from "../entities/namespace.js";
|
|
4
|
+
import { reportDiagnostic } from "../lib.js";
|
|
4
5
|
export const useEvolvableEnumRule = createRule({
|
|
5
6
|
name: "use-evolvable-enum",
|
|
6
|
-
|
|
7
|
+
severity: "warning",
|
|
8
|
+
description: "Enforce evolvable enums",
|
|
9
|
+
messages: {
|
|
10
|
+
default: paramMessage `Enumeration '${"enum"}' should have a member named unknownFutureValue for future extensibility.`,
|
|
11
|
+
},
|
|
12
|
+
create(context) {
|
|
7
13
|
return {
|
|
8
14
|
enum: (enumType) => {
|
|
9
|
-
if (isExcludedCoreType(program, enumType)) {
|
|
15
|
+
if (isExcludedCoreType(context.program, enumType)) {
|
|
10
16
|
return;
|
|
11
17
|
}
|
|
12
18
|
if (enumType.members.has("unknownFutureValue")) {
|
|
13
19
|
return;
|
|
14
20
|
}
|
|
15
|
-
reportDiagnostic(
|
|
16
|
-
code: "use-evolvable-enum",
|
|
21
|
+
context.reportDiagnostic({
|
|
17
22
|
target: enumType,
|
|
18
23
|
format: {
|
|
19
24
|
enum: enumType.name,
|
|
@@ -23,4 +28,28 @@ export const useEvolvableEnumRule = createRule({
|
|
|
23
28
|
};
|
|
24
29
|
},
|
|
25
30
|
});
|
|
31
|
+
export function validateEnumMemberUnknownFutureValueShouldNotHaveDocString(program) {
|
|
32
|
+
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
33
|
+
navigateTypesInNamespace(namespace, {
|
|
34
|
+
enum: (enumType) => {
|
|
35
|
+
for (const member of enumType.members.values()) {
|
|
36
|
+
if (member.name !== "unknownFutureValue") {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
const doc = getDoc(program, member);
|
|
40
|
+
if (doc) {
|
|
41
|
+
reportDiagnostic(program, {
|
|
42
|
+
code: "decorator-invalid-use",
|
|
43
|
+
target: member,
|
|
44
|
+
messageId: "enumMemberUnknownFutureValueCannotHaveDocString",
|
|
45
|
+
format: {
|
|
46
|
+
member: member.name,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
26
55
|
//# sourceMappingURL=enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../src/rules/enum.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../src/rules/enum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,UAAU,EAAE,MAAM,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACzG,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAAC;IAC7C,IAAI,EAAE,oBAAoB;IAC1B,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,yBAAyB;IACtC,QAAQ,EAAE;QACR,OAAO,EAAE,YAAY,CAAA,gBAAgB,MAAM,2EAA2E;KACvH;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE;gBACjB,IAAI,kBAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC;oBAClD,OAAO;gBACT,CAAC;gBAED,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,CAAC;oBAC/C,OAAO;gBACT,CAAC;gBAED,OAAO,CAAC,gBAAgB,CAAC;oBACvB,MAAM,EAAE,QAAQ;oBAChB,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ,CAAC,IAAI;qBACpB;iBACF,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,MAAM,UAAU,0DAA0D,CAAC,OAAgB;IACzF,KAAK,MAAM,SAAS,IAAI,qBAAqB,CAAC,OAAO,CAAC,EAAC,CAAC;QACtD,wBAAwB,CAAC,SAAS,EAAE;YAClC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE;gBACjB,KAAK,MAAM,MAAM,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;oBAC/C,IAAI,MAAM,CAAC,IAAI,KAAK,oBAAoB,EAAE,CAAC;wBACzC,SAAS;oBACX,CAAC;oBAED,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;oBACpC,IAAI,GAAG,EAAE,CAAC;wBACR,gBAAgB,CAAC,OAAO,EAAE;4BACxB,IAAI,EAAE,uBAAuB;4BAC7B,MAAM,EAAE,MAAM;4BACd,SAAS,EAAE,iDAAiD;4BAC5D,MAAM,EAAE;gCACN,MAAM,EAAE,MAAM,CAAC,IAAI;6BACpB;yBACF,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC,CAAA;IACJ,CAAC;AAEH,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare
|
|
1
|
+
import { Program } from "@typespec/compiler";
|
|
2
|
+
export declare function validateExpandOnlyOnGetNavigationSource(program: Program): void;
|
|
3
|
+
export declare function validateExpandOnlyNavigationProperties(program: Program): void;
|
|
3
4
|
//# sourceMappingURL=expand.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expand.d.ts","sourceRoot":"","sources":["../../../src/rules/expand.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"expand.d.ts","sourceRoot":"","sources":["../../../src/rules/expand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,OAAO,EAAqD,MAAM,oBAAoB,CAAC;AAOvG,wBAAgB,uCAAuC,CAAC,OAAO,EAAE,OAAO,QA8BvE;AAED,wBAAgB,sCAAsC,CAAC,OAAO,EAAE,OAAO,QAyCtE"}
|
package/dist/src/rules/expand.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { walkPropertiesInherited } from "@typespec/compiler";
|
|
2
|
-
import { createRule } from "@typespec/lint";
|
|
1
|
+
import { navigateTypesInNamespace, walkPropertiesInherited } from "@typespec/compiler";
|
|
3
2
|
import { getOperationVerb } from "@typespec/http";
|
|
4
|
-
import { getExpand,
|
|
3
|
+
import { getExpand, isDelta, isExpand } from "../index.js";
|
|
5
4
|
import { reportDiagnostic } from "../lib.js";
|
|
6
|
-
import { getNavigationSourceType } from "../utils.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
import { getNavigationSourceType, isNavigationProperty } from "../utils.js";
|
|
6
|
+
import { GetDeclaredNamespaces } from "../entities/namespace.js";
|
|
7
|
+
export function validateExpandOnlyOnGetNavigationSource(program) {
|
|
8
|
+
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
9
|
+
navigateTypesInNamespace(namespace, {
|
|
11
10
|
operation: (operation) => {
|
|
12
11
|
if (!isExpand(program, operation)) {
|
|
13
12
|
return;
|
|
@@ -17,6 +16,9 @@ export const expandOnlyOnGetNavigationSourceRule = createRule({
|
|
|
17
16
|
return;
|
|
18
17
|
}
|
|
19
18
|
}
|
|
19
|
+
if (isDelta(program, operation) && operation.name === "delta") {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
20
22
|
reportDiagnostic(program, {
|
|
21
23
|
code: "decorator-invalid-use",
|
|
22
24
|
target: operation,
|
|
@@ -27,13 +29,13 @@ export const expandOnlyOnGetNavigationSourceRule = createRule({
|
|
|
27
29
|
},
|
|
28
30
|
});
|
|
29
31
|
},
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
;
|
|
36
|
+
export function validateExpandOnlyNavigationProperties(program) {
|
|
37
|
+
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
38
|
+
navigateTypesInNamespace(namespace, {
|
|
37
39
|
operation: (operation) => {
|
|
38
40
|
const expanded = getExpand(program, operation);
|
|
39
41
|
if (!expanded.length) {
|
|
@@ -45,9 +47,11 @@ export const expandOnlyNavigationPropertiesRule = createRule({
|
|
|
45
47
|
}
|
|
46
48
|
const modelType = returnType.indexer ? returnType.indexer.value : returnType;
|
|
47
49
|
const navigationProperties = [...walkPropertiesInherited(modelType)]
|
|
48
|
-
.filter((property) =>
|
|
50
|
+
.filter((property) => isNavigationProperty(program, property))
|
|
49
51
|
.map((property) => property.name);
|
|
50
|
-
const invalidExpansions = expanded.filter((property) =>
|
|
52
|
+
const invalidExpansions = expanded.filter((property) => {
|
|
53
|
+
return !navigationProperties.includes(property) && property !== "$value";
|
|
54
|
+
});
|
|
51
55
|
if (!invalidExpansions.length) {
|
|
52
56
|
return;
|
|
53
57
|
}
|
|
@@ -61,7 +65,8 @@ export const expandOnlyNavigationPropertiesRule = createRule({
|
|
|
61
65
|
},
|
|
62
66
|
});
|
|
63
67
|
},
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
;
|
|
67
72
|
//# sourceMappingURL=expand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expand.js","sourceRoot":"","sources":["../../../src/rules/expand.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"expand.js","sourceRoot":"","sources":["../../../src/rules/expand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AACvG,OAAO,EAAE,gBAA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AC;qBACzC;iBACF,CAAC,CAAC;YACL,CAAC;SACF,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAAA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extends-on-same-type.d.ts","sourceRoot":"","sources":["../../../src/rules/extends-on-same-type.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extends-on-same-type.d.ts","sourceRoot":"","sources":["../../../src/rules/extends-on-same-type.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAA4B,MAAM,oBAAoB,CAAC;AAGvE,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,QAkCzD"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createRule } from "@typespec/lint";
|
|
2
1
|
import { reportDiagnostic } from "../lib.js";
|
|
3
2
|
import { isComplex, isEntity } from "../index.js";
|
|
4
3
|
import { isExcludedCoreType } from "../utils.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { navigateTypesInNamespace } from "@typespec/compiler";
|
|
5
|
+
import { GetDeclaredNamespaces } from "../entities/namespace.js";
|
|
6
|
+
export function validateExtendsOnSameType(program) {
|
|
7
|
+
for (const namespace of GetDeclaredNamespaces(program)) {
|
|
8
|
+
navigateTypesInNamespace(namespace, {
|
|
9
9
|
model: (model) => {
|
|
10
10
|
if (!model.baseModel) {
|
|
11
11
|
return;
|
|
@@ -32,7 +32,8 @@ export const extendsOnSameTypeRule = createRule({
|
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
;
|
|
38
39
|
//# sourceMappingURL=extends-on-same-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extends-on-same-type.js","sourceRoot":"","sources":["../../../src/rules/extends-on-same-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"extends-on-same-type.js","sourceRoot":"","sources":["../../../src/rules/extends-on-same-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAW,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,MAAM,UAAU,yBAAyB,CAAC,OAAgB;IACxD,KAAK,MAAM,SAAS,IAAI,qBAAqB,CAAC,OAAO,CAAC,EAAE,CAAC;QACvD,wBAAwB,CAAC,SAAS,EAAE;YAClC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;gBACf,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;oBACrB,OAAO;gBACT,CAAC;gBAED,IAAI,kBAAkB,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC;oBACvC,OAAO;gBACT,CAAC;gBAED,IAAI,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;oBACpE,gBAAgB,CAAC,OAAO,EAAE;wBACxB,IAAI,EAAE,qBAAqB;wBAC3B,MAAM,EAAE,KAAK;wBACb,MAAM,EAAE;4BACN,IAAI,EAAE,SAAS;yBAChB;qBACF,CAAC,CAAC;gBACL,CAAC;gBAED,IAAI,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;oBACtE,gBAAgB,CAAC,OAAO,EAAE;wBACxB,IAAI,EAAE,qBAAqB;wBAC3B,MAAM,EAAE,KAAK;wBACb,MAAM,EAAE;4BACN,IAAI,EAAE,UAAU;yBACjB;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAAA,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export declare
|
|
3
|
-
export declare
|
|
1
|
+
import { Program } from "@typespec/compiler";
|
|
2
|
+
export declare function validateFilterAppliesToGetOperationsThatReturnCollections(program: Program): void;
|
|
3
|
+
export declare function validateFilterAllPropertiesNotationIsNotUsedTogetherWithOtherProperties(program: Program): void;
|
|
4
|
+
export declare function validateFilterOnlyAppliesToModelProperties(program: Program): void;
|
|
5
|
+
export declare function validateFilterPropertiesMustNotBeEmpty(program: Program): void;
|
|
6
|
+
export declare function validateFilterOnlyAppliesToSimpleModelProperties(program: Program): void;
|
|
4
7
|
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/rules/filter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/rules/filter.ts"],"names":[],"mappings":"AAIA,OAAO,EAAS,OAAO,EAAsE,MAAM,oBAAoB,CAAC;AAGxH,wBAAgB,yDAAyD,CAAC,OAAO,EAAE,OAAO,QAgCzF;AAGD,wBAAgB,uEAAuE,CAAC,OAAO,EAAE,OAAO,QA4BvG;AAED,wBAAgB,0CAA0C,CAAC,OAAO,EAAE,OAAO,QAwC1E;AAED,wBAAgB,sCAAsC,CAAC,OAAO,EAAE,OAAO,QA6BtE;AAED,wBAAgB,gDAAgD,CAAC,OAAO,EAAE,OAAO,QAoChF"}
|