Skip to content

Commit b13f08c

Browse files
committed
Update public api interface and refactor tests
1 parent d56a025 commit b13f08c

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,13 @@ public void SerializeOperationWithBodyAsV3JsonWorks()
334334
""parameters"": [
335335
{
336336
""name"": ""parameter1"",
337-
""in"": ""path""
337+
""in"": ""path"",
338+
""style"": ""simple""
338339
},
339340
{
340341
""name"": ""parameter2"",
341-
""in"": ""header""
342+
""in"": ""header"",
343+
""style"": ""simple""
342344
}
343345
],
344346
""requestBody"": {
@@ -407,11 +409,13 @@ public void SerializeAdvancedOperationWithTagAndSecurityAsV3JsonWorks()
407409
""parameters"": [
408410
{
409411
""name"": ""parameter1"",
410-
""in"": ""path""
412+
""in"": ""path"",
413+
""style"": ""simple""
411414
},
412415
{
413416
""name"": ""parameter2"",
414-
""in"": ""header""
417+
""in"": ""header"",
418+
""style"": ""simple""
415419
}
416420
],
417421
""requestBody"": {
@@ -501,6 +505,7 @@ public void SerializeOperationWithFormDataAsV3JsonWorks()
501505
""in"": ""path"",
502506
""description"": ""ID of pet that needs to be updated"",
503507
""required"": true,
508+
""style"": ""simple"",
504509
""schema"": {
505510
""type"": ""string""
506511
}

test/Microsoft.OpenApi.Tests/Models/OpenApiParameterTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

44
using System.Collections.Generic;
@@ -208,7 +208,8 @@ public void SerializeBasicParameterAsV3JsonWorks()
208208
// Arrange
209209
var expected = @"{
210210
""name"": ""name1"",
211-
""in"": ""path""
211+
""in"": ""path"",
212+
""style"": ""simple""
212213
}";
213214

214215
// Act

test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@ namespace Microsoft.OpenApi.Models
719719
}
720720
public class OpenApiParameter : Microsoft.OpenApi.Interfaces.IEffective<Microsoft.OpenApi.Models.OpenApiParameter>, Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable
721721
{
722+
public Microsoft.OpenApi.Models.ParameterStyle? _style;
722723
public OpenApiParameter() { }
723724
public OpenApiParameter(Microsoft.OpenApi.Models.OpenApiParameter parameter) { }
724725
public bool AllowEmptyValue { get; set; }

0 commit comments

Comments
 (0)