Skip to content

Instantly share code, notes, and snippets.

@dcomartin dcomartin/startup.cs
Created Jan 18, 2018

Embed
What would you like to do?
public void ConfigureServices(IServiceCollection services)
{
services.AddCors();
services.AddMvc(options =>
{
var templates = new Dictionary<Type, object>
{
{ typeof(GameResponse), new GameSirenResponse() }
};
options.OutputFormatters.Add(new SirenOutputFormatter(templates));
});
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new Info { Title = "Hangman Api v1.0", Version = "v1" });
c.IncludeXmlComments("wwwroot/Hangman.Api.xml");
});
}
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.