Skip to content

Commit bf2088b

Browse files
committed
Revert "Add User Agent to openapi spec"
This reverts commit d5f1355.
1 parent 838b3b1 commit bf2088b

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Common/Swagger/AttributeFilter.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
using Microsoft.AspNetCore.Authorization;
2-
using Microsoft.Net.Http.Headers;
3-
using Microsoft.OpenApi.Any;
42
using Microsoft.OpenApi.Models;
53
using OpenShock.Common.Authentication;
64
using OpenShock.Common.DataAnnotations.Interfaces;
@@ -36,15 +34,6 @@ public void Apply(OpenApiSchema schema, SchemaFilterContext context)
3634

3735
public void Apply(OpenApiOperation operation, OperationFilterContext context)
3836
{
39-
operation.Parameters.Add(new OpenApiParameter
40-
{
41-
Required = false,
42-
In = ParameterLocation.Header,
43-
Name = HeaderNames.UserAgent,
44-
AllowEmptyValue = false,
45-
Example = new OpenApiString("MyApiClient/1.0")
46-
});
47-
4837
// Apply OpenShock Parameter Attributes
4938
foreach (var attribute in context.MethodInfo?.GetCustomAttributes(true).OfType<IOperationAttribute>() ?? [])
5039
{

0 commit comments

Comments
 (0)