Repository navigation
Add [StringSyntax(Json)] to string parameters that accept JSON - #66358
Conversation
Adds StringSyntaxAttribute with Json identifier to parameters in SignInManager (credentialJson), DefaultWebAssemblyJSRuntime (argsJson, operationsJson), ComponentHub (argsJson), and CircuitHost (argsJson). Closes dotnet#44535
|
@dotnet-policy-service agree |
|
/azp run aspnetcore-ci |
|
Commenter does not have sufficient privileges for PR 66358 in repo dotnet/aspnetcore |
|
Thanks for the approval, @Youssef1313! CI is green and mergeStateStatus is clean — is there anything else needed from me, or can someone with merge rights take this over the line? |
|
@ilonatommy @dariatiurina for a second review please |
|
@ilonatommy @dariatiurina friendly nudge on the second review @Youssef1313 requested - the PR has been approved + clean since April 23. Happy to address any further feedback. Thanks! |
ilonatommy
left a comment
There was a problem hiding this comment.
arguments from EndInvokeJS is also receiving JSON payload
|
Good catch, @ilonatommy — annotated |
|
Both reviews are in now (thanks @Youssef1313 and @ilonatommy) and the PR has been approved and clean since May 21. The two red checks (Build Analysis and aspnetcore-template-tests-pr) look like unrelated infra flakes - this change only adds |
|
/ba-g failures in template tests are not connected |
Add [StringSyntax(Json)] to Blazor/Identity params accepting raw JSON.
Description
Annotates string parameters that accept JSON payloads with
[StringSyntax(StringSyntaxAttribute.Json)]so IDEs and analyzersprovide JSON syntax highlighting and validation. No runtime behavior change.
Affected APIs:
SignInManager.PerformPasskeyAttestationAsync(credentialJson)SignInManager.PerformPasskeyAssertionAsync(credentialJson)SignInManager.PasskeySignInAsync(credentialJson)DefaultWebAssemblyJSRuntime.EndInvokeJS(argsJson)DefaultWebAssemblyJSRuntime.BeginInvokeDotNet(argsJson)DefaultWebAssemblyJSRuntime.UpdateRootComponentsCore(operationsJson)ComponentHub.BeginInvokeDotNetFromJS(argsJson)CircuitHost.BeginInvokeDotNetFromJS(argsJson)Follows the existing pattern used in
NavigationManager,IInternalWebJSInProcessRuntime, andWebViewManagerin this repo,and mirrors JamesNK's previous PR #45146 that added the same
attribute to other call sites.
Contributes to #44535