localstack / localstack/serverless-localstack

CREATE_FAILED: ApiGatewayMethodActionPost (AWS::ApiGateway::Method) - Invalid type for parameter selectionPattern

未關閉
#256 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

aws:apigateway status: backlog
主要語言
JavaScript
星號
542
分支
92
PR 合併指標
30 天內沒有已合併 PR

描述

I'm trying to deploy my serverless app on local stack but Invalid type parameter for selectionPattern error is being thrown. Below is the complete error and serverless.yml

Error:

ApiGatewayMethodActionPost (Parameter validation failed:; Invalid type for parameter selectionPattern, value: 200, type: <class 'int'>, valid types: <class 'str'>)

serverless.yml

  events:
    - http:
        path: /action
        method: POST
        iamRole: arn:aws:iam::xxxxxxxxxxxx:role/someRole
        action: StartSyncExecution
        request:
          template:
            application/json: |
              {
                "stateMachineArn":"arn:aws:states:'us-west-2':xxxxxxxxxxxx:stateMachine:someMachine",
                "input": "$util.escapeJavaScript($input.json('$'))"
              }
        response:
            template: 
              application/json: |
                $input.path('$.output')

I was checking serverless-step-function code where selectionPattern is defined as integer and not string. Following is the link to the code: code

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從報告中的 serverless.yml 設定開始,並將其與連結的 serverless-step-functions lib/deploy/events/apiGateway/methods.js 第 199 行程式碼進行比較。在 LocalStack 上重現部署,追蹤 selectionPattern 的產生方式,並透過驗證 API Gateway 方法能在沒有參數類型錯誤的情況下完成部署來確認修正有效。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
aws, javascript
領域
api, backend
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。