Skip to content

R2008 erroneously fails when property narrows mutability from the base definition #248

@forteddyt

Description

@forteddyt

PR in question: Azure/azure-rest-api-specs#15439
LintDiff Gate: https://github.com/Azure/azure-rest-api-specs/pull/15439/checks?check_run_id=3344805888
Fails with: When property is modeled as 'readOnly': true then x-ms-mutability extension can only have 'read' value. When property is modeled as 'readOnly': false then applying x-ms-mutability extension with only 'read' value is not allowed. Extension contains invalid values: 'read'.

This was originally caught in Azure/azure-rest-api-specs#12554 (comment). For example, EnvironmentVersion.environmentType is correctly marked as ReadOnly, with the correct x-ms-mutability extension. However, since EnvironmentType has a wider mutability scope, R2008 is erroneously thrown.

(originally posted in Azure/azure-rest-api-specs#15666)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions