3

YAML で Swagger 仕様を書いていますが、あいまいなエラーが発生します。私は正しいと思うパスと定義をマッピングしましたが、このエラーの意味がわかりません:

YAML 構文エラー 明示的なマッピング ペアが不完全です。行 66、列 30 にキー ノードがありません: format: int64schema: ^t

行:

 Line 65:         type: integer
 Line 66:         format: int64

スワガー:

  /product/{productId}:
    get:
      tags:
        - content
      summary: Find product item by ID
      description: Returns a product item when ID < 10.  ID > 10 or nonintegers will simulate API error conditions
      operationId: getProductItemByID
      produces:
        - application/json
        - application/xml
      parameters:
        - in: path
          name: productId
          description: ID of menu item that needs to be fetched
          required: true
          type: integer
          format: int64
          schema:
            $ref: "#/definitions/Product"
      responses:
        "404":
          description: Product item not found
        "200":
          description: successful operation
          schema:
            $ref: "#/definitions/Product"
        "400":
          description: Invalid ID supplied
      security:
        - api_key: []
        - my_auth:
          - write
          - read

次に、定義のswaggerファイルの下部に:

definitions:

  Product:
    type: object
    properties:
      id:
        type: integer
        format: int64
      category:
        $ref: '#/definitions/Category'
      name:
        type: string
      detail:
        type: string
4

1 に答える 1