Skip to content

improve inline type property decorator completion logic and add tests#19174

Open
polatengin wants to merge 1 commit intomainfrom
polatengin/16942-some-decorators-are-not-returned-inside-an-inline-type
Open

improve inline type property decorator completion logic and add tests#19174
polatengin wants to merge 1 commit intomainfrom
polatengin/16942-some-decorators-are-not-returned-inside-an-inline-type

Conversation

@polatengin
Copy link
Copy Markdown
Member

@polatengin polatengin commented Mar 14, 2026

Fixes #16942

Description

Fix decorator completions for properties inside inline object types (for example, param foo { @| name: string }) to suggest decorators based on the property's type rather than the enclosing declaration's type.

Example Usage

Before this fix, typing @ on an inline object type property would show incomplete completions:

param clusterSettings {
  @  // Previously suggested `@sealed`, `@discriminator` (object-level)
  name: string
}

With this PR, completions align with the property's type;

param clusterSettings {
  @  // Now suggests `@minLength`, `@maxLength`, `@description`, `@metadata` (string-level)
  name: string
}
Microsoft Reviewers: Open in CodeFlow

@polatengin polatengin added this to the v0.42 milestone Mar 14, 2026
@polatengin polatengin self-assigned this Mar 14, 2026
@polatengin polatengin added this to Bicep Mar 14, 2026
@polatengin polatengin linked an issue Mar 14, 2026 that may be closed by this pull request
@github-project-automation github-project-automation bot moved this to Todo in Bicep Mar 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Test this change out locally with the following install scripts (Action run 23091409924)

VSCode
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 23091409924
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 23091409924"
Azure CLI
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 23091409924
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 23091409924"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Some decorators are not returned inside an inline type

1 participant