Skip to content

Commit c7ec372

Browse files
author
Andrew Omondi
committed
Final fixes
1 parent e318120 commit c7ec372

File tree

6 files changed

+7
-8
lines changed

6 files changed

+7
-8
lines changed

src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ public static OpenApiSchema CreateEnumTypeSchema(this ODataContext context, IEdm
324324
var enumFlagsExtension = new OpenApiEnumFlagsExtension
325325
{
326326
IsFlags = true,
327-
Style = "form"
327+
Style = "simple"
328328
};
329329
schema.Extensions.Add(enumFlagsExtension.Name, enumFlagsExtension);
330330
}

test/Microsoft.OpenAPI.OData.Reader.Tests/OpenApiExtensions/OpenApiEnumFlagsExtensionTests.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
44
// ------------------------------------------------------------
55

6-
using System;
76
using System.IO;
87
using Microsoft.OpenApi.Writers;
98
using Xunit;
@@ -72,7 +71,7 @@ public void WritesAllValues()
7271
// Arrange
7372
OpenApiEnumFlagsExtension extension = new() {
7473
IsFlags = true,
75-
Style = "form"
74+
Style = "simple"
7675
};
7776
using TextWriter sWriter = new StringWriter();
7877
OpenApiJsonWriter writer = new(sWriter);
@@ -85,6 +84,6 @@ public void WritesAllValues()
8584
Assert.True(extension.IsFlags);
8685
Assert.NotNull(extension.Style);
8786
Assert.Contains("\"isFlags\": true", result);
88-
Assert.Contains("\"style\": \"form\"", result);
87+
Assert.Contains("\"style\": \"simple\"", result);
8988
}
9089
}

test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27925,7 +27925,7 @@
2792527925
"type": "string",
2792627926
"x-ms-enum-flags": {
2792727927
"isFlags": true,
27928-
"style": "form"
27928+
"style": "simple"
2792927929
}
2793027930
},
2793127931
"Edm.Geography": {

test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.V2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19627,7 +19627,7 @@ definitions:
1962719627
type: string
1962819628
x-ms-enum-flags:
1962919629
isFlags: true
19630-
style: form
19630+
style: simple
1963119631
Edm.Geography:
1963219632
$ref: '#/definitions/Edm.Geometry'
1963319633
Edm.GeographyPoint:

test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31297,7 +31297,7 @@
3129731297
"type": "string",
3129831298
"x-ms-enum-flags": {
3129931299
"isFlags": true,
31300-
"style": "form"
31300+
"style": "simple"
3130131301
}
3130231302
},
3130331303
"Edm.Geography": {

test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/TripService.OpenApi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21807,7 +21807,7 @@ components:
2180721807
type: string
2180821808
x-ms-enum-flags:
2180921809
isFlags: true
21810-
style: form
21810+
style: simple
2181121811
Edm.Geography:
2181221812
$ref: '#/components/schemas/Edm.Geometry'
2181321813
Edm.GeographyPoint:

0 commit comments

Comments
 (0)