如何从Swagger ui-3.0中隐藏特定动作方法的输入模型参数

时间:2019-06-24 14:46:13

标签: c#

公共类CustomSchemaFilters:ISchemaFilter       {             公共无效Apply(Schema模式,SchemaFilterContext上下文)         {              var excludeProperties = new [] {“ name”,“ lastname”,“ Year”};              foreach(excludeProperties中的var prop)              如果(schema.Properties.ContainsKey(prop))                  schema.Properties.Remove(prop);         }     }

0 个答案:

没有答案