You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Auth works only with inline Swagger specified in 'DefinitionBody' property.
It seems that this has already been discussed in 2021, but it is still appearing the the latest SAM.
sam validate treats Auth and DefinitionUri as invalid for resource AWS::Serverless::Api.
Has this issue been solved or is it still ongoing? Seems like there were patches in place to address this.
Hi @kirill-andr, thanks for opening the issue. Do you have a link to the previous discussion you mentioned? Let me check with the team what's the right behavior here.
Hi, using Auth with DefinitionUri is an existing limitation, as the template would need to be fully transformed before Cloudformation can utilize the authorizers. This is apart of the reason why DefinitionBody is recommended, however in the context of sam validate, SAM CLI does not currently resolve the transform intrinsic locally.
When using DefinitionBody, you can use sam validate --lint to validate the rest of the template contents, but this will not validate the API definition file contents.
I can mark this as a feature request in the mean time.
Description:
Error: Auth works only with inline Swagger specified in 'DefinitionBody' property.
It seems that this has already been discussed in 2021, but it is still appearing the the latest SAM.
sam
validate
treats Auth and DefinitionUri as invalid for resource AWS::Serverless::Api.Has this issue been solved or is it still ongoing? Seems like there were patches in place to address this.
Steps to reproduce:
This will throw an error:
This will not:
Observed result:
sam
validate
warns:"Auth works only with inline Swagger specified in 'DefinitionBody' property."
Expected result:
SAM should validate the template with API definition included as DefinitionUri as well as DefinitionBody. Especially if both refer to local file.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: 1.12.0The text was updated successfully, but these errors were encountered: