localstack / localstack/serverless-localstack

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

オープン
#256 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

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. リポジトリをフォークし、ブランチを切って変更します。
  4. 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 を短くまとめたダイジェスト。