Skip to content

Commit

Permalink
Update default pattern.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjprescott committed Mar 28, 2024
1 parent e146569 commit a4a565c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function createPatternCodeFix(diagnosticTarget: DiagnosticTarget) {
const location = getSourceLocation(diagnosticTarget);
const { lineStart, indent } = findLineStartAndIndent(location);
const updatedLocation = { ...location, pos: lineStart };
return context.prependText(updatedLocation, `${indent}@pattern(/^[a-zA-Z0-9-]+$/)\n`);
return context.prependText(updatedLocation, `${indent}@pattern(/^[a-zA-Z0-9-]{3,24}$/)\n`);
},
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ it("Allows codefix when ARM resource name is missing pattern.", async () => {
namespace Microsoft.Contoso;
model Employee is ProxyResource<{}> {
@pattern(/^[a-zA-Z0-9-]+$/)
@pattern(/^[a-zA-Z0-9-]{3,24}$/)
@key("employeeName")
@path
@segment("employees")
Expand Down

0 comments on commit a4a565c

Please sign in to comment.