Skip to content

Commit ef237ee

Browse files
Copilotcaptainsafia
andcommitted
Update snapshot tests for JsonPatchDocument content type
Co-authored-by: captainsafia <1857993+captainsafia@users.noreply.github.com>
1 parent 4c44635 commit ef237ee

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

src/OpenApi/sample/Sample.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<Reference Include="Microsoft.AspNetCore.StaticFiles" />
2323
<Reference Include="Microsoft.Extensions.FileProviders.Embedded" />
2424
<Reference Include="Microsoft.AspNetCore.Mvc" />
25+
<Reference Include="Microsoft.AspNetCore.JsonPatch.SystemTextJson" />
2526
</ItemGroup>
2627

2728
<ItemGroup>

src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApi3_0/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,28 @@
507507
}
508508
}
509509
}
510+
},
511+
"/schemas-by-ref/json-patch": {
512+
"patch": {
513+
"tags": [
514+
"Sample"
515+
],
516+
"requestBody": {
517+
"content": {
518+
"application/json-patch+json": {
519+
"schema": {
520+
"$ref": "#/components/schemas/JsonPatchDocumentOfParentObject"
521+
}
522+
}
523+
},
524+
"required": true
525+
},
526+
"responses": {
527+
"200": {
528+
"description": "OK"
529+
}
530+
}
531+
}
510532
}
511533
},
512534
"components": {
@@ -593,6 +615,7 @@
593615
}
594616
}
595617
},
618+
"JsonPatchDocumentOfParentObject": { },
596619
"LocationContainer": {
597620
"required": [
598621
"location"

src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApi3_1/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,28 @@
507507
}
508508
}
509509
}
510+
},
511+
"/schemas-by-ref/json-patch": {
512+
"patch": {
513+
"tags": [
514+
"Sample"
515+
],
516+
"requestBody": {
517+
"content": {
518+
"application/json-patch+json": {
519+
"schema": {
520+
"$ref": "#/components/schemas/JsonPatchDocumentOfParentObject"
521+
}
522+
}
523+
},
524+
"required": true
525+
},
526+
"responses": {
527+
"200": {
528+
"description": "OK"
529+
}
530+
}
531+
}
510532
}
511533
},
512534
"components": {
@@ -593,6 +615,7 @@
593615
}
594616
}
595617
},
618+
"JsonPatchDocumentOfParentObject": { },
596619
"LocationContainer": {
597620
"required": [
598621
"location"

0 commit comments

Comments
 (0)