How to configure Swashbuckle to ignore property on model

后端 未结 15 1763
旧巷少年郎
旧巷少年郎 2020-12-02 15:10

I\'m using Swashbuckle to generate swagger documentation\\UI for a webapi2 project. Our models are shared with some legacy interfaces so there are a couple of properties I

15条回答
  •  鱼传尺愫
    2020-12-02 15:54

    If you mark field/property as internal or protected or private, it will be ignored automatically by swashbuckle in swagger documentation.

    Update: Obviously, those properties/fields won't be populated in request/response.

提交回复
热议问题