Open MarcioMeier opened 6 months ago
note: I kept this way because we are not really using the "stage" of the api gw as we create a whole new api for each stage, so I kept it "prod" because it's the default behavior. But if you think this can make things more sane, let's merge this one!
In the future one might want to create multiple "stages" for a single API entity, but we didn't thought of this construct doing this and we should have to break its interface probably, so let's keep this for later if needed.
Yes, I think we should let it more sane. In this case, it uses the api stage to build the URL, so it is nice that to keep the same stage as provide to the stack for the api gateway/url.
In a scenario that we will create multiple stages, it should be less impactful if we already are using the stage name as the stack stage
Summary
Currently we are creating the api in the api-gateway with the
prod
stage, because it is the default value. But we should match the api stage with theprops.stage
then we're really creating an staged api.The user can still override the
stageName
by passing it via construct's prop.