Aԃιƚყα Gυɾαʋ
Aԃιƚყα Gυɾαʋ

Reputation: 127

How to specify example on Swagger UI in .NET Core Web API?

I want to specify an example of string input format on swagger for users information purpose.

enter image description here

what i wanted to do is to put an example below the property ColumnAndSortOrder like "for e.g. Resource, Asc"

Is it possible to do so in .NET Core ?

BTW I'm using swagger UI 3.0

Any help or pointers are welcomed.

Upvotes: 0

Views: 935

Answers (1)

Mahdi
Mahdi

Reputation: 169

you can use these two attributes :

    [System.ComponentModel.Description("some description")]

or

    [Swashbuckle.AspNetCore.Annotations("some description")]

on your apis or properties

Upvotes: 1

Related Questions