NorthwindTraders icon indicating copy to clipboard operation
NorthwindTraders copied to clipboard

Improve swagger spec.

Open andrewtsw opened this issue 4 years ago • 0 comments

I've added support for XML comments in a swagger spec. It is just a sample for the CategoriesController. But the same approach can be used for all other controllers and entities. It is very useful to show additional information like comments and examples in a swagger spec.

image

image

But if you use attributes - you can add information about optional/required fields to the spec. Or maxlen for the strings. So I believe better to use attributes for this kind of validation, instead of FluentValidation.

@jasontaylordev what do you think about this approach?

Thanks,

andrewtsw avatar May 09 '20 11:05 andrewtsw