Skip to content

Commit

Permalink
fix (Azure#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
olydis authored Nov 8, 2017
1 parent b356efa commit e524d5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Model/RequestBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public IEnumerable<SwaggerParameter> AsParameters()
{
if (asParamCache == null)
{
var isFormData = Content?.Keys?.FirstOrDefault() == "multipart/form-data" && Content.Values.First().Schema != null;
if (isFormData) // => in: form-data
Func<string, bool> isFormDataMimeType = type => type == "multipart/form-data" || type == "application/x-www-form-urlencoded";
if (isFormDataMimeType(Content?.Keys?.FirstOrDefault()) && Content.Values.First().Schema != null) // => in: formData
{
var schema = Content.Values.First().Schema;
asParamCache = schema.Properties.Select(prop =>
Expand Down

0 comments on commit e524d5b

Please sign in to comment.