Skip to content

bug -extract-request-params generate request param only for second request #379

@0xdeface

Description

@0xdeface
/v2/products:
    post:
      consumes:
      - multipart/form-data
      description: '"Создание товара"'
      parameters:
      - in: formData
        name: article
        type: string
      - in: formData
        name: brand_id
        type: integer
      - in: formData
        name: code
        type: string
      - in: formData
        name: count
        type: number
      - in: formData
        name: description
        type: string
      - in: formData
        name: get_by_core
        type: boolean
      - in: formData
        name: hide
        type: boolean
      - in: formData
        name: image
        type: string
      - in: formData
        name: image_mini
        type: string
      - in: formData
        name: name
        type: string
      - in: formData
        name: parent_uuid
        type: string
      - in: formData
        name: price
        type: number
      - in: formData
        name: uuid
        type: string
      - in: formData
        name: volume
        type: number
      - in: formData
        name: volume_measure
        type: number
      - in: formData
        name: volume_measure_name
        type: string
      - in: formData
        name: weight
        type: number
      - in: formData
        name: weight_measure
        type: number
      - in: formData
        name: weight_measure_name
        type: string
      - description: изображение товара
        in: formData
        name: imageFile
        required: true
        type: file
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/handlers.SingleProductResponseV2'
  /v2/products/{uuid}:
    put:
      consumes:
      - multipart/form-data
      description: '"изменение товара"'
      parameters:
      - description: product uuid
        in: path
        name: uuid
        required: true
        type: string
      - in: formData
        name: article
        type: string
      - in: formData
        name: brand_id
        type: integer
      - in: formData
        name: code
        type: string
      - in: formData
        name: count
        type: number
      - in: formData
        name: description
        type: string
      - in: formData
        name: get_by_core
        type: boolean
      - in: formData
        name: hide
        type: boolean
      - in: formData
        name: image
        type: string
      - in: formData
        name: image_mini
        type: string
      - in: formData
        name: name
        type: string
      - in: formData
        name: parent_uuid
        type: string
      - in: formData
        name: price
        type: number
      - in: formData
        name: uuid
        type: string
      - in: formData
        name: volume
        type: number
      - in: formData
        name: volume_measure
        type: number
      - in: formData
        name: volume_measure_name
        type: string
      - in: formData
        name: weight
        type: number
      - in: formData
        name: weight_measure
        type: number
      - in: formData
        name: weight_measure_name
        type: string
      - description: изображение товара
        in: formData
        name: imageFile
        required: true
        type: file
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/handlers.SingleProductResponseV2'
  /**
    * @description "Создание товара"
    *
    * @name ProductsCreate
    * @request POST:/v2/products
    */
   productsCreate: (data: any, params: RequestParams = {}) =>
     this.request<HandlersSingleProductResponseV2, any>({
       path: `/v2/products`,
       method: "POST",
       body: data,
       type: ContentType.FormData,
       format: "json",
       ...params,
     }),
 /**
    * @description "изменение товара"
    *
    * @name ProductsUpdate
    * @request PUT:/v2/products/{uuid}
    */
   productsUpdate: (uuid: string, data: ProductsUpdatePayload, params: RequestParams = {}) =>
     this.request<HandlersSingleProductResponseV2, any>({
       path: `/v2/products/${uuid}`,
       method: "PUT",
       body: data,
       type: ContentType.FormData,
       format: "json",
       ...params,
     }),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions