You want to use cloudformation directive like below. Basically stage variables are available in ApiGateway stage resources, in order to use them you attach the api gateway stage to deployment. This will give you ability to use same openapi definition to be used in multilple stages so you can point prod lambda functions to /prod api endpoint and dev to /dev api endpoint.
Also if you are using swagger file and need to reference stage variable with $ sign you will need to use variableSyntax: "\\${((?!stageVariables)[ ~:a-zA-Z0-9._'\",\\-\\/\\(\\)]+?)}" to pass $ to your swagger definition. And refer to stage var (say you have stage variable called Stage) in your swagger definition like so: x-amazon-apigateway-integration:uri: "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:174076265606:function:ha-content-syndication-lambda-${stageVariables.Stage}-images/invocations"
Love how Serverless is making all these enterprise software but haven’t create a solution for a problem that everyone using AWS in a true enterprise level is having.
It does work as detailed by @serkanh.
A method has to be added also, but the idea of putting the two stages and two deployments in the same Resources section works.
I was disappointed that serverless wouldn’t allow that in a more convenient way, but I realised that it made sense: they want each project and deploy to be completely independent. As api gateway is the only service that can handle multiple stage, they just ignored that feature and focused on independent convenient deployments.