Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi/Models/OpenApiParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public void SerializeAsV2WithoutReference(IOpenApiWriter writer)
else
{
writer.WriteProperty(OpenApiConstants.Name, Name);
writer.WriteProperty(OpenApiConstants.In, In.ToString());
writer.WriteProperty(OpenApiConstants.In, In.GetDisplayName());
}

// description
Expand Down
16 changes: 8 additions & 8 deletions test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1762,7 +1762,7 @@ public void SerializeAdvancedDocumentAsV2JsonWorks()
""parameters"": [
{
""name"": ""tags"",
""in"": ""Query"",
""in"": ""query"",
""description"": ""tags to filter by"",
""type"": ""array"",
""items"": {
Expand All @@ -1771,7 +1771,7 @@ public void SerializeAdvancedDocumentAsV2JsonWorks()
},
{
""name"": ""limit"",
""in"": ""Query"",
""in"": ""query"",
""description"": ""maximum number of results to return"",
""type"": ""integer"",
""format"": ""int32""
Expand Down Expand Up @@ -1954,7 +1954,7 @@ public void SerializeAdvancedDocumentAsV2JsonWorks()
""parameters"": [
{
""name"": ""id"",
""in"": ""Path"",
""in"": ""path"",
""description"": ""ID of pet to fetch"",
""required"": true,
""type"": ""integer"",
Expand Down Expand Up @@ -2033,7 +2033,7 @@ public void SerializeAdvancedDocumentAsV2JsonWorks()
""parameters"": [
{
""name"": ""id"",
""in"": ""Path"",
""in"": ""path"",
""description"": ""ID of pet to delete"",
""required"": true,
""type"": ""integer"",
Expand Down Expand Up @@ -2196,7 +2196,7 @@ public void SerializeAdvancedDocumentWithReferenceAsV2JsonWorks()
""parameters"": [
{
""name"": ""tags"",
""in"": ""Query"",
""in"": ""query"",
""description"": ""tags to filter by"",
""type"": ""array"",
""items"": {
Expand All @@ -2205,7 +2205,7 @@ public void SerializeAdvancedDocumentWithReferenceAsV2JsonWorks()
},
{
""name"": ""limit"",
""in"": ""Query"",
""in"": ""query"",
""description"": ""maximum number of results to return"",
""type"": ""integer"",
""format"": ""int32""
Expand Down Expand Up @@ -2289,7 +2289,7 @@ public void SerializeAdvancedDocumentWithReferenceAsV2JsonWorks()
""parameters"": [
{
""name"": ""id"",
""in"": ""Path"",
""in"": ""path"",
""description"": ""ID of pet to fetch"",
""required"": true,
""type"": ""integer"",
Expand Down Expand Up @@ -2326,7 +2326,7 @@ public void SerializeAdvancedDocumentWithReferenceAsV2JsonWorks()
""parameters"": [
{
""name"": ""id"",
""in"": ""Path"",
""in"": ""path"",
""description"": ""ID of pet to delete"",
""required"": true,
""type"": ""integer"",
Expand Down
8 changes: 4 additions & 4 deletions test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,11 @@ public void SerializeAdvancedOperationAsV2JsonWorks()
""parameters"": [
{
""name"": ""parameter1"",
""in"": ""Path""
""in"": ""path""
},
{
""name"": ""parameter2"",
""in"": ""Header""
""in"": ""header""
},
{
""name"": ""body"",
Expand Down Expand Up @@ -489,11 +489,11 @@ public void SerializeAdvancedOperationWithTagAndSecurityAsV2JsonWorks()
""parameters"": [
{
""name"": ""parameter1"",
""in"": ""Path""
""in"": ""path""
},
{
""name"": ""parameter2"",
""in"": ""Header""
""in"": ""header""
},
{
""name"": ""body"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void SerializeReferencedParameterAsV2JsonWithoutReferenceWorks()
var expected =
@"{
""name"": ""name1"",
""in"": ""Path""
""in"": ""path""
}";

// Act
Expand Down