Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created August 1, 2017 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinyoo/47a9d909187562ef13db29062d5aeac2 to your computer and use it in GitHub Desktop.
Save justinyoo/47a9d909187562ef13db29062d5aeac2 to your computer and use it in GitHub Desktop.
Swashbuckle Pro Tips for ASP.NET Web API #2
public class ValueResponseModelExample : IExamplesProvider
{
public virtual object GetExamples()
{
var value = new ValueReference()
{
Id = Guid.NewGuid(),
Name = "value name",
Value = 123,
IsValid = true,
AddedOn = DateTimeOffset.Now
};
var model = new ValueResponseModel() { Value = value };
return model;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment