diff --git a/src/InterfaceForward.Application/Services/Interface/InterfaceService.cs b/src/InterfaceForward.Application/Services/Interface/InterfaceService.cs index 637bd28..8293697 100644 --- a/src/InterfaceForward.Application/Services/Interface/InterfaceService.cs +++ b/src/InterfaceForward.Application/Services/Interface/InterfaceService.cs @@ -115,7 +115,7 @@ public class InterfaceService : ApplicationService res.RequestBodyParameterList = !interfaceEntity.IsUpStream && interfaceEntity.ContentType is ContentType.Json or ContentType.Xml ? paras.Where(x => x.IsInPara && x.ParaKind == ParameterParaKind.Normal).ToList() : []; - res.MappingBodyParameterList = !interfaceEntity.IsUpStream && interfaceEntity.ContentType == ContentType.FormUrlEncoded + res.MappingBodyParameterList = !interfaceEntity.IsUpStream && interfaceEntity.ContentType is ContentType.None or ContentType.FormUrlEncoded ? paras.Where(x => x.IsInPara && x.ParaKind == ParameterParaKind.MappingBody).ToList() : []; // 出参树形列表 @@ -341,7 +341,7 @@ public class InterfaceService : ApplicationService return input.ContentType switch { ContentType.Json or ContentType.Xml => input.RequestBodyParameterList, - ContentType.FormUrlEncoded => input.MappingBodyParameterList, + ContentType.None or ContentType.FormUrlEncoded => input.MappingBodyParameterList, _ => [] }; }