无服务器aws的宣传参数



当我使用serverless openapi generate时,结果openapi.yaml不包含参数

我尝试了参数而不是Queryparams以及PathParams

functions:
  get:
    handler: retransmit/get.get
    events:
      - http:
          path: retransmit/{game_id}/{camera_id}
          method: get
          cors: true
          documentation:
            summary: "Fetch frame_id"
            description: "Fetch frame_id ranges for given grab_id and camera_id"
            queryParams:
              - name: "game_id"
                description: "app id"
                required: true
              - name: "camera_id"
                description: "user id or 'my'"
                required: true

错误:

Semantic error at paths./retransmit/{game_id}/{camera_id}
Declared path parameter "game_id" needs to be defined as a path parameter at either the path or operation level
Jump to line 27
Semantic error at paths./retransmit/{game_id}/{camera_id}
Declared path parameter "camera_id" needs to be defined as a path parameter at either the path or operation level
Jump to line 27

更改 QUERYPARAMS to PATHPARAMS

functions:
  get:
    handler: retransmit/get.get
    events:
      - http:
          path: retransmit/{game_id}/{camera_id}
          method: get
          cors: true
          documentation:
            summary: "Fetch frame_id"
            description: "Fetch frame_id ranges for given grab_id and camera_id"
            pathParams:
              - name: "game_id"
                description: "app id"
                required: true
              - name: "camera_id"
                description: "user id or 'my'"
                required: true

相关内容

  • 没有找到相关文章

最新更新