@microsoft/typespec-msgraph 0.0.1-Preview.1 → 0.0.1-Preview.11
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.d.ts +3 -4
- package/dist/src/components/acceptable-media-types-annotation.d.ts.map +1 -1
- package/dist/src/components/acceptable-media-types-annotation.js +2 -6
- package/dist/src/components/acceptable-media-types-annotation.js.map +1 -1
- package/dist/src/components/alternate-keys-annotation.d.ts +4 -4
- package/dist/src/components/alternate-keys-annotation.d.ts.map +1 -1
- package/dist/src/components/alternate-keys-annotation.js +8 -16
- package/dist/src/components/alternate-keys-annotation.js.map +1 -1
- package/dist/src/components/annotations.d.ts +12 -0
- package/dist/src/components/annotations.d.ts.map +1 -0
- package/dist/src/components/annotations.js +63 -0
- package/dist/src/components/annotations.js.map +1 -0
- package/dist/src/components/common-elements.d.ts +15 -73
- package/dist/src/components/common-elements.d.ts.map +1 -1
- package/dist/src/components/common-elements.js +12 -26
- package/dist/src/components/common-elements.js.map +1 -1
- package/dist/src/components/computed-annotation.d.ts +3 -4
- package/dist/src/components/computed-annotation.d.ts.map +1 -1
- package/dist/src/components/computed-annotation.js +4 -10
- package/dist/src/components/computed-annotation.js.map +1 -1
- package/dist/src/components/count-restrictions-annotation.d.ts +3 -4
- package/dist/src/components/count-restrictions-annotation.d.ts.map +1 -1
- package/dist/src/components/count-restrictions-annotation.js +4 -13
- package/dist/src/components/count-restrictions-annotation.js.map +1 -1
- package/dist/src/components/description-annotation.d.ts +3 -4
- package/dist/src/components/description-annotation.d.ts.map +1 -1
- package/dist/src/components/description-annotation.js +5 -11
- package/dist/src/components/description-annotation.js.map +1 -1
- package/dist/src/components/entity-container-element.d.ts +21 -0
- package/dist/src/components/entity-container-element.d.ts.map +1 -0
- package/dist/src/components/entity-container-element.js +22 -0
- package/dist/src/components/entity-container-element.js.map +1 -0
- package/dist/src/components/enum-type-element.d.ts +6 -0
- package/dist/src/components/enum-type-element.d.ts.map +1 -0
- package/dist/src/components/enum-type-element.js +17 -0
- package/dist/src/components/enum-type-element.js.map +1 -0
- package/dist/src/components/expand-restrictions-annotation.d.ts +4 -5
- package/dist/src/components/expand-restrictions-annotation.d.ts.map +1 -1
- package/dist/src/components/expand-restrictions-annotation.js +9 -30
- package/dist/src/components/expand-restrictions-annotation.js.map +1 -1
- package/dist/src/components/filter-restrictions-annotation.d.ts +6 -0
- package/dist/src/components/filter-restrictions-annotation.d.ts.map +1 -0
- package/dist/src/components/filter-restrictions-annotation.js +10 -0
- package/dist/src/components/filter-restrictions-annotation.js.map +1 -0
- package/dist/src/components/immutable-annotation.d.ts +5 -0
- package/dist/src/components/immutable-annotation.d.ts.map +1 -0
- package/dist/src/components/immutable-annotation.js +6 -0
- package/dist/src/components/immutable-annotation.js.map +1 -0
- package/dist/src/components/index.d.ts +2 -14
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +9 -14
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/components/insert-restrictions-annotation.d.ts +6 -0
- package/dist/src/components/insert-restrictions-annotation.d.ts.map +1 -0
- package/dist/src/components/insert-restrictions-annotation.js +10 -0
- package/dist/src/components/insert-restrictions-annotation.js.map +1 -0
- package/dist/src/components/operation-element.d.ts +6 -0
- package/dist/src/components/operation-element.d.ts.map +1 -0
- package/dist/src/components/operation-element.js +70 -0
- package/dist/src/components/operation-element.js.map +1 -0
- package/dist/src/components/permissions-annotation.d.ts +3 -4
- package/dist/src/components/permissions-annotation.d.ts.map +1 -1
- package/dist/src/components/permissions-annotation.js +2 -10
- package/dist/src/components/permissions-annotation.js.map +1 -1
- package/dist/src/components/property-element.d.ts +4 -4
- package/dist/src/components/property-element.d.ts.map +1 -1
- package/dist/src/components/property-element.js +16 -32
- package/dist/src/components/property-element.js.map +1 -1
- package/dist/src/components/revisions-annotation.d.ts +4 -5
- package/dist/src/components/revisions-annotation.d.ts.map +1 -1
- package/dist/src/components/revisions-annotation.js +7 -51
- package/dist/src/components/revisions-annotation.js.map +1 -1
- package/dist/src/components/schema-element.d.ts +6 -0
- package/dist/src/components/schema-element.d.ts.map +1 -0
- package/dist/src/components/schema-element.js +42 -0
- package/dist/src/components/schema-element.js.map +1 -0
- package/dist/src/components/search-restrictions-annotation.d.ts +3 -4
- package/dist/src/components/search-restrictions-annotation.d.ts.map +1 -1
- package/dist/src/components/search-restrictions-annotation.js +4 -13
- package/dist/src/components/search-restrictions-annotation.js.map +1 -1
- package/dist/src/components/skip-supported-annotation.d.ts +3 -4
- package/dist/src/components/skip-supported-annotation.d.ts.map +1 -1
- package/dist/src/components/skip-supported-annotation.js +2 -11
- package/dist/src/components/skip-supported-annotation.js.map +1 -1
- package/dist/src/components/sort-restrictions-annotation.d.ts +4 -5
- package/dist/src/components/sort-restrictions-annotation.d.ts.map +1 -1
- package/dist/src/components/sort-restrictions-annotation.js +9 -30
- package/dist/src/components/sort-restrictions-annotation.js.map +1 -1
- package/dist/src/components/structured-type-element.d.ts +7 -4
- package/dist/src/components/structured-type-element.d.ts.map +1 -1
- package/dist/src/components/structured-type-element.js +24 -66
- package/dist/src/components/structured-type-element.js.map +1 -1
- package/dist/src/components/top-supported-annotation.d.ts +3 -4
- package/dist/src/components/top-supported-annotation.d.ts.map +1 -1
- package/dist/src/components/top-supported-annotation.js +3 -10
- package/dist/src/components/top-supported-annotation.js.map +1 -1
- package/dist/src/components/update-restrictions-annotation.d.ts +5 -0
- package/dist/src/components/update-restrictions-annotation.d.ts.map +1 -0
- package/dist/src/components/update-restrictions-annotation.js +8 -0
- package/dist/src/components/update-restrictions-annotation.js.map +1 -0
- package/dist/src/decorators/abstract.d.ts.map +1 -1
- package/dist/src/decorators/abstract.js +0 -6
- package/dist/src/decorators/abstract.js.map +1 -1
- package/dist/src/decorators/action.d.ts +10 -0
- package/dist/src/decorators/action.d.ts.map +1 -0
- package/dist/src/decorators/action.js +16 -0
- package/dist/src/decorators/action.js.map +1 -0
- package/dist/src/decorators/{handlers/custom/additional-query-parameters.d.ts → additional-query-parameters.d.ts} +3 -1
- package/dist/src/decorators/additional-query-parameters.d.ts.map +1 -0
- package/dist/src/decorators/additional-query-parameters.js +21 -0
- package/dist/src/decorators/additional-query-parameters.js.map +1 -0
- package/dist/src/decorators/ags-attribute.d.ts +14 -0
- package/dist/src/decorators/ags-attribute.d.ts.map +1 -0
- package/dist/src/decorators/ags-attribute.js +115 -0
- package/dist/src/decorators/ags-attribute.js.map +1 -0
- package/dist/src/decorators/allowed-values.d.ts +13 -0
- package/dist/src/decorators/allowed-values.d.ts.map +1 -0
- package/dist/src/decorators/allowed-values.js +35 -0
- package/dist/src/decorators/allowed-values.js.map +1 -0
- package/dist/src/decorators/complex.d.ts.map +1 -1
- package/dist/src/decorators/complex.js +0 -6
- package/dist/src/decorators/complex.js.map +1 -1
- package/dist/src/decorators/delta-collection.d.ts +8 -0
- package/dist/src/decorators/delta-collection.d.ts.map +1 -0
- package/dist/src/decorators/delta-collection.js +12 -0
- package/dist/src/decorators/delta-collection.js.map +1 -0
- package/dist/src/decorators/entity.d.ts.map +1 -1
- package/dist/src/decorators/entity.js +0 -6
- package/dist/src/decorators/entity.js.map +1 -1
- package/dist/src/decorators/filter.d.ts +11 -0
- package/dist/src/decorators/filter.d.ts.map +1 -0
- package/dist/src/decorators/filter.js +27 -0
- package/dist/src/decorators/filter.js.map +1 -0
- package/dist/src/decorators/flags.d.ts +9 -0
- package/dist/src/decorators/flags.d.ts.map +1 -0
- package/dist/src/decorators/flags.js +13 -0
- package/dist/src/decorators/flags.js.map +1 -0
- package/dist/src/decorators/function.d.ts +10 -0
- package/dist/src/decorators/function.d.ts.map +1 -0
- package/dist/src/decorators/function.js +16 -0
- package/dist/src/decorators/function.js.map +1 -0
- package/dist/src/decorators/graph-route.d.ts +17 -0
- package/dist/src/decorators/graph-route.d.ts.map +1 -0
- package/dist/src/decorators/graph-route.js +92 -0
- package/dist/src/decorators/graph-route.js.map +1 -0
- package/dist/src/decorators/has-stream.d.ts +1 -2
- package/dist/src/decorators/has-stream.d.ts.map +1 -1
- package/dist/src/decorators/has-stream.js +1 -14
- package/dist/src/decorators/has-stream.js.map +1 -1
- package/dist/src/decorators/immutable.d.ts +8 -0
- package/dist/src/decorators/immutable.d.ts.map +1 -0
- package/dist/src/decorators/immutable.js +12 -0
- package/dist/src/decorators/immutable.js.map +1 -0
- package/dist/src/decorators/index.d.ts +20 -1
- package/dist/src/decorators/index.d.ts.map +1 -1
- package/dist/src/decorators/index.js +20 -1
- package/dist/src/decorators/index.js.map +1 -1
- package/dist/src/decorators/is-owner.d.ts +10 -0
- package/dist/src/decorators/is-owner.d.ts.map +1 -0
- package/dist/src/decorators/is-owner.js +17 -0
- package/dist/src/decorators/is-owner.js.map +1 -0
- package/dist/src/decorators/open.d.ts.map +1 -1
- package/dist/src/decorators/open.js +0 -6
- package/dist/src/decorators/open.js.map +1 -1
- package/dist/src/decorators/{routed-interfaces.d.ts → operation-parameters.d.ts} +3 -11
- package/dist/src/decorators/operation-parameters.d.ts.map +1 -0
- package/dist/src/decorators/operation-parameters.js +15 -0
- package/dist/src/decorators/operation-parameters.js.map +1 -0
- package/dist/src/decorators/paged-collection.d.ts +8 -0
- package/dist/src/decorators/paged-collection.d.ts.map +1 -0
- package/dist/src/decorators/paged-collection.js +12 -0
- package/dist/src/decorators/paged-collection.js.map +1 -0
- package/dist/src/decorators/partial.d.ts +10 -0
- package/dist/src/decorators/partial.d.ts.map +1 -0
- package/dist/src/decorators/partial.js +16 -0
- package/dist/src/decorators/partial.js.map +1 -0
- package/dist/src/decorators/private-preview.d.ts.map +1 -1
- package/dist/src/decorators/private-preview.js +0 -10
- package/dist/src/decorators/private-preview.js.map +1 -1
- package/dist/src/decorators/privileged.d.ts +9 -0
- package/dist/src/decorators/privileged.d.ts.map +1 -0
- package/dist/src/decorators/privileged.js +13 -0
- package/dist/src/decorators/privileged.js.map +1 -0
- package/dist/src/decorators/public-namespace.d.ts +10 -0
- package/dist/src/decorators/public-namespace.d.ts.map +1 -0
- package/dist/src/decorators/public-namespace.js +16 -0
- package/dist/src/decorators/public-namespace.js.map +1 -0
- package/dist/src/decorators/required-for-create.d.ts +10 -0
- package/dist/src/decorators/required-for-create.d.ts.map +1 -0
- package/dist/src/decorators/required-for-create.js +14 -0
- package/dist/src/decorators/required-for-create.js.map +1 -0
- package/dist/src/decorators/workload-name-msa.d.ts +9 -0
- package/dist/src/decorators/workload-name-msa.d.ts.map +1 -0
- package/dist/src/decorators/workload-name-msa.js +13 -0
- package/dist/src/decorators/workload-name-msa.js.map +1 -0
- package/dist/src/decorators/workload-name.d.ts +9 -0
- package/dist/src/decorators/workload-name.d.ts.map +1 -0
- package/dist/src/decorators/workload-name.js +13 -0
- package/dist/src/decorators/workload-name.js.map +1 -0
- package/dist/src/emitter.d.ts +2 -1
- package/dist/src/emitter.d.ts.map +1 -1
- package/dist/src/emitter.js +7 -3
- package/dist/src/emitter.js.map +1 -1
- package/dist/src/entities/annotations.d.ts +40 -0
- package/dist/src/entities/annotations.d.ts.map +1 -0
- package/dist/src/entities/annotations.js +139 -0
- package/dist/src/entities/annotations.js.map +1 -0
- package/dist/src/entities/entity-container.d.ts +15 -0
- package/dist/src/entities/entity-container.d.ts.map +1 -0
- package/dist/src/entities/entity-container.js +44 -0
- package/dist/src/entities/entity-container.js.map +1 -0
- package/dist/src/entities/enum.d.ts +17 -0
- package/dist/src/entities/enum.d.ts.map +1 -0
- package/dist/src/entities/enum.js +24 -0
- package/dist/src/entities/enum.js.map +1 -0
- package/dist/src/entities/model.d.ts +47 -0
- package/dist/src/entities/model.d.ts.map +1 -0
- package/dist/src/entities/model.js +104 -0
- package/dist/src/entities/model.js.map +1 -0
- package/dist/src/entities/namespace.d.ts +22 -0
- package/dist/src/entities/namespace.d.ts.map +1 -0
- package/dist/src/entities/namespace.js +84 -0
- package/dist/src/entities/namespace.js.map +1 -0
- package/dist/src/entities/operation.d.ts +28 -0
- package/dist/src/entities/operation.d.ts.map +1 -0
- package/dist/src/entities/operation.js +103 -0
- package/dist/src/entities/operation.js.map +1 -0
- package/dist/src/entities/property.d.ts +3 -0
- package/dist/src/entities/property.d.ts.map +1 -0
- package/dist/src/entities/property.js +57 -0
- package/dist/src/entities/property.js.map +1 -0
- package/dist/src/entities/revision-definition.d.ts +9 -0
- package/dist/src/entities/revision-definition.d.ts.map +1 -0
- package/dist/src/entities/revision-definition.js +42 -0
- package/dist/src/entities/revision-definition.js.map +1 -0
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +53 -2
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +25 -1
- package/dist/src/lib.js.map +1 -1
- package/dist/src/linter.d.ts.map +1 -1
- package/dist/src/linter.js +34 -25
- package/dist/src/linter.js.map +1 -1
- 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/allowed-values.d.ts +6 -0
- package/dist/src/rules/allowed-values.d.ts.map +1 -0
- package/dist/src/rules/allowed-values.js +59 -0
- package/dist/src/rules/allowed-values.js.map +1 -0
- package/dist/src/rules/collection-navigation-properties-not-nullable.d.ts +2 -0
- package/dist/src/rules/collection-navigation-properties-not-nullable.d.ts.map +1 -0
- package/dist/src/rules/collection-navigation-properties-not-nullable.js +28 -0
- package/dist/src/rules/collection-navigation-properties-not-nullable.js.map +1 -0
- package/dist/src/rules/count.d.ts.map +1 -1
- package/dist/src/rules/count.js +3 -1
- package/dist/src/rules/count.js.map +1 -1
- package/dist/src/rules/disallowed-typespec-decorators.d.ts +2 -0
- package/dist/src/rules/disallowed-typespec-decorators.d.ts.map +1 -0
- package/dist/src/rules/disallowed-typespec-decorators.js +33 -0
- package/dist/src/rules/disallowed-typespec-decorators.js.map +1 -0
- package/dist/src/rules/entity.d.ts +1 -0
- package/dist/src/rules/entity.d.ts.map +1 -1
- package/dist/src/rules/entity.js +43 -1
- package/dist/src/rules/entity.js.map +1 -1
- package/dist/src/rules/enum.d.ts +2 -0
- package/dist/src/rules/enum.d.ts.map +1 -0
- package/dist/src/rules/enum.js +26 -0
- package/dist/src/rules/enum.js.map +1 -0
- package/dist/src/rules/expand.d.ts.map +1 -1
- package/dist/src/rules/expand.js +5 -7
- package/dist/src/rules/expand.js.map +1 -1
- package/dist/src/rules/extends-on-same-type.d.ts +2 -0
- package/dist/src/rules/extends-on-same-type.d.ts.map +1 -0
- package/dist/src/rules/extends-on-same-type.js +38 -0
- package/dist/src/rules/extends-on-same-type.js.map +1 -0
- package/dist/src/rules/filter.d.ts +4 -0
- package/dist/src/rules/filter.d.ts.map +1 -0
- package/dist/src/rules/filter.js +92 -0
- package/dist/src/rules/filter.js.map +1 -0
- package/dist/src/rules/function.d.ts +2 -0
- package/dist/src/rules/function.d.ts.map +1 -0
- package/dist/src/rules/function.js +26 -0
- package/dist/src/rules/function.js.map +1 -0
- package/dist/src/rules/graph-route.d.ts +6 -0
- package/dist/src/rules/graph-route.d.ts.map +1 -0
- package/dist/src/rules/graph-route.js +97 -0
- package/dist/src/rules/graph-route.js.map +1 -0
- package/dist/src/rules/index.d.ts +13 -6
- package/dist/src/rules/index.d.ts.map +1 -1
- package/dist/src/rules/index.js +13 -161
- package/dist/src/rules/index.js.map +1 -1
- package/dist/src/rules/namespace.d.ts +3 -0
- package/dist/src/rules/namespace.d.ts.map +1 -0
- package/dist/src/rules/namespace.js +58 -0
- package/dist/src/rules/namespace.js.map +1 -0
- package/dist/src/rules/operation-inside-interface.d.ts +2 -0
- package/dist/src/rules/operation-inside-interface.d.ts.map +1 -0
- package/dist/src/rules/operation-inside-interface.js +25 -0
- package/dist/src/rules/operation-inside-interface.js.map +1 -0
- package/dist/src/rules/order-by.d.ts +1 -1
- package/dist/src/rules/order-by.d.ts.map +1 -1
- package/dist/src/rules/order-by.js +11 -10
- package/dist/src/rules/order-by.js.map +1 -1
- package/dist/src/rules/partial.d.ts +5 -0
- package/dist/src/rules/partial.d.ts.map +1 -0
- package/dist/src/rules/partial.js +35 -0
- package/dist/src/rules/partial.js.map +1 -0
- package/dist/src/rules/required-for-create.d.ts +2 -0
- package/dist/src/rules/required-for-create.d.ts.map +1 -0
- package/dist/src/rules/required-for-create.js +40 -0
- package/dist/src/rules/required-for-create.js.map +1 -0
- package/dist/src/rules/search.d.ts.map +1 -1
- package/dist/src/rules/search.js +3 -1
- package/dist/src/rules/search.js.map +1 -1
- package/dist/src/rules/skip.d.ts.map +1 -1
- package/dist/src/rules/skip.js +3 -1
- package/dist/src/rules/skip.js.map +1 -1
- package/dist/src/rules/top.d.ts.map +1 -1
- package/dist/src/rules/top.js +3 -1
- package/dist/src/rules/top.js.map +1 -1
- package/dist/src/utils.d.ts +22 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +160 -4
- package/dist/src/utils.js.map +1 -1
- package/lib/decorators.tsp +182 -39
- package/lib/deployment.tsp +18 -0
- package/lib/lib.tsp +6 -22
- package/lib/msgraph.tsp +4 -0
- package/lib/porcelain.tsp +135 -0
- package/lib/responses.tsp +82 -0
- package/lib/shared-models.tsp +75 -0
- package/package.json +31 -20
- package/dist/src/components/program-context.d.ts +0 -4
- package/dist/src/components/program-context.d.ts.map +0 -1
- package/dist/src/components/program-context.js +0 -3
- package/dist/src/components/program-context.js.map +0 -1
- package/dist/src/csdl.d.ts +0 -8
- package/dist/src/csdl.d.ts.map +0 -1
- package/dist/src/csdl.js +0 -298
- package/dist/src/csdl.js.map +0 -1
- package/dist/src/decorators/attribute-builder.d.ts +0 -2
- package/dist/src/decorators/attribute-builder.d.ts.map +0 -1
- package/dist/src/decorators/attribute-builder.js +0 -166
- package/dist/src/decorators/attribute-builder.js.map +0 -1
- package/dist/src/decorators/attributes.d.ts +0 -57
- package/dist/src/decorators/attributes.d.ts.map +0 -1
- package/dist/src/decorators/attributes.js +0 -50
- package/dist/src/decorators/attributes.js.map +0 -1
- package/dist/src/decorators/handlers/custom/additional-query-parameters.d.ts.map +0 -1
- package/dist/src/decorators/handlers/custom/additional-query-parameters.js +0 -36
- package/dist/src/decorators/handlers/custom/additional-query-parameters.js.map +0 -1
- package/dist/src/decorators/handlers/custom/ags-attribute.d.ts +0 -7
- package/dist/src/decorators/handlers/custom/ags-attribute.d.ts.map +0 -1
- package/dist/src/decorators/handlers/custom/ags-attribute.js +0 -36
- package/dist/src/decorators/handlers/custom/ags-attribute.js.map +0 -1
- package/dist/src/decorators/handlers/custom/index.d.ts +0 -3
- package/dist/src/decorators/handlers/custom/index.d.ts.map +0 -1
- package/dist/src/decorators/handlers/custom/index.js +0 -3
- package/dist/src/decorators/handlers/custom/index.js.map +0 -1
- package/dist/src/decorators/handlers/index.d.ts +0 -30
- package/dist/src/decorators/handlers/index.d.ts.map +0 -1
- package/dist/src/decorators/handlers/index.js +0 -121
- package/dist/src/decorators/handlers/index.js.map +0 -1
- package/dist/src/decorators/routed-interfaces.d.ts.map +0 -1
- package/dist/src/decorators/routed-interfaces.js +0 -43
- package/dist/src/decorators/routed-interfaces.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-route.d.ts","sourceRoot":"","sources":["../../../src/rules/graph-route.ts"],"names":[],"mappings":"AAMA;;GAEG;AAEH,eAAO,MAAM,0BAA0B,mCAYrC,CAAC;AAyBH,eAAO,MAAM,gDAAgD,mCAY3D,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { createRule } from "@typespec/lint";
|
|
2
|
+
import { reportDiagnostic } from "../lib.js";
|
|
3
|
+
import { extractParamsFromPath, getGraphRoutePaths, hasGraphRoute } from "../index.js";
|
|
4
|
+
import { getIdForType } from "../utils.js";
|
|
5
|
+
/**
|
|
6
|
+
* @graphRoute should not have a leading forward slash
|
|
7
|
+
*/
|
|
8
|
+
export const graphRouteLeadingSlashRule = createRule({
|
|
9
|
+
name: "graph-route-leading-slash",
|
|
10
|
+
create({ program }) {
|
|
11
|
+
return {
|
|
12
|
+
interface: (interface_) => {
|
|
13
|
+
applyDiagnostics(program, interface_);
|
|
14
|
+
},
|
|
15
|
+
operation: (operation) => {
|
|
16
|
+
applyDiagnostics(program, operation);
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
const applyDiagnostics = (program, target) => {
|
|
22
|
+
if (!hasGraphRoute(program, target)) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const paths = getGraphRoutePaths(program, target);
|
|
26
|
+
if (paths === undefined) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
for (const path of paths) {
|
|
30
|
+
if (path.startsWith("/")) {
|
|
31
|
+
reportDiagnostic(program, {
|
|
32
|
+
code: "decorator-invalid-use",
|
|
33
|
+
target: target,
|
|
34
|
+
messageId: "graphRoute",
|
|
35
|
+
format: {
|
|
36
|
+
decorator: "@graphRoute",
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export const operationParametersMatchGraphRouteParametersRule = createRule({
|
|
43
|
+
name: "operation-parameters-match-graph-route-parameters",
|
|
44
|
+
create({ program }) {
|
|
45
|
+
return {
|
|
46
|
+
operation: (operation) => {
|
|
47
|
+
validateParametersForGraphRoute(program, operation);
|
|
48
|
+
},
|
|
49
|
+
interface: (theInterface) => {
|
|
50
|
+
validateParametersForGraphRoute(program, theInterface);
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
function validateParametersForGraphRoute(program, target) {
|
|
56
|
+
if (!hasGraphRoute(program, target)) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const routePaths = getGraphRoutePaths(program, target);
|
|
60
|
+
if (routePaths === undefined) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const operations = [];
|
|
64
|
+
if (target.kind === "Operation") {
|
|
65
|
+
operations.push(target);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
target.operations.forEach((operation) => operations.push(operation));
|
|
69
|
+
}
|
|
70
|
+
for (const operation of operations) {
|
|
71
|
+
if (isOperationUsingPorcelainSyntax(program, operation)) {
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
if (operation.parameters.properties.has("graphRouteParams")) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
for (const path of routePaths) {
|
|
78
|
+
const graphRouteParameters = extractParamsFromPath(path);
|
|
79
|
+
const missingParameters = graphRouteParameters.filter((param) => !operation.parameters.properties.has(param));
|
|
80
|
+
if (missingParameters.length) {
|
|
81
|
+
reportDiagnostic(program, {
|
|
82
|
+
code: "element-missing-dependencies",
|
|
83
|
+
target: operation,
|
|
84
|
+
messageId: "operationParameterMismatch",
|
|
85
|
+
format: {
|
|
86
|
+
operation: getIdForType(program, operation),
|
|
87
|
+
parameters: missingParameters.join(", "),
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function isOperationUsingPorcelainSyntax(program, operation) {
|
|
95
|
+
return operation.sourceOperation ? isOperationUsingPorcelainSyntax(program, operation.sourceOperation) : getIdForType(program, operation) === "MsGraph.Foundations.Operation";
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=graph-route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-route.js","sourceRoot":"","sources":["../../../src/rules/graph-route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEvF,OAAO,EAAE,YAAY,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AAS;oBACjB,SAAS,EAAE,4BAA4B;oBACvC,MAAM,EAAE;wBACN,SAAS,EAAE,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC;wBAC3C,UAAU,EAAE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;qBACzC;iBACF,CAAC,CAAC;aACJ;SACF;KACF;AACH,CAAC;AAED,SAAS,+BAA+B,CAAC,OAAgB,EAAE,SAAoB;IAC7E,OAAO,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,+BAA+B,CAAC,OAAO,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC,KAAK,+BAA+B,CAAC;AAChL,CAAC"}
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
export * from "./abstract.js";
|
|
2
2
|
export * from "./alternate-key.js";
|
|
3
|
+
export * from "./collection-navigation-properties-not-nullable.js";
|
|
3
4
|
export * from "./computed.js";
|
|
4
5
|
export * from "./contains.js";
|
|
5
6
|
export * from "./count.js";
|
|
7
|
+
export * from "./disallowed-typespec-decorators.js";
|
|
6
8
|
export * from "./entity.js";
|
|
9
|
+
export * from "./enum.js";
|
|
7
10
|
export * from "./expand.js";
|
|
11
|
+
export * from "./extends-on-same-type.js";
|
|
12
|
+
export * from "./filter.js";
|
|
13
|
+
export * from "./function.js";
|
|
14
|
+
export * from "./graph-route.js";
|
|
8
15
|
export * from "./has-stream.js";
|
|
16
|
+
export * from "./namespace.js";
|
|
9
17
|
export * from "./open.js";
|
|
18
|
+
export * from "./operation-inside-interface.js";
|
|
10
19
|
export * from "./order-by.js";
|
|
11
20
|
export * from "./references.js";
|
|
21
|
+
export * from "./required-for-create.js";
|
|
12
22
|
export * from "./search.js";
|
|
13
23
|
export * from "./skip.js";
|
|
14
24
|
export * from "./top.js";
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export declare const voidFunctionRule: import("@typespec/lint").LintRule;
|
|
19
|
-
export declare const disallowedTypeSpecDecoratorsRule: import("@typespec/lint").LintRule;
|
|
20
|
-
export declare const useEvolvableEnumRule: import("@typespec/lint").LintRule;
|
|
25
|
+
export * from "./allowed-values.js";
|
|
26
|
+
export * from "./graph-route.js";
|
|
27
|
+
export * from "./partial.js";
|
|
21
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rules/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rules/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,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"}
|
package/dist/src/rules/index.js
CHANGED
|
@@ -1,176 +1,28 @@
|
|
|
1
|
-
import { isKey, isVoidType } from "@typespec/compiler";
|
|
2
|
-
import { createRule } from "@typespec/lint";
|
|
3
|
-
import { isComplex, isEntity, isFunction } from "../decorators/index.js";
|
|
4
|
-
import { reportDiagnostic } from "../lib.js";
|
|
5
|
-
import { isExcludedCoreType, isTypeNullable } from "../utils.js";
|
|
6
1
|
export * from "./abstract.js";
|
|
7
2
|
export * from "./alternate-key.js";
|
|
3
|
+
export * from "./collection-navigation-properties-not-nullable.js";
|
|
8
4
|
export * from "./computed.js";
|
|
9
5
|
export * from "./contains.js";
|
|
10
6
|
export * from "./count.js";
|
|
7
|
+
export * from "./disallowed-typespec-decorators.js";
|
|
11
8
|
export * from "./entity.js";
|
|
9
|
+
export * from "./enum.js";
|
|
12
10
|
export * from "./expand.js";
|
|
11
|
+
export * from "./extends-on-same-type.js";
|
|
12
|
+
export * from "./filter.js";
|
|
13
|
+
export * from "./function.js";
|
|
14
|
+
export * from "./graph-route.js";
|
|
13
15
|
export * from "./has-stream.js";
|
|
16
|
+
export * from "./namespace.js";
|
|
14
17
|
export * from "./open.js";
|
|
18
|
+
export * from "./operation-inside-interface.js";
|
|
15
19
|
export * from "./order-by.js";
|
|
16
20
|
export * from "./references.js";
|
|
21
|
+
export * from "./required-for-create.js";
|
|
17
22
|
export * from "./search.js";
|
|
18
23
|
export * from "./skip.js";
|
|
19
24
|
export * from "./top.js";
|
|
20
|
-
export
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
model: (model) => {
|
|
25
|
-
if (!model.baseModel) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (isEntity(program, model) && !isEntity(program, model.baseModel)) {
|
|
29
|
-
reportDiagnostic(program, {
|
|
30
|
-
code: "extends-invalid-use",
|
|
31
|
-
target: model,
|
|
32
|
-
format: {
|
|
33
|
-
type: "@entity",
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
if (isComplex(program, model) && !isComplex(program, model.baseModel)) {
|
|
38
|
-
reportDiagnostic(program, {
|
|
39
|
-
code: "extends-invalid-use",
|
|
40
|
-
target: model,
|
|
41
|
-
format: {
|
|
42
|
-
type: "@complex",
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
export const keyOnlyOnEntityNonNullablePrimitivePropertyRule = createRule({
|
|
51
|
-
name: "key-only-on-entity-non-nullable-primitive-property",
|
|
52
|
-
create({ program }) {
|
|
53
|
-
return {
|
|
54
|
-
modelProperty: (property) => {
|
|
55
|
-
if (!property.model || !isKey(program, property)) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
if (!isEntity(program, property.model)) {
|
|
59
|
-
reportDiagnostic(program, {
|
|
60
|
-
code: "decorator-missing-dependencies",
|
|
61
|
-
target: property,
|
|
62
|
-
format: {
|
|
63
|
-
decorator: "@key",
|
|
64
|
-
required: "@entity",
|
|
65
|
-
location: "entity model",
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (isTypeNullable(program, property.type) ||
|
|
71
|
-
property.type.kind !== "Scalar" ||
|
|
72
|
-
property.name === "Array") {
|
|
73
|
-
reportDiagnostic(program, {
|
|
74
|
-
code: "decorator-invalid-use",
|
|
75
|
-
target: property,
|
|
76
|
-
messageId: "key",
|
|
77
|
-
format: {},
|
|
78
|
-
});
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
},
|
|
84
|
-
});
|
|
85
|
-
export const operationInsideInterfaceRule = createRule({
|
|
86
|
-
name: "operation-inside-interface",
|
|
87
|
-
create({ program }) {
|
|
88
|
-
return {
|
|
89
|
-
operation: (operation) => {
|
|
90
|
-
if (operation.interface) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
reportDiagnostic(program, {
|
|
94
|
-
code: "element-missing-dependencies",
|
|
95
|
-
target: operation,
|
|
96
|
-
messageId: "operation",
|
|
97
|
-
format: {},
|
|
98
|
-
});
|
|
99
|
-
},
|
|
100
|
-
};
|
|
101
|
-
},
|
|
102
|
-
});
|
|
103
|
-
export const voidFunctionRule = createRule({
|
|
104
|
-
name: "void-function",
|
|
105
|
-
create({ program }) {
|
|
106
|
-
return {
|
|
107
|
-
operation: (operation) => {
|
|
108
|
-
if (!isFunction(program, operation)) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
if (!isVoidType(operation.returnType)) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
reportDiagnostic(program, {
|
|
115
|
-
code: "decorator-missing-dependencies",
|
|
116
|
-
target: operation,
|
|
117
|
-
messageId: "function",
|
|
118
|
-
format: {},
|
|
119
|
-
});
|
|
120
|
-
},
|
|
121
|
-
};
|
|
122
|
-
},
|
|
123
|
-
});
|
|
124
|
-
export const disallowedTypeSpecDecoratorsRule = createRule({
|
|
125
|
-
name: "disallowed-typespec-decorators",
|
|
126
|
-
create({ program }) {
|
|
127
|
-
return {
|
|
128
|
-
decorator: (decorator) => {
|
|
129
|
-
const denyList = [
|
|
130
|
-
"@friendlyName",
|
|
131
|
-
"@secret",
|
|
132
|
-
"@summary",
|
|
133
|
-
"@tag",
|
|
134
|
-
"@visibility",
|
|
135
|
-
"@withVisibility",
|
|
136
|
-
"@withUpdateableProperties",
|
|
137
|
-
"@withDefaultKeyVisibility",
|
|
138
|
-
];
|
|
139
|
-
if (denyList.indexOf(decorator.name) < 0) {
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
reportDiagnostic(program, {
|
|
143
|
-
code: "decorator-invalid-use",
|
|
144
|
-
target: decorator.target,
|
|
145
|
-
messageId: "disallowedTypeSpecDecorators",
|
|
146
|
-
format: {
|
|
147
|
-
decorator: decorator.name,
|
|
148
|
-
},
|
|
149
|
-
});
|
|
150
|
-
},
|
|
151
|
-
};
|
|
152
|
-
},
|
|
153
|
-
});
|
|
154
|
-
export const useEvolvableEnumRule = createRule({
|
|
155
|
-
name: "use-evolvable-enum",
|
|
156
|
-
create({ program }) {
|
|
157
|
-
return {
|
|
158
|
-
enum: (enumType) => {
|
|
159
|
-
if (isExcludedCoreType(program, enumType)) {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
if (enumType.members.has("unknownFutureValue")) {
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
reportDiagnostic(program, {
|
|
166
|
-
code: "use-evolvable-enum",
|
|
167
|
-
target: enumType,
|
|
168
|
-
format: {
|
|
169
|
-
enum: enumType.name,
|
|
170
|
-
},
|
|
171
|
-
});
|
|
172
|
-
},
|
|
173
|
-
};
|
|
174
|
-
},
|
|
175
|
-
});
|
|
25
|
+
export * from "./allowed-values.js";
|
|
26
|
+
export * from "./graph-route.js";
|
|
27
|
+
export * from "./partial.js";
|
|
176
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rules/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rules/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespace.d.ts","sourceRoot":"","sources":["../../../src/rules/namespace.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,uBAAuB,mCA2BlC,CAAC;AAEH,eAAO,MAAM,8BAA8B,mCA6BzC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { createRule } from "@typespec/lint";
|
|
2
|
+
import { reportDiagnostic } from "../lib.js";
|
|
3
|
+
import { getPublicNamespaceName, hasPublicNamespace } from "../index.js";
|
|
4
|
+
import { getNamespaceFullName } from "@typespec/compiler";
|
|
5
|
+
export const namespaceIsRequiredRule = createRule({
|
|
6
|
+
name: "namespace-is-required",
|
|
7
|
+
create({ program }) {
|
|
8
|
+
return {
|
|
9
|
+
model: (model) => {
|
|
10
|
+
if (model.namespace && model.namespace.name) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
while (model.baseModel) {
|
|
14
|
+
model = model.baseModel;
|
|
15
|
+
if (model.namespace && model.namespace.name) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
reportDiagnostic(program, {
|
|
20
|
+
code: "element-missing-dependencies",
|
|
21
|
+
target: model,
|
|
22
|
+
messageId: "modelMissingNamespace",
|
|
23
|
+
format: {
|
|
24
|
+
model: model.name,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
export const invalidPublicNamespaceNameRule = createRule({
|
|
32
|
+
name: "invalid-public-namespace-name",
|
|
33
|
+
create({ program }) {
|
|
34
|
+
return {
|
|
35
|
+
namespace: (namespace) => {
|
|
36
|
+
if (!hasPublicNamespace(program, namespace)) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
// publicNamespace name should either be "microsoft.graph"
|
|
40
|
+
// or match the pattern "microsoft.graph.<string_token>"
|
|
41
|
+
const namespaceRegex = /microsoft\.graph\.[\w]+/;
|
|
42
|
+
const publicNamespaceName = getPublicNamespaceName(program, namespace);
|
|
43
|
+
if (publicNamespaceName === "microsoft.graph" || namespaceRegex.test(publicNamespaceName)) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
reportDiagnostic(program, {
|
|
47
|
+
code: "decorator-invalid-use",
|
|
48
|
+
target: namespace,
|
|
49
|
+
messageId: "invalidPublicNamespaceName",
|
|
50
|
+
format: {
|
|
51
|
+
namespace: getNamespaceFullName(namespace),
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=namespace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespace.js","sourceRoot":"","sources":["../../../src/rules/namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC;IAChD,IAAI,EAAE,uBAAuB;IAC7B,MAAM,CAAC,EAAE,OAAO,EAAE;QAChB,OAAO;YACL,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;gBACf,IAAI,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE;oBAC3C,OAAO;iBACR;gBAED,OAAO,KAAK,CAAC,SAAS,EAAE;oBACtB,K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interface.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,4BAA4B,mCAsBvC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { createRule } from "@typespec/lint";
|
|
2
|
+
import { reportDiagnostic } from "../lib.js";
|
|
3
|
+
import { isExcludedCoreType } from "../utils.js";
|
|
4
|
+
export const operationInsideInterfaceRule = createRule({
|
|
5
|
+
name: "operation-inside-interface",
|
|
6
|
+
create({ program }) {
|
|
7
|
+
return {
|
|
8
|
+
operation: (operation) => {
|
|
9
|
+
if (operation.interface) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (isExcludedCoreType(program, operation)) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
reportDiagnostic(program, {
|
|
16
|
+
code: "element-missing-dependencies",
|
|
17
|
+
target: operation,
|
|
18
|
+
messageId: "operation",
|
|
19
|
+
format: {},
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=operation-inside-interface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-inside-interface.js","sourceRoot":"","sources":["../../../src/rules/operation-inside-interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,CAAC,MAAM,4BAA4B,GAAG,UAAU,CAAC;IACrD,IAAI,EAAE,4BAA4B;IAClC,MAAM,CAAC,EAAE,OAAO,EAAE;QAChB,OAAO;YACL,SAAS,EAAE,CAAC,SAAS,EAAE,EAAE;gBACvB,IAAI,SAAS,CAAC,SAAS,EAAE;oBACvB,OAAO;iBACR;gBAED,IAAI,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE;oBAC1C,OAAO;iBACR;gBAED,gBAAgB,CAAC,OAAO,EAAE;oBACxB,IAAI,EAAE,8BAA8B;oBACpC,MAAM,EAAE,SAAS;oBACjB,SAAS,EAAE,WAAW;oBACtB,MAAM,EAAE,EAAE;iBACX,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const orderByAppliesToGetOperationsThatReturnCollectionsRule: import("@typespec/lint").LintRule;
|
|
2
2
|
export declare const orderByOnlyNonNavigationPropertiesRule: import("@typespec/lint").LintRule;
|
|
3
3
|
//# sourceMappingURL=order-by.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-by.d.ts","sourceRoot":"","sources":["../../../src/rules/order-by.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"order-by.d.ts","sourceRoot":"","sources":["../../../src/rules/order-by.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,sDAAsD,mCA6BjE,CAAC;AAEH,eAAO,MAAM,sCAAsC,mCAwCjD,CAAC"}
|
|
@@ -2,21 +2,23 @@ import { walkPropertiesInherited } from "@typespec/compiler";
|
|
|
2
2
|
import { createRule } from "@typespec/lint";
|
|
3
3
|
import { getOperationVerb } from "@typespec/http";
|
|
4
4
|
import { getOrderBy, isContains, isOrderBy, isReferences } from "../index.js";
|
|
5
|
+
import { isTypeCollection } from "../utils.js";
|
|
5
6
|
import { reportDiagnostic } from "../lib.js";
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
import { getNavigationSourceType } from "../utils.js";
|
|
8
|
+
export const orderByAppliesToGetOperationsThatReturnCollectionsRule = createRule({
|
|
9
|
+
name: "order-by-applies-to-get-operations-that-return-collections",
|
|
8
10
|
create({ program }) {
|
|
9
11
|
return {
|
|
10
12
|
operation: (operation) => {
|
|
11
|
-
var _a;
|
|
12
13
|
if (!isOrderBy(program, operation)) {
|
|
13
14
|
return;
|
|
14
15
|
}
|
|
15
16
|
if (getOperationVerb(program, operation) === "get") {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const returnType = operation.returnType;
|
|
18
|
+
const isCollection = isTypeCollection(program, returnType);
|
|
19
|
+
if (isCollection) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
20
22
|
}
|
|
21
23
|
reportDiagnostic(program, {
|
|
22
24
|
code: "decorator-invalid-use",
|
|
@@ -24,7 +26,7 @@ export const orderByOnlyOnGetNavigationSourceRule = createRule({
|
|
|
24
26
|
messageId: "wrongType",
|
|
25
27
|
format: {
|
|
26
28
|
decorator: "@orderBy",
|
|
27
|
-
target: "get operation",
|
|
29
|
+
target: "get operation that returns a collection",
|
|
28
30
|
},
|
|
29
31
|
});
|
|
30
32
|
},
|
|
@@ -36,12 +38,11 @@ export const orderByOnlyNonNavigationPropertiesRule = createRule({
|
|
|
36
38
|
create({ program }) {
|
|
37
39
|
return {
|
|
38
40
|
operation: (operation) => {
|
|
39
|
-
var _a, _b;
|
|
40
41
|
const ordered = getOrderBy(program, operation);
|
|
41
42
|
if (!ordered.length) {
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
44
|
-
const returnType = (
|
|
45
|
+
const returnType = getNavigationSourceType(program, operation);
|
|
45
46
|
if (!returnType) {
|
|
46
47
|
return;
|
|
47
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-by.js","sourceRoot":"","sources":["../../../src/rules/order-by.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,gBAAgB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AAI;wBACrB,UAAU,EAAE,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;qBACvC;iBACF,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial.d.ts","sourceRoot":"","sources":["../../../src/rules/partial.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,eAAO,MAAM,4CAA4C,mCA0BvD,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createRule } from "@typespec/lint";
|
|
2
|
+
import { getPartialReferenceModel, isPartial } from "../index.js";
|
|
3
|
+
import { reportDiagnostic } from "../lib.js";
|
|
4
|
+
/**
|
|
5
|
+
* @partial applies to a model.
|
|
6
|
+
*/
|
|
7
|
+
export const extendedModelBaseShouldMatchPartialBaseModel = createRule({
|
|
8
|
+
name: "extended-model-base-should-match-partial-model-base",
|
|
9
|
+
create({ program }) {
|
|
10
|
+
return {
|
|
11
|
+
model: (model) => {
|
|
12
|
+
var _a, _b;
|
|
13
|
+
if (!isPartial(program, model)) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (!(model === null || model === void 0 ? void 0 : model.baseModel)) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const partialReference = getPartialReferenceModel(program, model);
|
|
20
|
+
if (((_a = partialReference === null || partialReference === void 0 ? void 0 : partialReference.baseModel) === null || _a === void 0 ? void 0 : _a.name) !== ((_b = model === null || model === void 0 ? void 0 : model.baseModel) === null || _b === void 0 ? void 0 : _b.name)) {
|
|
21
|
+
reportDiagnostic(program, {
|
|
22
|
+
code: "decorator-invalid-use",
|
|
23
|
+
target: model,
|
|
24
|
+
messageId: "partial",
|
|
25
|
+
format: {
|
|
26
|
+
decorator: "@partial",
|
|
27
|
+
target: "model",
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=partial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial.js","sourceRoot":"","sources":["../../../src/rules/partial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C;;GAEG;AAEH,MAAM,CAAC,MAAM,4CAA4C,GAAG,UAAU,CAAC;IACrE,IAAI,EAAE,qDAAqD;IAC3D,MAAM,CAAC,EAAE,OAAO,EAAE;QAChB,OAAO;YACL,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;;gBACf,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;oBAC9B,OAAO;iBACR;gBACD,IAAG,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,CAAA,EAAC;oBACnB,OAAO;iBACR;gBACD,MAAM,gBAAgB,GAAG,wBAAwB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;gBAClE,IAAG,CAAA,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,SAAS,0CAAE,IAAI,OAAK,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,0CAAE,IAAI,CAAA,EAAC;oBAC9D,gBAAgB,CAAC,OAAO,EAAE;wBACxB,IAAI,EAAE,uBAAuB;wBAC7B,MAAM,EAAE,KAAK;wBACb,SAAS,EAAE,SAAS;wBACpB,MAAM,EAAE;4BACN,SAAS,EAAE,UAAU;4BACrB,MAAM,EAAE,OAAO;yBAChB;qBACF,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required-for-create.d.ts","sourceRoot":"","sources":["../../../src/rules/required-for-create.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,6BAA6B,mCAsCxC,CAAC"}
|