Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Github Swashback.AspNetCore.Filters-通过XML注释添加示例_Github_Swashbuckle - Fatal编程技术网

Github Swashback.AspNetCore.Filters-通过XML注释添加示例

Github Swashback.AspNetCore.Filters-通过XML注释添加示例,github,swashbuckle,Github,Swashbuckle,此链接表示避免使用过滤器生成示例,因为作者希望不推荐该功能 他建议使用XML注释。在我的例子中,我想生成一个具有项目列表的有效负载示例,如何使用XML注释为列表中的多个不同项目添加示例 这就是我的有效负载的样子-我想在列表中生成serviceType1和serviceType2的示例 { "services" : [ { "type": "serviceType1",

此链接表示避免使用过滤器生成示例,因为作者希望不推荐该功能

他建议使用XML注释。在我的例子中,我想生成一个具有项目列表的有效负载示例,如何使用XML注释为列表中的多个不同项目添加示例

这就是我的有效负载的样子-我想在列表中生成serviceType1和serviceType2的示例

{
    "services" : [
        {
            "type": "serviceType1",
            "serviceNumber": "ABC123",
            "address": "123 sample st"
        },
        {
            "type": "serviceType2",
            "serviceNumber": "ABC123",
            "address": "123 sample st",
            "mobileNumber": "098899898"
        }
    ]
}
  

我有类似的问题,为其他包中定义的对象提供示例。我没有找到一种方法,我有类似的问题,为其他包中定义的对象提供示例。我没有找到一个办法。