8000 Issue with parameters of type file in the client generator · Issue #320 · go-swagger/go-swagger · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Issue with parameters of type file in the client generator #320
Closed
@stoyanr

Description

@stoyanr

The client generator has an issue with parameters of type file. For example, for the following swagger spec:

  /services/{serviceId}/files:
    post:
      operationId: CreateServiceFiles
      consumes:
        - multipart/form-data
      parameters:
        - name: files
          in: formData
          required: true
          type: file

In the CreateServiceFilesParams struct, the field Files is of type os.File, but is later compared to nil. It should either be of type *os.File, or the nil comparison should not be there.

We need this for one of our projects at SAP. It seems to be a rather small and straightforward change, I would like to contribute a PR for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0