Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Reset `Stream` after copy.
  • Loading branch information
martincostello committed Feb 6, 2025
1 parent 94aad3e commit 8de4e48
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static void AddOpenApiFile(this ApiTestRunnerOptions options, string docu
using var memoryStream = new MemoryStream();

fileStream.CopyTo(memoryStream);
memoryStream.Seek(0, SeekOrigin.Begin);

var result = OpenApiDocument.Load(memoryStream);
options.OpenApiDocs.Add(documentName, result.Document);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"openapi": "3.0.1",
"openapi": "3.0.4",
"info": {
"title": "Test-first Example API (Generated)",
"version": "v1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"openapi": "3.0.1",
"openapi": "3.0.4",
"info": {
"title": "Test-first Example API (Imported)",
"version": "v1"
Expand Down

0 comments on commit 8de4e48

Please sign in to comment.