Skip to content

Commit eb2bd00

Browse files
authored
Merge pull request #305 from nanotaboada/dependabot/nuget/src/Dotnet.Samples.AspNetCore.WebApi/Swashbuckle.AspNetCore-10.0.1
chore(deps): Bump Swashbuckle.AspNetCore from 8.1.4 to 10.0.1
2 parents a046300 + be1d022 commit eb2bd00

File tree

6 files changed

+74
-83
lines changed

6 files changed

+74
-83
lines changed

src/Dotnet.Samples.AspNetCore.WebApi/Configurations/AuthorizeCheckOperationFilter.cs

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Linq;
22
using Microsoft.AspNetCore.Authorization;
3-
using Microsoft.OpenApi.Models;
3+
using Microsoft.OpenApi;
44
using Swashbuckle.AspNetCore.SwaggerGen;
55

66
namespace Dotnet.Samples.AspNetCore.WebApi.Configurations
@@ -25,23 +25,17 @@ public void Apply(OpenApiOperation operation, OperationFilterContext context)
2525
return;
2626

2727
// Add security requirement (shows the lock icon)
28-
operation.Security ??= new List<OpenApiSecurityRequirement>();
29-
operation.Security.Add(
30-
new OpenApiSecurityRequirement
31-
{
28+
// In Microsoft.OpenApi 2.x, use OpenApiSecuritySchemeReference instead of OpenApiSecurityScheme with nested Reference
29+
if (operation is OpenApiOperation openApiOperation)
30+
{
31+
openApiOperation.Security ??= new List<OpenApiSecurityRequirement>();
32+
openApiOperation.Security.Add(
33+
new OpenApiSecurityRequirement
3234
{
33-
new OpenApiSecurityScheme
34-
{
35-
Reference = new OpenApiReference
36-
{
37-
Id = "Bearer",
38-
Type = ReferenceType.SecurityScheme
39-
}
40-
},
41-
Array.Empty<string>()
35+
{ new OpenApiSecuritySchemeReference("Bearer", null), new List<string>() }
4236
}
43-
}
44-
);
37+
);
38+
}
4539
}
4640
}
4741
}

src/Dotnet.Samples.AspNetCore.WebApi/Dotnet.Samples.AspNetCore.WebApi.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<PackageReference Include="Serilog.Settings.Configuration" Version="10.0.0" />
2424
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
2525
<PackageReference Include="Serilog.Sinks.File" Version="7.0.0" />
26-
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.4" />
26+
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.0.1" />
2727
</ItemGroup>
2828

2929
<ItemGroup>

src/Dotnet.Samples.AspNetCore.WebApi/Extensions/ServiceCollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using Dotnet.Samples.AspNetCore.WebApi.Validators;
99
using FluentValidation;
1010
using Microsoft.EntityFrameworkCore;
11-
using Microsoft.OpenApi.Models;
11+
using Microsoft.OpenApi;
1212
using Serilog;
1313

1414
namespace Dotnet.Samples.AspNetCore.WebApi.Extensions;

src/Dotnet.Samples.AspNetCore.WebApi/Utilities/SwaggerUtilities.cs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using System.Reflection;
2-
using Microsoft.OpenApi.Models;
2+
using Microsoft.OpenApi;
33

44
namespace Dotnet.Samples.AspNetCore.WebApi.Utilities;
55

@@ -58,17 +58,7 @@ public static OpenApiSecurityRequirement ConfigureSecurityRequirement()
5858
{
5959
return new OpenApiSecurityRequirement
6060
{
61-
{
62-
new OpenApiSecurityScheme
63-
{
64-
Reference = new OpenApiReference
65-
{
66-
Id = "Bearer",
67-
Type = ReferenceType.SecurityScheme
68-
}
69-
},
70-
Array.Empty<string>()
71-
}
61+
{ new OpenApiSecuritySchemeReference("Bearer", null), new List<string>() }
7262
};
7363
}
7464
}

src/Dotnet.Samples.AspNetCore.WebApi/packages.lock.json

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,14 @@
160160
},
161161
"Swashbuckle.AspNetCore": {
162162
"type": "Direct",
163-
"requested": "[8.1.4, )",
164-
"resolved": "8.1.4",
165-
"contentHash": "qYk8VHyvs6wML+KXtjyCgS9Aj18mcm0ZtnJeNCTlj/DYQ7A3pfLIztQgLuZS/LEMYsrTo1lSKR3IIZ5/HzVCWA==",
163+
"requested": "[10.0.1, )",
164+
"resolved": "10.0.1",
165+
"contentHash": "177+JNAV5TNvy8gLCdrcWBY9n2jdkxiHQDY4vhaExeqUpKrOqDatCcm/kW3kze60GqfnZ2NobD/IKiAPOL+CEw==",
166166
"dependencies": {
167-
"Microsoft.Extensions.ApiDescription.Server": "6.0.5",
168-
"Swashbuckle.AspNetCore.Swagger": "8.1.4",
169-
"Swashbuckle.AspNetCore.SwaggerGen": "8.1.4",
170-
"Swashbuckle.AspNetCore.SwaggerUI": "8.1.4"
167+
"Microsoft.Extensions.ApiDescription.Server": "8.0.0",
168+
"Swashbuckle.AspNetCore.Swagger": "10.0.1",
169+
"Swashbuckle.AspNetCore.SwaggerGen": "10.0.1",
170+
"Swashbuckle.AspNetCore.SwaggerUI": "10.0.1"
171171
}
172172
},
173173
"Humanizer": {
@@ -850,8 +850,8 @@
850850
},
851851
"Microsoft.Extensions.ApiDescription.Server": {
852852
"type": "Transitive",
853-
"resolved": "6.0.5",
854-
"contentHash": "Ckb5EDBUNJdFWyajfXzUIMRkhf52fHZOQuuZg/oiu8y7zDCVwD0iHhew6MnThjHmevanpxL3f5ci2TtHQEN6bw=="
853+
"resolved": "8.0.0",
854+
"contentHash": "jDM3a95WerM8g6IcMiBXq1qRS9dqmEUpgnCk2DeMWpPkYtp1ia+CkXabOnK93JmhVlUmv8l9WMPsCSUm+WqkIA=="
855855
},
856856
"Microsoft.Extensions.Caching.Abstractions": {
857857
"type": "Transitive",
@@ -1018,8 +1018,11 @@
10181018
},
10191019
"Microsoft.OpenApi": {
10201020
"type": "Transitive",
1021-
"resolved": "1.6.23",
1022-
"contentHash": "tZ1I0KXnn98CWuV8cpI247A17jaY+ILS9vvF7yhI0uPPEqF4P1d7BWL5Uwtel10w9NucllHB3nTkfYTAcHAh8g=="
1021+
"resolved": "2.3.0",
1022+
"contentHash": "5RZpjyt0JMmoc/aEgY9c1vE5pusdDGvkPl9qKIy9KFbRiIXD+w7gBJxX+unSjzzOcfgRoYxnO4okZyqDAL2WEw==",
1023+
"dependencies": {
1024+
"System.Text.Json": "8.0.5"
1025+
}
10231026
},
10241027
"Microsoft.VisualStudio.Web.CodeGeneration": {
10251028
"type": "Transitive",
@@ -1335,24 +1338,24 @@
13351338
},
13361339
"Swashbuckle.AspNetCore.Swagger": {
13371340
"type": "Transitive",
1338-
"resolved": "8.1.4",
1339-
"contentHash": "w83aYEBJYNa6ZYomziwZWwXhqQPLKhZH0n8MzqqNhF1ElCGBKm71kd7W6pgIr/yu0i6ymQzrZUFSZLdvH1kY5w==",
1341+
"resolved": "10.0.1",
1342+
"contentHash": "HJYFSP18YF1Z6LCwunL+v8wuZUzzvcjarB8AJna/NVVIpq11FH9BW/D/6abwigu7SsKRbisStmk8xu2mTsxxHg==",
13401343
"dependencies": {
1341-
"Microsoft.OpenApi": "1.6.23"
1344+
"Microsoft.OpenApi": "2.3.0"
13421345
}
13431346
},
13441347
"Swashbuckle.AspNetCore.SwaggerGen": {
13451348
"type": "Transitive",
1346-
"resolved": "8.1.4",
1347-
"contentHash": "aBwO2MF1HHAaWgdBwX8tlSqxycOKTKmCT6pEpb0oSY1pn7mUdmzJvHZA0HxWx9nfmKP0eOGQcLC9ZnN/MuehRQ==",
1349+
"resolved": "10.0.1",
1350+
"contentHash": "vMMBDiTC53KclPs1aiedRZnXkoI2ZgF5/JFr3Dqr8KT7wvIbA/MwD+ormQ4qf25gN5xCrJbmz/9/Z3RrpSofMA==",
13481351
"dependencies": {
1349-
"Swashbuckle.AspNetCore.Swagger": "8.1.4"
1352+
"Swashbuckle.AspNetCore.Swagger": "10.0.1"
13501353
}
13511354
},
13521355
"Swashbuckle.AspNetCore.SwaggerUI": {
13531356
"type": "Transitive",
1354-
"resolved": "8.1.4",
1355-
"contentHash": "mTn6OwB43ETrN6IgAZd7ojWGhTwBZ98LT3QwbAn6Gg3wJStQV4znU0mWiHaKFlD/+Qhj1uhAUOa52rmd6xmbzg=="
1357+
"resolved": "10.0.1",
1358+
"contentHash": "a2eLI/fCxJ3WH+H1hr7Q2T82ZBk20FfqYBEZ9hOr3f+426ZUfGU2LxYWzOJrf5/4y6EKShmWpjJG01h3Rc+l6Q=="
13561359
},
13571360
"System.CodeDom": {
13581361
"type": "Transitive",

test/Dotnet.Samples.AspNetCore.WebApi.Tests/packages.lock.json

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@
165165
},
166166
"Microsoft.Extensions.ApiDescription.Server": {
167167
"type": "Transitive",
168-
"resolved": "6.0.5",
169-
"contentHash": "Ckb5EDBUNJdFWyajfXzUIMRkhf52fHZOQuuZg/oiu8y7zDCVwD0iHhew6MnThjHmevanpxL3f5ci2TtHQEN6bw=="
168+
"resolved": "8.0.0",
169+
"contentHash": "jDM3a95WerM8g6IcMiBXq1qRS9dqmEUpgnCk2DeMWpPkYtp1ia+CkXabOnK93JmhVlUmv8l9WMPsCSUm+WqkIA=="
170170
},
171171
"Microsoft.Extensions.Caching.Abstractions": {
172172
"type": "Transitive",
@@ -207,10 +207,11 @@
207207
},
208208
"Microsoft.Extensions.Configuration.Binder": {
209209
"type": "Transitive",
210-
"resolved": "9.0.0",
211-
"contentHash": "RiScL99DcyngY9zJA2ROrri7Br8tn5N4hP4YNvGdTN/bvg1A3dwvDOxHnNZ3Im7x2SJ5i4LkX1uPiR/MfSFBLQ==",
210+
"resolved": "10.0.0",
211+
"contentHash": "tMF9wNh+hlyYDWB8mrFCQHQmWHlRosol1b/N2Jrefy1bFLnuTlgSYmPyHNmz8xVQgs7DpXytBRWxGhG+mSTp0g==",
212212
"dependencies": {
213-
"Microsoft.Extensions.Configuration.Abstractions": "9.0.0"
213+
"Microsoft.Extensions.Configuration": "10.0.0",
214+
"Microsoft.Extensions.Configuration.Abstractions": "10.0.0"
214215
}
215216
},
216217
"Microsoft.Extensions.Configuration.FileExtensions": {
@@ -252,11 +253,11 @@
252253
},
253254
"Microsoft.Extensions.DependencyModel": {
254255
"type": "Transitive",
255-
"resolved": "9.0.11",
256-
"contentHash": "DaBLlKcD5AYFLEeX7M07Q0vWOEBd86KYXOb+5ZRdQ1jYtN39cJd6fftxdNbRazEYQc9QqsAZiqKb9ub0gA+q+Q==",
256+
"resolved": "10.0.0",
257+
"contentHash": "RFYJR7APio/BiqdQunRq6DB+nDB6nc2qhHr77mlvZ0q0BT8PubMXN7XicmfzCbrDE/dzhBnUKBRXLTcqUiZDGg==",
257258
"dependencies": {
258-
"System.Text.Encodings.Web": "9.0.11",
259-
"System.Text.Json": "9.0.11"
259+
"System.Text.Encodings.Web": "10.0.0",
260+
"System.Text.Json": "10.0.0"
260261
}
261262
},
262263
"Microsoft.Extensions.Diagnostics.Abstractions": {
@@ -339,8 +340,11 @@
339340
},
340341
"Microsoft.OpenApi": {
341342
"type": "Transitive",
342-
"resolved": "1.6.23",
343-
"contentHash": "tZ1I0KXnn98CWuV8cpI247A17jaY+ILS9vvF7yhI0uPPEqF4P1d7BWL5Uwtel10w9NucllHB3nTkfYTAcHAh8g=="
343+
"resolved": "2.3.0",
344+
"contentHash": "5RZpjyt0JMmoc/aEgY9c1vE5pusdDGvkPl9qKIy9KFbRiIXD+w7gBJxX+unSjzzOcfgRoYxnO4okZyqDAL2WEw==",
345+
"dependencies": {
346+
"System.Text.Json": "8.0.5"
347+
}
344348
},
345349
"Microsoft.TestPlatform.ObjectModel": {
346350
"type": "Transitive",
@@ -366,8 +370,8 @@
366370
},
367371
"Serilog": {
368372
"type": "Transitive",
369-
"resolved": "4.2.0",
370-
"contentHash": "gmoWVOvKgbME8TYR+gwMf7osROiWAURterc6Rt2dQyX7wtjZYpqFiA/pY6ztjGQKKV62GGCyOcmtP1UKMHgSmA=="
373+
"resolved": "4.3.0",
374+
"contentHash": "+cDryFR0GRhsGOnZSKwaDzRRl4MupvJ42FhCE4zhQRVanX0Jpg6WuCBk59OVhVDPmab1bB+nRykAnykYELA9qQ=="
371375
},
372376
"Serilog.AspNetCore": {
373377
"type": "Transitive",
@@ -414,12 +418,12 @@
414418
},
415419
"Serilog.Settings.Configuration": {
416420
"type": "Transitive",
417-
"resolved": "9.0.0",
418-
"contentHash": "4/Et4Cqwa+F88l5SeFeNZ4c4Z6dEAIKbu3MaQb2Zz9F/g27T5a3wvfMcmCOaAiACjfUb4A6wrlTVfyYUZk3RRQ==",
421+
"resolved": "10.0.0",
422+
"contentHash": "LNq+ibS1sbhTqPV1FIE69/9AJJbfaOhnaqkzcjFy95o+4U+STsta9mi97f1smgXsWYKICDeGUf8xUGzd/52/uA==",
419423
"dependencies": {
420-
"Microsoft.Extensions.Configuration.Binder": "9.0.0",
421-
"Microsoft.Extensions.DependencyModel": "9.0.0",
422-
"Serilog": "4.2.0"
424+
"Microsoft.Extensions.Configuration.Binder": "10.0.0",
425+
"Microsoft.Extensions.DependencyModel": "10.0.0",
426+
"Serilog": "4.3.0"
423427
}
424428
},
425429
"Serilog.Sinks.Console": {
@@ -478,35 +482,35 @@
478482
},
479483
"Swashbuckle.AspNetCore": {
480484
"type": "Transitive",
481-
"resolved": "8.1.4",
482-
"contentHash": "qYk8VHyvs6wML+KXtjyCgS9Aj18mcm0ZtnJeNCTlj/DYQ7A3pfLIztQgLuZS/LEMYsrTo1lSKR3IIZ5/HzVCWA==",
485+
"resolved": "10.0.1",
486+
"contentHash": "177+JNAV5TNvy8gLCdrcWBY9n2jdkxiHQDY4vhaExeqUpKrOqDatCcm/kW3kze60GqfnZ2NobD/IKiAPOL+CEw==",
483487
"dependencies": {
484-
"Microsoft.Extensions.ApiDescription.Server": "6.0.5",
485-
"Swashbuckle.AspNetCore.Swagger": "8.1.4",
486-
"Swashbuckle.AspNetCore.SwaggerGen": "8.1.4",
487-
"Swashbuckle.AspNetCore.SwaggerUI": "8.1.4"
488+
"Microsoft.Extensions.ApiDescription.Server": "8.0.0",
489+
"Swashbuckle.AspNetCore.Swagger": "10.0.1",
490+
"Swashbuckle.AspNetCore.SwaggerGen": "10.0.1",
491+
"Swashbuckle.AspNetCore.SwaggerUI": "10.0.1"
488492
}
489493
},
490494
"Swashbuckle.AspNetCore.Swagger": {
491495
"type": "Transitive",
492-
"resolved": "8.1.4",
493-
"contentHash": "w83aYEBJYNa6ZYomziwZWwXhqQPLKhZH0n8MzqqNhF1ElCGBKm71kd7W6pgIr/yu0i6ymQzrZUFSZLdvH1kY5w==",
496+
"resolved": "10.0.1",
497+
"contentHash": "HJYFSP18YF1Z6LCwunL+v8wuZUzzvcjarB8AJna/NVVIpq11FH9BW/D/6abwigu7SsKRbisStmk8xu2mTsxxHg==",
494498
"dependencies": {
495-
"Microsoft.OpenApi": "1.6.23"
499+
"Microsoft.OpenApi": "2.3.0"
496500
}
497501
},
498502
"Swashbuckle.AspNetCore.SwaggerGen": {
499503
"type": "Transitive",
500-
"resolved": "8.1.4",
501-
"contentHash": "aBwO2MF1HHAaWgdBwX8tlSqxycOKTKmCT6pEpb0oSY1pn7mUdmzJvHZA0HxWx9nfmKP0eOGQcLC9ZnN/MuehRQ==",
504+
"resolved": "10.0.1",
505+
"contentHash": "vMMBDiTC53KclPs1aiedRZnXkoI2ZgF5/JFr3Dqr8KT7wvIbA/MwD+ormQ4qf25gN5xCrJbmz/9/Z3RrpSofMA==",
502506
"dependencies": {
503-
"Swashbuckle.AspNetCore.Swagger": "8.1.4"
507+
"Swashbuckle.AspNetCore.Swagger": "10.0.1"
504508
}
505509
},
506510
"Swashbuckle.AspNetCore.SwaggerUI": {
507511
"type": "Transitive",
508-
"resolved": "8.1.4",
509-
"contentHash": "mTn6OwB43ETrN6IgAZd7ojWGhTwBZ98LT3QwbAn6Gg3wJStQV4znU0mWiHaKFlD/+Qhj1uhAUOa52rmd6xmbzg=="
512+
"resolved": "10.0.1",
513+
"contentHash": "a2eLI/fCxJ3WH+H1hr7Q2T82ZBk20FfqYBEZ9hOr3f+426ZUfGU2LxYWzOJrf5/4y6EKShmWpjJG01h3Rc+l6Q=="
510514
},
511515
"System.Collections.Immutable": {
512516
"type": "Transitive",
@@ -605,10 +609,10 @@
605609
"Microsoft.EntityFrameworkCore.Sqlite": "[9.0.11, )",
606610
"Microsoft.Extensions.Configuration.Json": "[10.0.0, )",
607611
"Serilog.AspNetCore": "[9.0.0, )",
608-
"Serilog.Settings.Configuration": "[9.0.0, )",
612+
"Serilog.Settings.Configuration": "[10.0.0, )",
609613
"Serilog.Sinks.Console": "[6.1.1, )",
610614
"Serilog.Sinks.File": "[7.0.0, )",
611-
"Swashbuckle.AspNetCore": "[8.1.4, )"
615+
"Swashbuckle.AspNetCore": "[10.0.1, )"
612616
}
613617
}
614618
}

0 commit comments

Comments
 (0)