Created
January 18, 2018 01:08
-
-
Save dcomartin/e82c5efb59270c76a4d0c60e29749a7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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