You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have changed a model to be an alias that I spread in EventGrid, and I am running into an emitter issue where the parameter within that alias is being capitalized incorrectly causing the operation to fail:
Old Tsp:
models RejectOptions {
@doc("Array of lock tokens.")
lockTokens: string[];
}
op blah( @bodyroot RejectOptions)
Generated the _content correctly as:
{"lockTokens": ["tokens"]}
New typespec looks like this:
alias RejectOptions = {
@doc("Array of lock tokens.")
lockTokens: string[];
};
op blah( ...RejectOptions)
Generated the _content as:
{"locktokens": ["tokens"]}
which gives me a service error
The service is expecting lockTokens. with the 'T' capitalized
Code currently being generated from the alias/spread with all lowercase locktokens:
if body is _Unset:
if lock_tokens is _Unset:
raise TypeError("missing required argument: lock_tokens")
body = {"locktokens": lock_tokens}
body = {k: v for k, v in body.items() if v is not None}
The text was updated successfully, but these errors were encountered:
I have changed a model to be an alias that I spread in EventGrid, and I am running into an emitter issue where the parameter within that alias is being capitalized incorrectly causing the operation to fail:
Old Tsp:
Generated the _content correctly as:
{"lockTokens": ["tokens"]}
New typespec looks like this:
Generated the _content as:
{"locktokens": ["tokens"]}
which gives me a service error
The service is expecting
lockTokens
. with the 'T' capitalizedCode currently being generated from the alias/spread with all lowercase
locktokens
:The text was updated successfully, but these errors were encountered: