[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
- Save the above file as
example.yml
- 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
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)