admin管理员组文章数量:1356279
I have a serverless.yaml file using the serverless framework. I have it including a models.yaml file since it is over 1,000 lines.it gives me an error that it is unable to merge. I have tried multiple different ways to include it. Is there any way to debug this?
Error: Cannot parse "serverless.yaml": cannot merge mappings; the provided source object is unacceptable in "/mnt/c/git/Hamlethub30-BE/serverless.yaml" (18:29) 15 | resources: 16 | Resources: 17 | # ${file(./models.yaml)} 18 | <<: ${file(models.yaml)} ----------------------------------^ 19 | NetworkingStack: 20 | Type: AWS::CloudFormation::Stack
the serverless code where this is happening
` resources: Resources:
${file(./models.yaml)}
<<: ${file(models.yaml)}
NetworkingStack:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: nested-stacks/networking.yaml
Parameters:
Service: ${self:service}
Stage: ${self:custom.stage}`
the top of the models.yaml file:
`SubscriptionRequestModel: Type: AWS::ApiGateway::Model Properties: RestApiId: !Ref ApiGatewayRestApi ContentType: application/json Name: SubscriptionRequest Schema: | { "type": "object", "properties": { "email": { "type": "string" }, "hubId": { "type": "string" }, "assets": { "type": "array", "items": { "type": "string" } }, "hash": { "type": "string" }, "token": { "type": "string" }, "source": { "type": "string" } }, "required": ["email", "hubId", "assets"] }
SubscriptionResponseModel: Type: AWS::ApiGateway::Model Properties: `
I have tried including this as a custom variable, as a list, etc. nothing appears to work
本文标签: unable to merge mappings in serverlessyaml fileStack Overflow
版权声明:本文标题:unable to merge mappings in serverless.yaml file - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743999412a2573584.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论