diff --git a/test/Microsoft.OpenApi.Tests/Services/OpenApiUrlTreeNodeTests.cs b/test/Microsoft.OpenApi.Tests/Services/OpenApiUrlTreeNodeTests.cs index 511c6c5bd..76e1c5f31 100644 --- a/test/Microsoft.OpenApi.Tests/Services/OpenApiUrlTreeNodeTests.cs +++ b/test/Microsoft.OpenApi.Tests/Services/OpenApiUrlTreeNodeTests.cs @@ -466,5 +466,23 @@ public async Task VerifyDiagramFromSampleOpenAPI() await Verifier.Verify(diagram); } + + [Fact] + public void SupportsTrailingSlashesInPath() + { + var openApiDocument = new OpenApiDocument + { + Paths = new() + { + ["/cars/{car-id}/build/"] = new() + } + }; + + var label1 = "trailing-slash"; + var rootNode = OpenApiUrlTreeNode.Create(openApiDocument, label1); + var buildNode = rootNode.Children["cars"].Children["{car-id}"].Children["build"]; + + // Should buildNode have a path of "build/" or should it have a child with an empty string key? + } } }