Migrate ARM swagger linter rule to typespec linter rule
- Dominant language
- TypeScript
- Stars
- 27
- Forks
- 90
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 156
Description
| id | swagger linter | tsp lib | tsp linter PR | PR created time | PR merged time | approved by | new comment after latest commit | Status |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | [AdditionalPropertiesAndProperties](https://github.com/Azure/azure-openapi-validator/blob/main/docs/additional-properties-and-properties.md) | @azure-tools/typespec-azure-core/bad-record-type | - | - | - | - | - | Done |
| 2 | [AllProxyResourcesShouldHaveDelete](https://github.com/Azure/azure-openapi-validator/blob/main/docs/all-proxy-resources-should-have-delete.md) | @azure-tools/typespec-azure-resource-manager/no-resource-delete-operation | - | - | - | - | - | Done |
| 3 | [AllTrackedResourcesMustHaveDelete](https://github.com/Azure/azure-openapi-validator/blob/main/docs/all-tracked-resources-must-have-delete.md) | @azure-tools/typespec-azure-resource-manager/no-resource-delete-operation | - | - | - | - | - | Done |
| 4 | [ApiHost](https://github.com/Azure/azure-openapi-validator/blob/main/docs/api-host.md) | TypeSpec structural | - | - | - | - | - | Done |
| 5 | [ApiVersionParameterRequired](https://github.com/Azure/azure-openapi-validator/blob/main/docs/api-version-parameter-required.md) | @azure-tools/typespec-azure-core/operation-missing-api-version, @azure-tools/typespec-azure-resource-manager/arm-resource-operation | - | - | - | - | - | Done |
| 6 | [APIVersionPattern](https://github.com/Azure/azure-openapi-validator/blob/main/docs/api-version-pattern.md) | @azure-tools/typespec-azure-resource-manager/arm-resource-invalid-version-format | - | - | - | - | - | Done |
| 7 | [ArmResourcePropertiesBag](https://github.com/Azure/azure-openapi-validator/blob/main/docs/arm-resource-properties-bag.md) | @azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-property | - | - | - | - | - | Done |
| 8 | [ArrayMustHaveType](https://github.com/Azure/azure-openapi-validator/blob/main/docs/array-must-have-type.md) | TypeSpec structural | - | - | - | - | - | Done |
| 9 | [ArraySchemaMustHaveItems](https://github.com/Azure/azure-openapi-validator/blob/main/docs/array-schema-must-have-items.md) | TypeSpec structural | - | - | - | - | - | Done |
| 10 | [AvoidAdditionalProperties](https://github.com/Azure/azure-openapi-validator/blob/main/docs/avoid-additional-properties.md) | @azure-tools/typespec-azure-resource-manager/arm-no-record | - | - | - | - | - | Done |
| 11 | [AvoidEmptyResponseSchema](https://github.com/Azure/azure-openapi-validator/blob/main/docs/avoid-empty-response-schema.md) | TypeSpec structural | - | - | - | - | - | Done |
| 12 | [AvoidNestedProperties](https://github.com/Azure/azure-openapi-validator/blob/main/docs/avoid-nested-properties.md) | TypeSpec structural | - | - | - | - | - | Done |
| 13 | [BodyTopLevelProperties](https://github.com/Azure/azure-openapi-validator/blob/main/docs/body-top-level-properties.md) | @azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property | - | - | - | - | - | Done |
| 14 | [ControlCharactersAreNotAllowed](https://github.com/Azure/azure-openapi-validator/blob/main/docs/control-characters-not-allowed.md) | TypeSpec structural | - | - | - | - | - | Done |
| 15 | [DefinitionsPropertiesNamesCamelCase](https://github.com/Azure/azure-openapi-validator/blob/main/docs/definitions-properties-names-camel-case.md) | @azure-tools/typespec-azure-core/casing-style | - | - | - | - | - | Done |
| 16 | [DeleteResponseCodes](https://github.com/Azure/azure-openapi-validator/blob/main/docs/delete-response-codes.md) | @azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes, @azure-tools/typespec-azure-resource-manager/no-response-body | - | - | - | - | - | Done |
| 17 | [EnumMustHaveType](https://github.com/Azure/azure-openapi-validator/blob/main/docs/enum-must-have-type.md) | TypeSpec structural | - | - | - | - | - | Done |
| 18 | [EnumMustNotHaveEmptyValue](https://github.com/Azure/azure-openapi-validator/blob/main/docs/enum-must-not-have-empty-value.md) | TypeSpec structural | - | - | - | - | - | Done |
| 19 | [EnumMustRespectType](https://github.com/Azure/azure-openapi-validator/blob/main/docs/enum-must-respect-type.md) | TypeSpec structural | - | - | - | - | - | Done |
| 20 | [EnumUniqueValue](https://github.com/Azure/azure-openapi-validator/blob/main/docs/enum-unique-value.md) | TypeSpec structural | - | - | - | - | - | Done |
| 21 | [HostParametersValidation](https://github.com/Azure/azure-openapi-validator/blob/main/docs/host-parameters-validation.md) | TypeSpec structural | - | - | - | - | - | Done |
| 22 | [HttpsSupportedScheme](https://github.com/Azure/azure-openapi-validator/blob/main/docs/https-supported-scheme.md) | TypeSpec structural | - | - | - | - | - | Done |
| 23 | [IntegerTypeMustHaveFormat](https://github.com/Azure/azure-openapi-validator/blob/main/docs/integer-type-must-have-format.md) | TypeSpec structural | - | - | - | - | - | Done |
| 24 | [InvalidVerbUsed](https://github.com/Azure/azure-openapi-validator/blob/main/docs/invalid-verb-used.md) | TypeSpec structural | - | - | - | - | - | Done |
| 25 | [LroLocationHeader](https://github.com/Azure/azure-openapi-validator/blob/main/docs/lro-location-header.md) | @azure-tools/typespec-azure-resource-manager/lro-location-header | - | - | - | - | - | Done |
| 26 | [LroPostMustNotUseOriginalUriAsFinalState](https://github.com/Azure/azure-openapi-validator/blob/main/docs/lro-post-must-not-use-original-url-as-final-state.md) | TypeSpec structural | - | - | - | - | - | Done |
| 27 | [LroStatusCodesReturnTypeSchema](https://github.com/Azure/azure-openapi-validator/blob/main/docs/lro-status-codes-return-type-schema.md) | TypeSpec structural | - | - | - | - | - | Done |
| 28 | [MissingTypeObject](https://github.com/Azure/azure-openapi-validator/blob/main/docs/missing-type-object.md) | TypeSpec structural | - | - | - | - | - | Done |
| 29 | [NamePropertyDefinitionInParameter](https://github.com/Azure/azure-openapi-validator/blob/main/docs/name-property-definition-in-parameter.md) | TypeSpec structural | - | - | - | - | - | Done |
| 30 | [NextLinkPropertyMustExist](https://github.com/Azure/azure-openapi-validator/blob/main/docs/next-link-property-must-exist.md) | TypeSpec structural | - | - | - | - | - | Done |
| 31 | [NoDuplicatePathsForScopeParameter](https://github.com/Azure/azure-openapi-validator/blob/main/docs/no-duplicate-paths-for-scope-parameter.md) | TypeSpec structural | - | - | - | - | - | Done |
| 32 | [NonEmptyClientName](https://github.com/Azure/azure-openapi-validator/blob/main/docs/non-empty-client-name.md) | TypeSpec structural | - | - | - | - | - | Done |
| 33 | [Nullable](https://github.com/Azure/azure-openapi-validator/blob/main/docs/nullable.md) | @azure-tools/typespec-azure-core/no-nullable | - | - | - | - | - | Done |
| 34 | [OperationIdRequired](https://github.com/Azure/azure-openapi-validator/blob/main/docs/operation-id-required.md) | TypeSpec structural | - | - | - | - | - | Done |
| 35 | [OperationIdSingleUnderscore](https://github.com/Azure/azure-openapi-validator/blob/main/docs/one-underscore-in-operation-id.md) | TypeSpec structural | - | - | - | - | - | Done |
| 36 | [OperationsAPIImplementation](https://github.com/Azure/azure-openapi-validator/blob/main/docs/operations-api-implementation.md) | @azure-tools/typespec-azure-resource-manager/missing-operations-endpoint | - | - | - | - | - | Done |
| 37 | [OperationsApiTenantLevelOnly](https://github.com/Azure/azure-openapi-validator/blob/main/docs/operations-api-tenant-level-only.md) | TypeSpec structural | - | - | - | - | - | Done |
| 38 | [OperationSummaryOrDescription](https://github.com/Azure/azure-openapi-validator/blob/main/docs/operation-summary-or-description.md) | @azure-tools/typespec-azure-core/documentation-required | - | - | - | - | - | Done |
| 39 | [ParameterDescription](https://github.com/Azure/azure-openapi-validator/blob/main/docs/parameter-description.md) | @azure-tools/typespec-azure-core/documentation-required | - | - | - | - | - | Done |
| 40 | [ParameterDescriptionRequired](https://github.com/Azure/azure-openapi-validator/blob/main/docs/parameter-description-required.md) | @azure-tools/typespec-azure-core/documentation-required | - | - | - | - | - | Done |
| 41 | [ParameterNotDefinedInGlobalParameters](https://github.com/Azure/azure-openapi-validator/blob/main/docs/parameter-not-defined-in-global-parameters.md) | TypeSpec structural | - | - | - | - | - | Done |
| 42 | [ParameterOrder](https://github.com/Azure/azure-openapi-validator/blob/main/docs/parameter-order.md) | TypeSpec structural | - | - | - | - | - | Done |
| 43 | [ParametersOrder](https://github.com/Azure/azure-openapi-validator/blob/main/docs/parameters-order.md) | TypeSpec structural | - | - | - | - | - | Done |
| 44 | [PatchContentType](https://github.com/Azure/azure-openapi-validator/blob/main/docs/patch-content-type.md) | TypeSpec structural | - | - | - | - | - | Done |
| 45 | [PathForResourceAction](https://github.com/Azure/azure-openapi-validator/blob/main/docs/path-for-resource-action.md) | TypeSpec structural | - | - | - | - | - | Done |
| 46 | [PathResourceTypeNameCamelCase](https://github.com/Azure/azure-openapi-validator/blob/main/docs/path-resource-type-name-camel-case.md) | @azure-tools/typespec-azure-resource-manager/arm-resource-path-segment-invalid-chars | - | - | - | - | - | Done |
| 47 | [PropertiesTypeObjectNoDefinition](https://github.com/Azure/azure-openapi-validator/blob/main/docs/properties-type-object-no-definition.md) | @azure-tools/typespec-azure-resource-manager/no-empty-model | - | - | - | - | - | Done |
| 48 | [PropertyDescription](https://github.com/Azure/azure-openapi-validator/blob/main/docs/property-description.md) | @azure-tools/typespec-azure-core/documentation-required | - | - | - | - | - | Done |
| 49 | [ProvisioningStateMustBeReadOnly](https://github.com/Azure/azure-openapi-validator/blob/main/docs/provisioning-state-must-be-read-only.md) | @azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state | - | - | - | - | - | Done |
| 50 | [ProvisioningStateSpecifiedForLROPatch](https://github.com/Azure/azure-openapi-validator/blob/main/docs/lro-patch-provisioning-state-specified.md) | TypeSpec structural | - | - | - | - | - | Done |
| 51 | [ProvisioningStateSpecifiedForLROPut](https://github.com/Azure/azure-openapi-validator/blob/main/docs/lro-put-provisioning-state-specified.md) | TypeSpec structural | - | - | - | - | - | Done |
| 52 | [ProvisioningStateValidation](https://github.com/Azure/azure-openapi-validator/blob/main/docs/provisioning-state-validation.md) | @azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state | - | - | - | - | - | Done |
| 53 | [PutGetPatchResponseSchema](https://github.com/Azure/azure-openapi-validator/blob/main/docs/put-get-patch-response-schema.md) | @azure-tools/typespec-azure-resource-manager/arm-resource-operation-response | - | - | - | - | - | Done |
| 54 | [PutResponseCodes](https://github.com/Azure/azure-openapi-validator/blob/main/docs/put-response-codes.md) | @azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes | - | - | - | - | - | Done |
| 55 | [RequestSchemaForTrackedResourcesMustHaveTags](https://github.com/Azure/azure-openapi-validator/blob/main/docs/tracked-resource-schema-tags.md) | TypeSpec structural | - | - | - | - | - | Done |
| 56 | [ResourceNameRestriction](https://github.com/Azure/azure-openapi-validator/blob/main/docs/resource-name-restriction.md) | @azure-tools/typespec-azure-resource-manager/arm-resource-name-pattern | - | - | - | - | - | Done |
| 57 | [ResponseSchemaSpecifiedForSuccessStatusCode](https://github.com/Azure/azure-openapi-validator/blob/main/docs/response-schema-specified-for-success-status-code.md) | @azure-tools/typespec-azure-resource-manager/no-response-body | - | - | - | - | - | Done |
| 58 | [SchemaDescriptionOrTitle](https://github.com/Azure/azure-openapi-validator/blob/main/docs/schema-description-or-title.md) | @azure-tools/typespec-azure-core/documentation-required | - | - | - | - | - | Done |
| 59 | [SchemaNamesConvention](https://github.com/Azure/azure-openapi-validator/blob/main/docs/schema-names-convention.md) | @azure-tools/typespec-azure-core/casing-style | - | - | - | - | - | Done |
| 60 | [SubscriptionIdParameterInOperations](https://github.com/Azure/azure-openapi-validator/blob/main/docs/subscription-id-parameter-in-operations.md) | TypeSpec structural | - | - | - | - | - | Done |
| 61 | [SystemDataDefinitionsCommonTypes](https://github.com/Azure/azure-openapi-validator/blob/main/docs/system-data-definitions-common-types.md) | @azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property | - | - | - | - | - | Done |
| 62 | [TrackedExtensionResourcesAreNotAllowed](https://github.com/Azure/azure-openapi-validator/blob/main/docs/tracked-extension-resources-are-not-allowed.md) | @azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property | - | - | - | - | - | Done |
| 63 | [TrackedResourceBeyondsThirdLevel](https://github.com/Azure/azure-openapi-validator/blob/main/docs/tracked-resource-beyond-thrid-level.md) | @azure-tools/typespec-azure-resource-manager/beyond-nesting-levels | - | - | - | - | - | Done |
| 64 | [UniqueClientParameterName](https://github.com/Azure/azure-openapi-validator/blob/main/docs/unique-client-parameter-name.md) | TypeSpec structural | - | - | - | - | - | Done |
| 65 | [UniqueModelName](https://github.com/Azure/azure-openapi-validator/blob/main/docs/unique-model-name.md) | TypeSpec structural | - | - | - | - | - | Done |
| 66 | [ValidResponseCodeRequired](https://github.com/Azure/azure-openapi-validator/blob/main/docs/valid-response-code-required.md) | TypeSpec structural | - | - | - | - | - | Done |
| 67 | [XmsIdentifierValidation](https://github.com/Azure/azure-openapi-validator/blob/main/docs/xms-identifier-validation.md) | @azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers | - | - | - | - | - | Done |
| 68 | [XMSSecretInResponse](https://github.com/Azure/azure-openapi-validator/blob/main/docs/xms-secret-in-response.md) | @azure-tools/typespec-azure-resource-manager/secret-prop | - | - | - | - | - | Done |
| 69 | [EnumInsteadOfBoolean](https://github.com/Azure/azure-openapi-validator/blob/main/docs/enum-instead-of-boolean.md) | @azure-tools/typespec-azure-core | [5265](https://github.com/Azure/typespec-azure/pull/5265) | 2026-08-20 | 2026-08-31 | catalinaperalta | - | Done |
| 70 | [QueryParametersInCollectionGet](https://github.com/Azure/azure-openapi-validator/blob/main/docs/query-parameters-in-collection-get.md) | @azure-tools/typespec-azure-resource-manager | [5318](https://github.com/Azure/typespec-azure/pull/5318) | 2026-08-26 | 2026-09-02 | timotheeguerin | - | Done |
| 71 | [ValidQueryParametersForPointOperations](https://github.com/Azure/azure-openapi-validator/blob/main/docs/valid-query-parameters-for-point-operations.md) | @azure-tools/typespec-azure-resource-manager | [5273](https://github.com/Azure/typespec-azure/pull/5273) | 2026-08-20 | 2026-09-03 | catalinaperalta, timotheeguerin | - | Done |
| 72 | [ParametersInPointGet](https://github.com/Azure/azure-openapi-validator/blob/main/docs/parameters-in-point-get.md) | @azure-tools/typespec-azure-resource-manager | [5273](https://github.com/Azure/typespec-azure/pull/5273) | 2026-08-20 | 2026-09-03 | catalinaperalta, timotheeguerin | - | Done |
| 73 | [NonApplicationJsonType](https://github.com/Azure/azure-openapi-validator/blob/main/docs/non-application-json-type.md) | @azure-tools/typespec-azure-resource-manager | [5302](https://github.com/Azure/typespec-azure/pull/5302) | 2026-08-25 | 2026-09-03 | timotheeguerin | - | Done |
| 74 | [GetCollectionOnlyHasValueAndNextLink](https://github.com/Azure/azure-openapi-validator/blob/main/docs/get-collection-only-has-value-and-next-link.md) | @azure-tools/typespec-azure-resource-manager | [5358](https://github.com/Azure/typespec-azure/pull/5358) | 2026-09-01 | 2026-09-04 | timotheeguerin | - | Done |
| 75 | [XmsPageableForListCalls](https://github.com/Azure/azure-openapi-validator/blob/main/docs/xms-pageable-for-list-calls.md) | @azure-tools/typespec-azure-resource-manager | [5379](https://github.com/Azure/typespec-azure/pull/5379) | 2026-09-02 | 2026-09-07 | timotheeguerin | - | Done |
| 76 | [ParametersInPost](https://github.com/Azure/azure-openapi-validator/blob/main/docs/parameters-in-post.md) | @azure-tools/typespec-azure-resource-manager | [5281](https://github.com/Azure/typespec-azure/pull/5281) | 2026-08-24 | 2026-09-09 | catalinaperalta, timotheeguerin | - | Done |
| 77 | [TenantLevelAPIsNotAllowed](https://github.com/Azure/azure-openapi-validator/blob/main/docs/tenant-level-apis-not-allowed.md) | @azure-tools/typespec-azure-resource-manager | [5420](https://github.com/Azure/typespec-azure/pull/5420) | 2026-09-08 | 2026-09-09 | timotheeguerin | - | Done |
| 78 | [XmsExamplesRequired](https://github.com/Azure/azure-openapi-validator/blob/main/docs/xms-examples-required.md) | - | [5398](https://github.com/Azure/typespec-azure/pull/5398) | - | - | - | - | Hold on |
| 79 | [LatestVersionOfCommonTypesMustBeUsed](https://github.com/Azure/azure-openapi-validator/blob/main/docs/latest-version-of-common-types-must-be-used.md) | @azure-tools/typespec-azure-resource-manager | [5271](https://github.com/Azure/typespec-azure/pull/5271) | 2026-08-20 | - | - | No | Doing |
| 80 | [PatchBodyParametersSchema](https://github.com/Azure/azure-openapi-validator/blob/main/docs/patch-body-parameters-schema.md) | @azure-tools/typespec-azure-resource-manager | [5294](https://github.com/Azure/typespec-azure/pull/5294) | 2026-08-25 | - | - | No | Doing |
| 81 | [GuidUsage](https://github.com/Azure/azure-openapi-validator/blob/main/docs/guid-usage.md) | @azure-tools/typespec-azure-resource-manager | [5336](https://github.com/Azure/typespec-azure/pull/5336) | 2026-08-28 | - | - | No | Doing |
| 82 | [ParametersSchemaAsTypeObject](https://github.com/Azure/azure-openapi-validator/blob/main/docs/parameters-schema-as-type-object.md) | @azure-tools/typespec-azure-resource-manager | [5361](https://github.com/Azure/typespec-azure/pull/5361) | 2026-09-01 | - | - | No | Doing |
| 83 | [GetInOperationName](https://github.com/Azure/azure-openapi-validator/blob/main/docs/get-in-operation-name.md) | @azure-tools/typespec-client-generator-core | [5364](https://github.com/Azure/typespec-azure/pull/5364) | 2026-09-01 | - | - | No | Doing |
| 84 | [UnSupportedPatchProperties](https://github.com/Azure/azure-openapi-validator/blob/main/docs/un-supported-patch-properties.md) | @azure-tools/typespec-azure-resource-manager | [5384](https://github.com/Azure/typespec-azure/pull/5384) | 2026-09-03 | - | - | No | Doing |
| 85 | [ConsistentResponseSchemaForPut](https://github.com/Azure/azure-openapi-validator/blob/main/docs/consistent-response-schema-for-put.md) | @azure-tools/typespec-azure-resource-manager | [5423](https://github.com/Azure/typespec-azure/pull/5423) | 2026-09-08 | - | - | No | Doing |
| 86 | [ConsistentPatchProperties](https://github.com/Azure/azure-openapi-validator/blob/main/docs/consistent-patch-properties.md) | @azure-tools/typespec-azure-resource-manager | [5456](https://github.com/Azure/typespec-azure/pull/5456) | 2026-09-11 | - | - | No | Doing |
| 87 | [LroErrorContent](https://github.com/Azure/azure-openapi-validator/blob/main/docs/lro-error-content.md) | @azure-tools/typespec-azure-resource-manager | [5451](https://github.com/Azure/typespec-azure/pull/5451) | 2026-09-11 | - | - | Yes | Doing |
| 88 | [PutInOperationName](https://github.com/Azure/azure-openapi-validator/blob/main/docs/put-in-operation-name.md) | @azure-tools/typespec-azure-resource-manager | [5457](https://github.com/Azure/typespec-azure/pull/5457) | 2026-09-11 | - | - | Yes | Doing |
| 89 | [AllResourcesMustHaveGetOperation](https://github.com/Azure/azure-openapi-validator/blob/main/docs/all-resources-must-have-get-operation.md) | - | - | - | - | - | - | To do |
| 90 | [AvoidAnonymousParameter](https://github.com/Azure/azure-openapi-validator/blob/main/docs/anonymous-body-parameter.md) | - | - | - | - | - | - | To do |
| 91 | [AvoidAnonymousTypes](https://github.com/Azure/azure-openapi-validator/blob/main/docs/avoid-anonymous-types.md) | - | - | - | - | - | - | To do |
| 92 | [AvoidMsdnReferences](https://github.com/Azure/azure-openapi-validator/blob/main/docs/avoid-msdn-references.md) | - | - | - | - | - | - | To do |
| 93 | [CollectionObjectPropertiesNaming](https://github.com/Azure/azure-openapi-validator/blob/main/docs/collection-object-properties-naming.md) | - | - | - | - | - | - | To do |
| 94 | [DeleteInOperationName](https://github.com/Azure/azure-openapi-validator/blob/main/docs/delete-in-operation-name.md) | - | - | - | - | - | - | To do |
| 95 | [DeleteResponseBodyEmpty](https://github.com/Azure/azure-openapi-validator/blob/main/docs/delete-response-body-empty.md) | - | - | - | - | - | - | To do |
| 96 | [DescriptionMustNotBeNodeName](https://github.com/Azure/azure-openapi-validator/blob/main/docs/description-must-not-be-node-name.md) | - | - | - | - | - | - | To do |
| 97 | [DescriptiveDescriptionRequired](https://github.com/Azure/azure-openapi-validator/blob/main/docs/descriptive-description-required.md) | - | - | - | - | - | - | To do |
| 98 | [EvenSegmentedPathForPutOperation](https://github.com/Azure/azure-openapi-validator/blob/main/docs/even-segmented-path-for-put-operation.md) | - | - | - | - | - | - | To do |
| 99 | [ExtensionResourcePathPattern](https://github.com/Azure/azure-openapi-validator/blob/main/docs/extension-resource-path-pattern.md) | - | - | - | - | - | - | To do |
| 100 | [GetOperationMustNotBeLongRunning](https://github.com/Azure/azure-openapi-validator/blob/main/docs/get-operation-must-not-be-long-running.md) | - | - | - | - | - | - | To do |
| 101 | [GetResponseCodes](https://github.com/Azure/azure-openapi-validator/blob/main/docs/get-response-codes.md) | - | - | - | - | - | - | To do |
| 102 | [ImplementPrivateEndpointAPIs](https://github.com/Azure/azure-openapi-validator/blob/main/docs/implement-private-endpoint-ap-is.md) | - | - | - | - | - | - | To do |
| 103 | [InvalidSkuModel](https://github.com/Azure/azure-openapi-validator/blob/main/docs/invalid-sku-model.md) | - | - | - | - | - | - | To do |
| 104 | [ListInOperationName](https://github.com/Azure/azure-openapi-validator/blob/main/docs/list-in-operation-name.md) | - | - | - | - | - | - | To do |
| 105 | [LocationMustHaveXmsMutability](https://github.com/Azure/azure-openapi-validator/blob/main/docs/location-must-have-xms-mutability.md) | - | - | - | - | - | - | To do |
| 106 | [LongRunningOperationsOptionsValidator](https://github.com/Azure/azure-openapi-validator/blob/main/docs/long-running-operations-options-validator.md) | - | - | - | - | - | - | To do |
| 107 | [LroExtension](https://github.com/Azure/azure-openapi-validator/blob/main/docs/lro-extension.md) | - | - | - | - | - | - | To do |
| 108 | [LroPatch202](https://github.com/Azure/azure-openapi-validator/blob/main/docs/lro-patch202.md) | - | - | - | - | - | - | To do |
| 109 | [MissingSegmentsInNestedResourceListOperation](https://github.com/Azure/azure-openapi-validator/blob/main/docs/missing-segments-in-nested-resource-list-operation.md) | - | - | - | - | - | - | To do |
| 110 | [MissingXmsErrorResponse](https://github.com/Azure/azure-openapi-validator/blob/main/docs/missing-xms-error-response.md) | - | - | - | - | - | - | To do |
| 111 | [MutabilityWithReadOnly](https://github.com/Azure/azure-openapi-validator/blob/main/docs/mutability-with-read-only.md) | - | - | - | - | - | - | To do |
| 112 | [NestedResourcesMustHaveListOperation](https://github.com/Azure/azure-openapi-validator/blob/main/docs/nested-resources-must-have-list-operation.md) | - | - | - | - | - | - | To do |
| 113 | [NoErrorCodeResponses](https://github.com/Azure/azure-openapi-validator/blob/main/docs/no-error-code-responses.md) | - | - | - | - | - | - | To do |
| 114 | [OperationIdNounConflictingModelNames](https://github.com/Azure/azure-openapi-validator/blob/main/docs/operation-id-noun-conflicting-model-names.md) | - | - | - | - | - | - | To do |
| 115 | [OperationIdNounVerb](https://github.com/Azure/azure-openapi-validator/blob/main/docs/operation-id-noun-verb.md) | - | - | - | - | - | - | To do |
| 116 | [OperationsApiResponseSchema](https://github.com/Azure/azure-openapi-validator/blob/main/docs/operations-api-response-schema.md) | - | - | - | - | - | - | To do |
| 117 | [OperationsApiSchemaUsesCommonTypes](https://github.com/Azure/azure-openapi-validator/blob/main/docs/operations-api-schema-uses-common-types.md) | - | - | - | - | - | - | To do |
| 118 | [PageableRequires200Response](https://github.com/Azure/azure-openapi-validator/blob/main/docs/pageable-requires200-response.md) | - | - | - | - | - | - | To do |
| 119 | [ParameterNotUsingCommonTypes](https://github.com/Azure/azure-openapi-validator/blob/main/docs/parameter-not-using-common-types.md) | - | - | - | - | - | - | To do |
| 120 | [PatchIdentityProperty](https://github.com/Azure/azure-openapi-validator/blob/main/docs/patch-identity-property.md) | - | - | - | - | - | - | To do |
| 121 | [PatchInOperationName](https://github.com/Azure/azure-openapi-validator/blob/main/docs/patch-in-operation-name.md) | - | - | - | - | - | - | To do |
| 122 | [PatchPropertiesCorrespondToPutProperties](https://github.com/Azure/azure-openapi-validator/blob/main/docs/patch-properties-correspond-to-put-properties.md) | - | - | - | - | - | - | To do |
| 123 | [PatchResponseCodes](https://github.com/Azure/azure-openapi-validator/blob/main/docs/patch-response-codes.md) | - | - | - | - | - | - | To do |
| 124 | [PatchSkuProperty](https://github.com/Azure/azure-openapi-validator/blob/main/docs/patch-sku-property.md) | - | - | - | - | - | - | To do |
| 125 | [PathContainsResourceGroup](https://github.com/Azure/azure-openapi-validator/blob/main/docs/path-contains-resource-group.md) | - | - | - | - | - | - | To do |
| 126 | [PathContainsResourceType](https://github.com/Azure/azure-openapi-validator/blob/main/docs/path-contains-resource-type.md) | - | - | - | - | - | - | To do |
| 127 | [PathForNestedResource](https://github.com/Azure/azure-openapi-validator/blob/main/docs/path-for-nested-resource.md) | - | - | - | - | - | - | To do |
| 128 | [PathForTrackedResourceTypes](https://github.com/Azure/azure-openapi-validator/blob/main/docs/path-for-tracked-resource-types.md) | - | - | - | - | - | - | To do |
| 129 | [PathResourceProviderNamePascalCase](https://github.com/Azure/azure-openapi-validator/blob/main/docs/path-resource-provider-name-pascal-case.md) | - | - | - | - | - | - | To do |
| 130 | [PostOperationIdContainsUrlVerb](https://github.com/Azure/azure-openapi-validator/blob/main/docs/post-operation-id-contains-url-verb.md) | - | - | - | - | - | - | To do |
| 131 | [PostResponseCodes](https://github.com/Azure/azure-openapi-validator/blob/main/docs/post-response-codes.md) | @azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes | - | - | - | - | - | To do |
| 132 | [PreviewVersionOverOneYear](https://github.com/Azure/azure-openapi-validator/blob/main/docs/preview-version-over-one-year.md) | - | - | - | - | - | - | To do |
| 133 | [PutRequestResponseScheme](https://github.com/Azure/azure-openapi-validator/blob/main/docs/put-request-response-scheme.md) | - | - | - | - | - | - | To do |
| 134 | [PutRequestResponseSchemeArm](https://github.com/Azure/azure-openapi-validator/blob/main/docs/put-request-response-scheme-arm.md) | - | - | - | - | - | - | To do |
| 135 | [RepeatedPathInfo](https://github.com/Azure/azure-openapi-validator/blob/main/docs/repeated-path-info.md) | - | - | - | - | - | - | To do |
| 136 | [RequestBodyMustExistForPutPatch](https://github.com/Azure/azure-openapi-validator/blob/main/docs/request-body-must-exist-for-put-patch.md) | - | - | - | - | - | - | To do |
| 137 | [ReservedResourceNamesModelAsEnum](https://github.com/Azure/azure-openapi-validator/blob/main/docs/reserved-resource-names-model-as-enum.md) | - | - | - | - | - | - | To do |
| 138 | [ResourceHasXMsResourceEnabled](https://github.com/Azure/azure-openapi-validator/blob/main/docs/resource-has-x-ms-resource-enabled.md) | - | - | - | - | - | - | To do |
| 139 | [SubscriptionsAndResourceGroupCasing](https://github.com/Azure/azure-openapi-validator/blob/main/docs/subscriptions-and-resource-group-casing.md) | - | - | - | - | - | - | To do |
| 140 | [SummaryAndDescriptionMustNotBeSame](https://github.com/Azure/azure-openapi-validator/blob/main/docs/summary-and-description-must-not-be-same.md) | - | - | - | - | - | - | To do |
| 141 | [TagsAreNotAllowedForProxyResources](https://github.com/Azure/azure-openapi-validator/blob/main/docs/tags-are-not-allowed-for-proxy-resources.md) | - | - | - | - | - | - | To do |
| 142 | [TopLevelResourcesListByResourceGroup](https://github.com/Azure/azure-openapi-validator/blob/main/docs/top-level-resources-list-by-resource-group.md) | - | - | - | - | - | - | To do |
| 143 | [TrackedResourcePatchOperation](https://github.com/Azure/azure-openapi-validator/blob/main/docs/tracked-resource-patch-operation.md) | - | - | - | - | - | - | To do |
| 144 | [TrackedResourcesMustHavePut](https://github.com/Azure/azure-openapi-validator/blob/main/docs/tracked-resources-must-have-put.md) | - | - | - | - | - | - | To do |
| 145 | [ValidFormats](https://github.com/Azure/azure-openapi-validator/blob/main/docs/valid-formats.md) | - | - | - | - | - | - | To do |
| 146 | [XMSLongRunningOperationProperty](https://github.com/Azure/azure-openapi-validator/blob/main/docs/xms-long-running-operation-property.md) | - | - | - | - | - | - | To do |
| 147 | [XmsPageableMustHaveCorrespondingResponse](https://github.com/Azure/azure-openapi-validator/blob/main/docs/xms-pageable-must-have-corresponding-response.md) | - | - | - | - | - | - | To do |
| 148 | [XmsPathsMustOverloadPaths](https://github.com/Azure/azure-openapi-validator/blob/main/docs/xms-paths-must-overload-paths.md) | - | - | - | - | - | - | To do |
| 149 | [XmsResourceInPutResponse](https://github.com/Azure/azure-openapi-validator/blob/main/docs/xms-resource-in-put-response.md) | - | - | - | - | - | - | To do |
| 150 | [AzureResourceTagsSchema](https://github.com/Azure/azure-openapi-validator/blob/main/docs/azure-resource-tags-schema.md) | - | - | - | - | - | - | Need investigation |
| 151 | [DefaultErrorResponseSchema](https://github.com/Azure/azure-openapi-validator/blob/main/docs/default-error-response-schema.md) | - | - | - | - | - | - | Need investigation |
| 152 | [DefaultInEnum](https://github.com/Azure/azure-openapi-validator/blob/main/docs/default-in-enum.md) | - | - | - | - | - | - | Need investigation |
| 153 | [DeleteMustNotHaveRequestBody](https://github.com/Azure/azure-openapi-validator/blob/main/docs/delete-must-not-have-request-body.md) | - | - | - | - | - | - | Need investigation |
| 154 | [DeleteOperationResponses](https://github.com/Azure/azure-openapi-validator/blob/main/docs/delete-operation-responses.md) | - | - | - | - | - | - | Need investigation |
| 155 | [DeprecatedXmsCodeGenerationSetting](https://github.com/Azure/azure-openapi-validator/blob/main/docs/deprecated-xms-code-generation-setting.md) | - | - | - | - | - | - | Need investigation |
| 156 | [docLinkLocale](https://github.com/Azure/azure-openapi-validator/blob/main/docs/doc-link-locale.md) | - | - | - | - | - | - | Need investigation |
| 157 | [GetCollectionResponseSchema](https://github.com/Azure/azure-openapi-validator/blob/main/docs/get-collection-response-schema.md) | - | - | - | - | - | - | Need investigation |
| 158 | [GetMustNotHaveRequestBody](https://github.com/Azure/azure-openapi-validator/blob/main/docs/get-must-not-have-request-body.md) | - | - | - | - | - | - | Need investigation |
| 159 | [LicenseHeaderMustNotBeSpecified](https://github.com/Azure/azure-openapi-validator/blob/main/docs/license-header-must-not-be-specified.md) | - | - | - | - | - | - | Need investigation |
| 160 | [LroWithOriginalUriAsFinalState](https://github.com/Azure/azure-openapi-validator/blob/main/docs/lro-with-original-url-as-final-state.md) | - | - | - | - | - | - | Need investigation |
| 161 | [MissingDefaultResponse](https://github.com/Azure/azure-openapi-validator/blob/main/docs/missing-default-response.md) | - | - | - | - | - | - | Need investigation |
| 162 | [PageableOperation](https://github.com/Azure/azure-openapi-validator/blob/main/docs/pageable-operation.md) | - | - | - | - | - | - | Need investigation |
| 163 | [PathContainsSubscriptionId](https://github.com/Azure/azure-openapi-validator/blob/main/docs/path-contains-subscription-id.md) | - | - | - | - | - | - | Need investigation |
| 164 | [PathResourceProviderMatchNamespace](https://github.com/Azure/azure-openapi-validator/blob/main/docs/path-resource-provider-match-namespace.md) | - | - | - | - | - | - | Need investigation |
| 165 | [PrivateEndpointResourceSchemaValidation](https://github.com/Azure/azure-openapi-validator/blob/main/docs/private-endpoint-resource-schema-validation.md) | - | - | - | - | - | - | Need investigation |
| 166 | [RequiredDefaultResponse](https://github.com/Azure/azure-openapi-validator/blob/main/docs/required-default-response.md) | - | - | - | - | - | - | Need investigation |
| 167 | [RequiredPropertiesMissingInResourceModel](https://github.com/Azure/azure-openapi-validator/blob/main/docs/required-properties-missing-in-resource-model.md) | - | - | - | - | - | - | Need investigation |
| 168 | [RequiredReadOnlySystemData](https://github.com/Azure/azure-openapi-validator/blob/main/docs/required-read-only-system-data.md) | - | - | - | - | - | - | Need investigation |
| 169 | [Rpaas_ResourceProvisioningState](https://github.com/Azure/azure-openapi-validator/blob/main/docs/rpaas-resource-provisioning-state.md) | - | - | - | - | - | - | Need investigation |
| 170 | [SecurityDefinitionsStructure](https://github.com/Azure/azure-openapi-validator/blob/main/docs/security-definitions-structure.md) | - | - | - | - | - | - | Need investigation |
| 171 | [SystemDataInPropertiesBag](https://github.com/Azure/azure-openapi-validator/blob/main/docs/system-data-in-properties-bag.md) | - | - | - | - | - | - | Need investigation |
| 172 | [TopLevelResourcesListBySubscription](https://github.com/Azure/azure-openapi-validator/blob/main/docs/top-level-resources-list-by-subscription.md) | - | - | - | - | - | - | Need investigation |
| 173 | [UniqueXmsEnumName](https://github.com/Azure/azure-openapi-validator/blob/main/docs/unique-xms-enum-name.md) | - | - | - | - | - | - | Need investigation |
| 174 | [UniqueXmsExample](https://github.com/Azure/azure-openapi-validator/blob/main/docs/unique-xms-example.md) | - | - | - | - | - | - | Need investigation |
| 175 | [XmsClientNameParameter](https://github.com/Azure/azure-openapi-validator/blob/main/docs/xms-client-name-parameter.md) | - | - | - | - | - | - | Need investigation |
| 176 | [XmsClientNameProperty](https://github.com/Azure/azure-openapi-validator/blob/main/docs/xms-client-name-property.md) | - | - | - | - | - | - | Need investigation |
| 177 | [XmsEnumValidation](https://github.com/Azure/azure-openapi-validator/blob/main/docs/xms-enum-validation.md) | - | - | - | - | - | - | Need investigation |
| 178 | [XmsPageableListByRGAndSubscriptions](https://github.com/Azure/azure-openapi-validator/blob/main/docs/xms-pageable-list-by-rg-and-subscriptions.md) | - | - | - | - | - | - | Need investigation |
| 179 | [XmsParameterLocation](https://github.com/Azure/azure-openapi-validator/blob/main/docs/xms-parameter-location.md) | - | - | - | - | - | - | Need investigation |
| 180 | XmsClientName | - | - | - | - | - | - | Need investigation |
## AI update notes
This table already contains the fixed set of 180 ARM swagger linter rules. Future AI updates should only refresh rows whose `Status` is neither `Done` nor `Hold on`:
- Search `Azure/typespec-azure` PRs whose title starts with `[Swagger Linter Migration] ` and does not contain `(origin)`. PRs whose title ends with `(devbox-heavy)` are also valid when they meet these criteria.
- When a valid PR exists, fill `tsp linter PR`, `PR created time`, and `PR merged time` if merged. Set `Status` to `Doing` while open and `Done` once merged.
- Derive `tsp lib` from PR changed files: `packages/typespec-azure-core` -> `@azure-tools/typespec-azure-core`; `packages/typespec-azure-resource-manager` -> `@azure-tools/typespec-azure-resource-manager`.
- Once a row's `Status` is `Hold on`, do not refresh or edit any of its data cells. Only its position and `id` may change for sorting and renumbering.
- For each open PR in a row not marked `Hold on`, refresh `approved by` with the approving reviewers' GitHub aliases.
- When `Status` is `Done`, set `new comment after latest commit` to `-`.
- For each open PR in a row not marked `Hold on`, refresh `new comment after latest commit` as `Yes` when eligible feedback was created or submitted after the latest head commit; otherwise use `No`. Check all three feedback surfaces: top-level PR comments (`issues/{pr}/comments`), inline review comments (`pulls/{pr}/comments`), and non-empty review summaries (`pulls/{pr}/reviews`). Compare comment `created_at` or review `submitted_at` with the latest head commit's committer date; do not rely on `gh pr view --json comments` or the PR's `updatedAt` alone.
- Only consider real GitHub user aliases for approvals and comments; ignore bot accounts and ignore comments/reviews from the PR author.
- Preserve markdown table newlines by reading the issue body through `gh api ... | ConvertFrom-Json` and writing the edited body from a UTF-8 no-BOM file; do not assign `gh issue view --jq .body` multiline output directly to a PowerShell variable or stringify a line array, because that can collapse adjacent table rows and break the table. After every edit, verify the raw issue body still has 180 table rows and each table line starts and ends with a single row delimiter.
Reusable PowerShell update script
Requires **PowerShell 7+** and an authenticated **GitHub CLI (`gh`)**. Save the script below as `refresh-arm-linter-issue.ps1`. The authenticated account needs issue-edit permission when applying changes.
- Preview without changing the issue: `pwsh -File .\refresh-arm-linter-issue.ps1`
- Refresh the issue: `pwsh -File .\refresh-arm-linter-issue.ps1 -Apply`
The script follows the AI update notes above, preserves `Done` and `Hold on` row data (apart from sorting and renumbering IDs) and all content outside the table (including this section), checks all three feedback surfaces, and stops on ambiguous PRs or incomplete data. Dates are UTC. It also recognizes `@azure-tools/typespec-client-generator-core` when that package contains the implementation. Review the notes before running in case the update policy changes.
```powershell
# Requires PowerShell 7+ and an authenticated GitHub CLI (gh).
# Preview: pwsh -File .\refresh-arm-linter-issue.ps1
# Update: pwsh -File .\refresh-arm-linter-issue.ps1 -Apply
[CmdletBinding()]
param([switch]$Apply)
$ErrorActionPreference = 'Stop'
$repo = 'Azure/typespec-azure'
$issueNumber = 5274
$expectedRows = 180
$statusOrder = @{ 'Done' = 0; 'Hold on' = 1; 'Doing' = 2; 'To do' = 3; 'Need investigation' = 4 }
function Get-GitHubJson([string[]]$Arguments) {
$raw = & gh @Arguments
if ($LASTEXITCODE -ne 0) { throw "GitHub command failed: gh $($Arguments -join ' ')" }
($raw -join "`n") | ConvertFrom-Json
}
function Get-Api([string]$Path, [switch]$Paginate) {
if ($Paginate) {
$pages = Get-GitHubJson @('api', $Path, '--paginate', '--slurp')
foreach ($page in $pages) { foreach ($item in $page) { $item } }
} else {
Get-GitHubJson @('api', $Path)
}
}
function Test-EligibleUser($User, [string]$Author) {
$User.type -eq 'User' -and $User.login -ne $Author -and $User.login -notmatch '\[bot\]$'
}
function Get-Rows([string]$Body) {
foreach ($line in ($Body -split "`n")) {
if ($line -notmatch '^\| \d+ \|') { continue }
if ($line -notmatch '^\|(?:[^|\r\n]*\|){9}$') { throw 'Malformed table row.' }
$cells = @($line.Split('|')[1..9] | ForEach-Object { $_.Trim() })
if (-not $statusOrder.ContainsKey($cells[8])) { throw "Unknown status: $($cells[8])" }
$rule = if ($cells[1] -match '^\[([^\]]+)\]') { $Matches[1] } else { $cells[1] }
[pscustomobject]@{ OriginalId = [int]$cells[0]; Rule = $rule; Cells = $cells }
}
}
function Assert-Table([object[]]$Rows) {
if ($Rows.Count -ne $expectedRows -or @($Rows.Rule | Sort-Object -Unique).Count -ne $expectedRows) {
throw "Expected exactly $expectedRows unique rules."
}
for ($i = 0; $i -lt $Rows.Count; $i++) {
if ($Rows[$i].OriginalId -ne $i + 1) { throw 'IDs must be consecutive from 1.' }
}
}
$issue = Get-Api "repos/$repo/issues/$issueNumber"
$originalBody = $issue.body
$rows = @(Get-Rows $originalBody)
Assert-Table $rows
$allPrs = @(Get-GitHubJson @(
'pr', 'list', '--repo', $repo, '--state', 'all',
'--search', '"[Swagger Linter Migration]" in:title',
'--limit', '1000', '--json', 'number,title'
))
if ($allPrs.Count -ge 1000) { throw 'PR search may be truncated; narrow or paginate the search.' }
$candidates = @($allPrs | Where-Object { $_.title -notmatch '\(origin\)' })
$changes = [Collections.Generic.List[object]]::new()
foreach ($row in $rows) {
if ($row.Cells[8] -in @('Done', 'Hold on')) { continue }
$pattern = '^\[Swagger Linter Migration\]\s+' + [regex]::Escape($row.Rule) + '(?:\s|$)'
$matching = @($candidates | Where-Object { $_.title -match $pattern })
if ($matching.Count -gt 1) { throw "Multiple matching PRs for $($row.Rule); resolve manually." }
if ($matching.Count -eq 0) {
if ($row.Cells[3] -match '/pull/\d+') {
throw "Existing PR for $($row.Rule) was not found in search; investigate before updating."
}
continue
}
$number = $matching[0].number
$pr = Get-Api "repos/$repo/pulls/$number"
if ($pr.title -notmatch $pattern -or $pr.title -match '\(origin\)') { throw "PR #$number title changed." }
if (-not $pr.merged -and $pr.state -ne 'open') {
throw "PR #$number is closed without merging; resolve its table status manually."
}
$files = @(Get-Api "repos/$repo/pulls/$number/files?per_page=100" -Paginate)
if ($files.Count -ne $pr.changed_files) { throw "Incomplete changed-file list for PR #$number." }
$libs = @(
foreach ($package in @('typespec-azure-core', 'typespec-azure-resource-manager', 'typespec-client-generator-core')) {
if ($files.filename -like "packages/$package/*") { "@azure-tools/$package" }
}
)
if (-not $libs.Count) { throw "Unrecognized library in PR #$number; extend the package mapping." }
$reviews = @(Get-Api "repos/$repo/pulls/$number/reviews?per_page=100" -Paginate)
# A later change request or dismissal supersedes an approval; a comment does not.
$approvals = @($reviews | Where-Object {
(Test-EligibleUser $_.user $pr.user.login) -and
$_.state -in @('APPROVED', 'CHANGES_REQUESTED', 'DISMISSED')
} | Group-Object { $_.user.login } | ForEach-Object {
$last = $_.Group | Sort-Object { [DateTimeOffset]$_.submitted_at }, id | Select-Object -Last 1
if ($last.state -eq 'APPROVED') { $last.user.login }
} | Sort-Object -Unique)
$feedbackFlag = '-'
if (-not $pr.merged) {
$comments = @(Get-Api "repos/$repo/issues/$number/comments?per_page=100" -Paginate)
$inline = @(Get-Api "repos/$repo/pulls/$number/comments?per_page=100" -Paginate)
$head = Get-Api "repos/$repo/commits/$($pr.head.sha)"
$latest = [DateTimeOffset]$head.commit.committer.date
$feedback = @(
@($comments) + @($inline) | Where-Object {
(Test-EligibleUser $_.user $pr.user.login) -and
[DateTimeOffset]$_.created_at -gt $latest
}
$reviews | Where-Object {
(Test-EligibleUser $_.user $pr.user.login) -and
-not [string]::IsNullOrWhiteSpace($_.body) -and
$_.submitted_at -and [DateTimeOffset]$_.submitted_at -gt $latest
}
)
$feedbackFlag = if ($feedback.Count) { 'Yes' } else { 'No' }
}
$fresh = Get-Api "repos/$repo/pulls/$number"
if ($fresh.head.sha -ne $pr.head.sha -or $fresh.state -ne $pr.state -or
$fresh.merged -ne $pr.merged -or $fresh.title -cne $pr.title) {
throw "PR #$number changed while reading; rerun."
}
$before = $row.Cells[2..8] -join ' | '
$row.Cells[2] = $libs -join ', '
$row.Cells[3] = "[$number](https://github.com/$repo/pull/$number)"
$row.Cells[4] = ([DateTimeOffset]$pr.created_at).ToString('yyyy-MM-dd')
$row.Cells[5] = if ($pr.merged_at) { ([DateTimeOffset]$pr.merged_at).ToString('yyyy-MM-dd') } else { '-' }
$row.Cells[6] = if ($approvals.Count) { $approvals -join ', ' } else { '-' }
$row.Cells[7] = $feedbackFlag
$row.Cells[8] = if ($pr.merged) { 'Done' } else { 'Doing' }
$after = $row.Cells[2..8] -join ' | '
if ($before -cne $after) {
$changes.Add([pscustomobject]@{ Rule = $row.Rule; Before = $before; After = $after })
}
}
$sorted = @($rows | Sort-Object { $statusOrder[$_.Cells[8]] }, OriginalId)
$index = 0
$newLines = foreach ($line in ($originalBody -split "`n")) {
if ($line -match '^\| \d+ \|') {
$sorted[$index].Cells[0] = ($index + 1).ToString()
'| ' + ($sorted[$index].Cells -join ' | ') + ' |'
$index++
} else { $line }
}
$newBody = $newLines -join "`n"
$newRows = @(Get-Rows $newBody)
Assert-Table $newRows
foreach ($old in @(Get-Rows $originalBody)) {
$new = $newRows | Where-Object Rule -eq $old.Rule
if (-not $new) { throw "Lost rule: $($old.Rule)" }
if ($old.Cells[8] -in @('Done', 'Hold on') -and ($old.Cells[1..8] -join '|') -cne ($new.Cells[1..8] -join '|')) {
throw "Modified a protected Done/Hold on row: $($old.Rule)"
}
}
for ($i = 1; $i -lt $newRows.Count; $i++) {
if ($statusOrder[$newRows[$i - 1].Cells[8]] -gt $statusOrder[$newRows[$i].Cells[8]]) {
throw 'Incorrect status ordering.'
}
}
$changes | Format-List
$newRows | Group-Object { $_.Cells[8] } | Select-Object Name, Count | Format-Table
if ($newBody -ceq $originalBody) { Write-Output 'Already up to date; no edit needed.'; return }
if (-not $Apply) { Write-Output 'Preview only. Rerun with -Apply to update the issue.'; return }
$current = Get-Api "repos/$repo/issues/$issueNumber"
if ($current.body -cne $originalBody) { throw 'Issue changed during refresh; rerun to avoid overwriting edits.' }
$tempFile = [IO.Path]::GetTempFileName()
try {
[IO.File]::WriteAllText($tempFile, $newBody, [Text.UTF8Encoding]::new($false))
& gh issue edit $issueNumber --repo $repo --body-file $tempFile
if ($LASTEXITCODE -ne 0) { throw 'Issue update failed.' }
$saved = Get-Api "repos/$repo/issues/$issueNumber"
if ($saved.body -cne $newBody) { throw 'Saved issue differs from proposed body; inspect it before retrying.' }
Assert-Table @(Get-Rows $saved.body)
Write-Output "Updated https://github.com/$repo/issues/$issueNumber"
} finally {
Remove-Item -LiteralPath $tempFile
}
```
Contributor guide
Assessment
This issue has not been assessed yet.