-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoiding a stage called "Stage" #1202
Comments
For reasons of backwards compatibility, the extra stage must continue to be created by default. However, the SAM team determined – once the new version of Open API became available – that explicitly specifying a version (even it was ‘2.0’) was a strong enough signal that the compatibility concerns had been considered. Backwards compatibility rules all, especially in this case. This behavior is documented in the SAM specification next to the definition of the
You cannot. In my opinion, it would be best to specify an Open API document version. |
@copumpkin like @chrisoverzero said, you can remove the stage We definitely can make this more clear in the documentation. I'll add a label to this issue to update our documentation. |
Hi there. I ran into this issue as well, and was not sure if the stage called I took the liberty to improve this myself. I created an issue and Pull Request in the If those changes get applied, maybe this issue can be closed. |
Relevant: #2077 |
I've noticed that my API Gateway deployments from SAM generate a stage called "Stage". It looks like that comes from this snippet of code:
https://github.com/awslabs/serverless-application-model/blob/2de2304916aadad3f5d6da5b29dce9f9eae081c3/samtranslator/model/api/api_generator.py#L172-L173
And oddly enough,
self.remove_extra_stage
is defined to matchopen_api_version
, but only seems to be treated for its truthiness. So basically, it seems like I specifyOpenApiVersion
in myServerless::Api
, the mysterious "Stage" stage doesn't get generated.Is that deliberate? The behavior seems surprising to me and it's unclear to me why specifying an openapi version would govern whether that stage gets created with a seemingly useless name. I see that line came from this PR but it doesn't explain why that behavior is desirable.
Could this behavior be clarified in documentation or exposed more directly to users with some sort of boolean to turn it off? I don't really care to specify my openapi version, but I don't want the extra stage, and it's unclear if I can do that today.
The text was updated successfully, but these errors were encountered: