Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ public class OpenApiTagReferenceTest

readonly OpenApiTagReference _openApiTagReference;
readonly OpenApiTagReference _openApiTagReference2;
readonly OpenApiDocument _openApiDocument;

public OpenApiTagReferenceTest()
{
var result = OpenApiDocument.Parse(OpenApi, "yaml", SettingsFixture.ReaderSettings);
_openApiDocument = result.Document;
_openApiTagReference = new("user", result.Document);
_openApiTagReference2 = new("users.user", result.Document);
}
Expand All @@ -77,6 +79,8 @@ public void TagReferenceResolutionWorks()
Assert.Equal("user", _openApiTagReference.Name);
Assert.Equal("Operations about users.", _openApiTagReference.Description);
Assert.True(_openApiTagReference2.UnresolvedReference);// the target is null
var operationTags = _openApiDocument.Paths["/users/{userId}"].Operations[OperationType.Get].Tags;
Assert.Null(operationTags); // the operation tags are not loaded due to the invalid syntax at the operation level(should be a list of strings)
}

[Theory]
Expand Down