Skip to content

Commit 893f4e2

Browse files
committed
Fixes based on PR feedback
1 parent bed9b57 commit 893f4e2

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

src/Microsoft.OpenApi.Readers/V2/OpenApiHeaderDeserializer.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,6 @@ private static void LoadStyle(OpenApiHeader h, string v)
166166
return;
167167
case "tsv":
168168
throw new NotSupportedException();
169-
case "multi":
170-
h.Style = ParameterStyle.Form;
171-
h.Explode = true;
172-
return;
173169
}
174170
}
175171
}

test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiParameterTests.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

4+
using System.Collections.Generic;
45
using System.IO;
56
using FluentAssertions;
67
using Microsoft.OpenApi.Any;
@@ -145,11 +146,24 @@ public void ParseHeaderParameterShouldSucceed()
145146
Items = new OpenApiSchema
146147
{
147148
Type = "integer",
148-
Format = "int64"
149+
Format = "int64",
150+
Enum = new List<IOpenApiAny>
151+
{
152+
new OpenApiInteger(1),
153+
new OpenApiInteger(2),
154+
new OpenApiInteger(3),
155+
new OpenApiInteger(4),
156+
}
149157
},
150158
Default = new OpenApiArray() {
151159
new OpenApiInteger(1),
152160
new OpenApiInteger(2)
161+
},
162+
Enum = new List<IOpenApiAny>
163+
{
164+
new OpenApiArray() { new OpenApiInteger(1), new OpenApiInteger(2) },
165+
new OpenApiArray() { new OpenApiInteger(2), new OpenApiInteger(3) },
166+
new OpenApiArray() { new OpenApiInteger(3), new OpenApiInteger(4) }
153167
}
154168
}
155169
});

test/Microsoft.OpenApi.Readers.Tests/V2Tests/Samples/OpenApiParameter/headerParameter.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@ default: [1,2]
88
items:
99
type: integer
1010
format: int64
11-
collectionFormat: csv
11+
enum: [1,2,3,4]
12+
collectionFormat: csv
13+
enum:
14+
- [1,2]
15+
- [2,3]
16+
- [3,4]

0 commit comments

Comments
 (0)