簡體   English   中英

使用無服務器框架配置的 yaml 文件的架構不正確 - 需要一個字符串

[英]Incorrect schema for yaml file using Serverless Framework Configuration - expected a string

我正在為 serverless.yml 文件以及 VSCode 上的 yaml 插件使用無服務器框架配置和 aws,它說這是不正確的類型,需要一個字符串。

events:
      - cloudwatchEvent:
          name: ${self:custom.transcribeJobName.${self:provider.stage}}
          event:
            source:
              - 'aws.transcribe'
            detail-type:
              - 'Transcribe Job State Change'
            detail:
              TranscriptionJobStatus:
                - COMPLETED
                - FAILED

Serverless Framework no AWS events 的文檔根本沒有列出 AWS Transcribe。 我也嘗試谷歌搜索但找不到任何本地事件。

https://www.serverless.com/framework/docs/providers/aws/events

那么,您能否分享您正在關注哪些文檔或博客來實施您的解決方案?

在我的提要中得到這個,錯誤來自無服務器 json-schema,它並不總是最新的,因為它不是由同一個團隊維護的。 我已經為無服務器 json 模式和無服務器類型創建了 PR,以便從源頭上解決這個問題。 它顯然不徹底和完整,但我雲所做的最好的。

https://github.com/lalcebo/json-schema/pull/13 https://github.com/DefinitelyTyped/DefinitelyTyped/pull/59966

編輯:- 模式已更新,vscode 應該在重啟時停止抱怨。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM