Serverless-aws-文档 swagger 参数

Serverless-aws-documentation swagger parameters

当我使用 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更改为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