Skip to content

Commit

Permalink
Revert "Tighten substitution pattern for Fn::Sub (smithy-lang#842)"
Browse files Browse the repository at this point in the history
This reverts commit fd5731f.
  • Loading branch information
gosar committed Jul 9, 2021
1 parent 4b37343 commit 7f949f3
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ final class CloudFormationSubstitution implements ApiGatewayMapper {

private static final Logger LOGGER = Logger.getLogger(CloudFormationSubstitution.class.getName());
private static final String SUBSTITUTION_KEY = "Fn::Sub";
private static final Pattern SUBSTITUTION_PATTERN = Pattern.compile("\\$\\{[A-Za-z0-9.:]+}");
private static final Pattern SUBSTITUTION_PATTERN = Pattern.compile("\\$\\{.+}");

/**
* This is a hardcoded list of paths that are known to contain ARNs or identifiers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ public void pluginCanBeDisabled() {
.config(config)
.convertToNode(model);

Node.assertEquals(actual, expected);
Node.assertEquals(expected, actual);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@
"smithy.api#http": {
"uri": "/foo",
"method": "GET"
},
"aws.apigateway#integration": {
"httpMethod": "POST",
"payloadFormatVersion": "2.0",
"type": "aws_proxy",
"uri": "arn:${Token[AWS.Partition.9]}:apigateway:us-east-1:lambda:path/2015-03-31/functions/${Token[TOKEN.108]}/invocations"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
"200": {
"description": "MyOperation response"
}
},
"x-amazon-apigateway-integration": {
"httpMethod": "POST",
"payloadFormatVersion": "2.0",
"type": "aws_proxy",
"uri": "arn:${Token[AWS.Partition.9]}:apigateway:us-east-1:lambda:path/2015-03-31/functions/${Token[TOKEN.108]}/invocations"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
"200": {
"description": "MyOperation response"
}
},
"x-amazon-apigateway-integration": {
"httpMethod": "POST",
"payloadFormatVersion": "2.0",
"type": "aws_proxy",
"uri": "arn:${Token[AWS.Partition.9]}:apigateway:us-east-1:lambda:path/2015-03-31/functions/${Token[TOKEN.108]}/invocations"
}
}
}
Expand Down

0 comments on commit 7f949f3

Please sign in to comment.