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
Template substitutions use JSONPath, which supports adding filters. Filters may include operators such as the equal sign. The underlying key-value utility will break on every = and ;
Processing 1 substitutions.
Processing substitution: $.Resources.*.[?(@.Type
Unknown error executing command: Path ended with open query.
at Newtonsoft.Json.Linq.JsonPath.JPath.EnsureLength(String message)
at Newtonsoft.Json.Linq.JsonPath.JPath.ParseSide()
at Newtonsoft.Json.Linq.JsonPath.JPath.ParseExpression()
at Newtonsoft.Json.Linq.JsonPath.JPath.ParseQuery(Char indexerCloseChar, Boolean scan)
at Newtonsoft.Json.Linq.JsonPath.JPath.ParsePath(List`1 filters, Int32 currentPartStartIndex, Boolean query)
at Newtonsoft.Json.Linq.JsonPath.JPath.ParseMain()
at Newtonsoft.Json.Linq.JToken.SelectToken(String path, Boolean errorWhenNoMatch)
at Amazon.Lambda.Tools.LambdaUtilities.ProcessTemplateSubstitions(IToolLogger logger, String templateBody, IDictionary`2 substitutions, String workingDirectory) in C:\codebuild\tmp\output\src181780091\src\src\Amazon.Lambda.Tools\LambdaUtilities.cs:line 139
at Amazon.Lambda.Tools.Commands.PackageCICommand.PerformActionAsync() in C:\codebuild\tmp\output\src181780091\src\src\Amazon.Lambda.Tools\Commands\PackageCICommand.cs:line 115
at Amazon.Common.DotNetCli.Tools.Commands.BaseCommand`1.ExecuteAsync() in C:\codebuild\tmp\output\src181780091\src\src\Amazon.Common.DotNetCli.Tools\Commands\BaseCommand.cs:line 46
thrownewToolsException($"Error parsing option ({option}), format should be <key1>=<value1>;<key2>=<value2>",ToolsException.CommonErrorCode.CommandLineParseError);
The text was updated successfully, but these errors were encountered:
lukeemery
changed the title
JsonPath
JSONPath not fully supported in CLI
Jan 2, 2022
Description
Template substitutions use JSONPath, which supports adding filters. Filters may include operators such as the equal sign. The underlying key-value utility will break on every = and ;
Reproduce using
dotnet lambda package-ci --output-template test.json --template-substitutions "$.Resources.*.[?(@.Type =~ 'AWS::Serverless::Function')].Properties=test"
Newtonsoft support doc: https://www.newtonsoft.com/json/help/html/QueryJsonSelectTokenJsonPath.htm
Stack Trace
Location
aws-extensions-for-dotnet-cli/src/Amazon.Lambda.Tools/Commands/PackageCICommand.cs
Line 120 in cdd4904
aws-extensions-for-dotnet-cli/src/Amazon.Common.DotNetCli.Tools/Commands/BaseCommand.cs
Line 435 in cdd4904
aws-extensions-for-dotnet-cli/src/Amazon.Common.DotNetCli.Tools/Utilities.cs
Lines 230 to 248 in cdd4904
The text was updated successfully, but these errors were encountered: