mirror of
https://github.com/bitwarden/server
synced 2026-02-12 14:33:49 +00:00
[deps] Billing: Update swashbuckle-aspnetcore monorepo to v10 (major) (#6729)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Derek Nance <dnance@bitwarden.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using Bit.SharedWeb.Swagger;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using Microsoft.OpenApi;
|
||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||
|
||||
namespace SharedWeb.Test;
|
||||
@@ -9,15 +9,18 @@ public class GitCommitDocumentFilterTest
|
||||
[Fact]
|
||||
public void AddsGitCommitExtensionIfAvailable()
|
||||
{
|
||||
var doc = new OpenApiDocument();
|
||||
var doc = new OpenApiDocument
|
||||
{
|
||||
Extensions = new Dictionary<string, IOpenApiExtension>()
|
||||
};
|
||||
var context = new DocumentFilterContext(null, null, null);
|
||||
var filter = new GitCommitDocumentFilter();
|
||||
filter.Apply(doc, context);
|
||||
|
||||
Assert.True(doc.Extensions.ContainsKey("x-git-commit"));
|
||||
var ext = doc.Extensions["x-git-commit"] as Microsoft.OpenApi.Any.OpenApiString;
|
||||
var ext = doc.Extensions["x-git-commit"] as JsonNodeExtension;
|
||||
Assert.NotNull(ext);
|
||||
Assert.False(string.IsNullOrEmpty(ext.Value));
|
||||
Assert.False(string.IsNullOrEmpty(ext.Node.ToString()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user