Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #9767
Closed
Open
Issue created Jun 14, 2021 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[BUG][aspnetcore] multi-file upload only presents one file

Created by: hauntingEcho

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Following the directions for "Upload via Multipart Requests" here generates a method only taking one file, instead of an array.

openapi-generator version

current master, docker image hash sha256:8d1bc0ad57397450b9a8a004c5f1d7a512a5e370f3e54837122d44d3fbd5da4b

OpenAPI declaration file content or url
openapi: 3.0.3
info:
  title: bug example
  version: 0.0.1
paths:
  /example:
    post:
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                filename:
                  type: array
                  items:
                    type: string
                    format: binary
      responses:
        '200':
          description: OK
Generation Details / Steps to reproduce
  1. Save the above file as example.yml
  2. Using docker-for-windows and git-bash, from the same folder as example.yml: MSYS_NO_PATHCONV=1 docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli@sha256:8d1bc0ad57397450b9a8a004c5f1d7a512a5e370f3e54837122d44d3fbd5da4b generate --input-spec "/local/example.yml" --output "/local/example" --generator-name aspnetcore
  3. cat example/src/Org.OpenAPITools/Controllers/DefaultApi.cs

expected: an array or collection of IFormFile as an argument in the generated function actual function signature is ExamplePost(IFormFile filename)

Assignee
Assign to
Time tracking