Семантическая ошибка в параметрах пути - PullRequest
0 голосов
/ 10 июля 2019

Я новичок в Swagger и исправляю некоторые ошибки, которые я получил после импорта файла .json в https://editor.swagger.io/, но получаю эту ошибку.

Объявленный параметр пути "PARAMETER"должен быть определен внутри каждой операции в пути (отсутствует в "get") или перемещен в объект параметров уровня пути

Вот часть, которая дает мне ошибку:

'/api/v1/images/{PARAMETER}/{type}':
    get:
      tags:
        - Images
      summary: 'summar'
      operationId: DownloadFIle
      consumes: []
      produces:
        - application/json
      parameters:
        - name: PARAMETER
          in: path
          required: true
          type: string
        - name: type
          in: path
          required: true
          type: string
      responses:
        '200':
          description: Success
          schema:
            uniqueItems: false
            type: array
            items:
              $ref: '#/definitions/CloudImageInfo'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
          schema:
            type: string
        '404':
          description: Not Found
          schema:
            type: string
        '500':
          description: Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
    post:
      tags:
        - Images
      summary: summary
      description: " description"
      operationId: UploadFile
      consumes:
        - multipart/form-data
      produces:
        - application/json
      parameters:
        - name: imageFiles
          in: formData
          required: false
          type: array
          items: {}
          collectionFormat: multi
          uniqueItems: false
        - name: PARAMETER
          in: path
          required: true
          type: string
        - name: type
          in: path
          required: true
          type: string
      responses:
        '201':
          description: Success
          schema:
            uniqueItems: false
            type: array
            items:
              $ref: '#/definitions/CloudImageInfo'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
          schema:
            type: string
        '500':
          description: Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'

Может кто-нибудь указать мне, где искать или что я могу исправить?

...