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
When an operation's string parameter contains "$0" in it's value then the resulting string that is eventually being sent in a request is broken.
Example and Expected behavior
Consider parameter {id} having a string type with a value "$0something", then the generated request contains a value "{id}something" instead of "$0something".
Source of the problem
The problem is caused by a missing escaping of $ characters in the "replacement" parameter to the Regex's Replace method. The $0 is then treated as a reference to 0th matched group, i.e. the whole pattern. I suspect that it is the following line of code: let path' = <@ Regex.Replace(%path, pattern, %value) @> in the OperationCompiler.fs file. (Imagine parameter name being "id", pattern being "{id}" and value being, for example, "$0something".
The text was updated successfully, but these errors were encountered:
Description
When an operation's string parameter contains
"$0"
in it's value then the resulting string that is eventually being sent in a request is broken.Example and Expected behavior
Consider parameter {id} having a string type with a value
"$0something"
, then the generated request contains a value"{id}something"
instead of"$0something"
.Source of the problem
The problem is caused by a missing escaping of $ characters in the "replacement" parameter to the Regex's Replace method. The $0 is then treated as a reference to 0th matched group, i.e. the whole pattern. I suspect that it is the following line of code:
let path' = <@ Regex.Replace(%path, pattern, %value) @>
in the OperationCompiler.fs file. (Imagine parameter name being "id", pattern being "{id}" and value being, for example,"$0something"
.The text was updated successfully, but these errors were encountered: