ardalis/Result

errorMessages should be passed as string

開放

#124 建立於 2023年3月21日

 (4 則留言) (0 個反應) (0 位負責人)C# (126 個分叉)github user discovery
enhancementgood first issuehacktoberfesthelp wanted

倉庫指標

星標
 (1,034 顆星)
PR 合併指標
 (平均合併 8天 3小時) (30 天內合併 2 個 PR)

描述

The error messages get translated into the details property of the problem details object. By the RFC standard this property is a string. Currently a list of errormessages can be passed to the NotFound and Error Method, which then get concatenated. e.g.,: https://github.com/ardalis/Result/blob/1c8a9f53b8995e82af0b1650b5c83ec15060289a/src/Ardalis.Result.AspNetCore/ResultStatusMap.cs#L117-L120 This breaks internationalization, as the string at the start is english and already happens if only a single string is passed. I think the best approach would be to allow only strings and make the developer responsible for concatenation. What do you think? @ardalis @KyleMcMaster

貢獻者指南