Skip to content

Instantly share code, notes, and snippets.

@justinyoo justinyoo/WebApiConfig.cs Secret
Created Aug 14, 2017

What would you like to do?
Swashbuckle Pro Tips for ASP.NET Web API #3
public static class WebApiConfig
public static void Register(IAppBuilder app, IContainer container)
var settings = new JsonSerializerSettings()
// Add JSON serialiser settings to support camelCasing.
ContractResolver = new CamelCasePropertyNamesContractResolver(),
var config = new HttpConfiguration();
var xmlFormatter = config.Formatters.XmlFormatter;
// Starts using XmlSerialiser rather than DataContractSerializer.
xmlFormatter.UseXmlSerializer = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.