diff --git a/ArchiSteamFarm/IPC/Integration/CustomAttributesSchemaFilter.cs b/ArchiSteamFarm/IPC/Integration/CustomAttributesSchemaFilter.cs index 07195c69e..0ca57ef90 100644 --- a/ArchiSteamFarm/IPC/Integration/CustomAttributesSchemaFilter.cs +++ b/ArchiSteamFarm/IPC/Integration/CustomAttributesSchemaFilter.cs @@ -37,11 +37,17 @@ namespace ArchiSteamFarm.IPC.Integration { throw new ArgumentNullException(nameof(context)); } - if (context.MemberInfo == null) { + ICustomAttributeProvider customSwaggerAttributes; + + if (context.MemberInfo != null) { + customSwaggerAttributes = context.MemberInfo; + } else if (context.ParameterInfo != null) { + customSwaggerAttributes = context.ParameterInfo; + } else { return; } - foreach (CustomSwaggerAttribute customSwaggerAttribute in context.MemberInfo.GetCustomAttributes()) { + foreach (CustomSwaggerAttribute customSwaggerAttribute in customSwaggerAttributes.GetCustomAttributes(typeof(CustomSwaggerAttribute), true)) { customSwaggerAttribute.Apply(schema); } }