Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: missing-x-ms-identifiers rule produces false positives on 'extends' properties #1358

Open
4 tasks done
darkoa-msft opened this issue Aug 12, 2024 · 0 comments · May be fixed by #1537
Open
4 tasks done

[Bug]: missing-x-ms-identifiers rule produces false positives on 'extends' properties #1358

darkoa-msft opened this issue Aug 12, 2024 · 0 comments · May be fixed by #1537
Assignees
Labels
bug Something isn't working lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library triaged:core

Comments

@darkoa-msft
Copy link
Member

Describe the bug

missing-x-ms-identifiers rule does not check base model for the existence of the identifier.

Reproduction

model UpdateFile extends UpdateFileBase {
  @OpenAPI.extension("x-ms-identifiers", [])
  relatedFiles?: UpdateFileBase[];
}

model UpdateFileBase {
  fileName: string;
}

@OpenAPI.extension("x-ms-identifiers", ["fileName"])
  files?: UpdateFile[];

@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers: Property "fileName" is not found in "UpdateFile". Make sure value of x-ms-identifiers extension are valid property name of the array element.

Checklist

  • Follow our Code of Conduct
  • Check that this issue is about the Azure libraries for typespec. For bug in the typespec language or core libraries file it in the TypeSpec repo
  • Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library triaged:core
Projects
None yet
3 participants