Skip to content

Parameter generation error when model contains IFormFile #13

Description

@MarkJosephCabana

The generated method contains an extra Multipartitem param when you add an IFormFile property as the 1st property.
to replicate:
namespace TestWebApi.Models { public class SomeQueryModel { public IFormFile File { get; set; } //must be the first prop public string Param1 { get; set; } public Guid? Param2 { get; set; } public int Param3 { get; set; } } }

then the code generated will be something like:
[Multipart] [Post("/WeatherForecast/form")] Task WithFormParam(MultipartItem formParam = null, [Body(BodySerializationMethod.UrlEncoded)] SomeQueryModel formParam = null);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions