Skip to content

Commit

Permalink
Tsp - Add support for skip url encoding for path parameter (#1423)
Browse files Browse the repository at this point in the history
  • Loading branch information
dolauli authored Jan 3, 2025
1 parent 96a394d commit b5ba717
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 40 deletions.
4 changes: 4 additions & 0 deletions packages/typespec-powershell/src/convertor/convertor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ function createParameter(psContext: SdkContext, parameter: HttpOperationParamete
newParameter.language.default.serializedName = parameter.name;
newParameter.protocol.http = newParameter.protocol.http ?? new Protocol();
newParameter.protocol.http.in = parameter.type;
if ((<any>parameter).allowReserved) {
newParameter.extensions = newParameter.extensions || {};
newParameter.extensions["x-ms-skip-url-encoding"] = true;
}
// ToDo, we need to support x-ms-client is specified.
newParameter.implementation = ImplementationLocation.Method;
newParameter.required = !parameter.param.optional;
Expand Down
Loading

0 comments on commit b5ba717

Please sign in to comment.