just a heads-up, though this is probably more of a...
# help
s
just a heads-up, though this is probably more of a bug with CloudFormation: you can’t change route parameters, e.g.
GET /things/{id}
to
GET /things/{thingId}
. you’ll get an error saying the route already exists.. so it seems you have to fully remove that route, deploy, add it back in, and deploy again
I can see why it does this.. it doesn’t understand I’m modifying the route, it thinks I’m making a new one
f
Thats right @Sam Hulick. It doesnt seem like the CFN team is going to fix this. So as a framework, SST should ideally detect this, removes the old route and then add a new one. What do you think @thdxr?
t
Can we generate an ID for the construct that hashes the path? That way changes to it will create a new construct
I haven't actually looked into how the Api construct works
f
You mean creating a new API project replacing the old one?
a
Yeah, I stumbled upon this a few months back, figured it was a Cfn problem so didn’t think much about it.
While it makes sense that sst could handle it internally, this improvement goes into debatable territory because we’re modifying Cfn behaviour from what is expected.