localstack / localstack/serverless-localstack

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

Đang mở
#256 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

aws:apigateway status: backlog
Ngôn ngữ chính
JavaScript
Star
542
Fork
92
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với cấu hình serverless.yml trong báo cáo và so sánh cấu hình đó với mã được liên kết của serverless-step-functions lib/deploy/events/apiGateway/methods.js tại dòng 199. Tái hiện việc triển khai trên LocalStack, theo dõi cách selectionPattern được tạo và xác nhận bản sửa bằng cách kiểm tra rằng phương thức API Gateway được triển khai mà không gặp lỗi kiểu tham số.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
aws, javascript
Lĩnh vực
api, backend
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.