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
"Serilog": { | |
"MinimumLevel": "Information", | |
"WriteTo": [ | |
{ | |
"Name": "Async", | |
"Args": { | |
"configure": [ | |
{ | |
"Name": "Console", | |
"Args": { |
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 ProjectsController( | |
IProjectService service, | |
ILogger<ProjectsController> logger) | |
{ | |
_service = service; | |
_logger = logger; | |
} | |
[HttpGet] | |
public async Task<ActionResult<IEnumerable<ProjectModel>>> GetAll() |
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 static class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var host = new WebHostBuilder() | |
.UseKestrel() | |
.UseIISIntegration() | |
.UseContentRoot(Directory.GetCurrentDirectory()) | |
.UseStartup<Startup>() | |
.ConfigureAppConfiguration((context, configBuilder) => |
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
app.UseSwagger() | |
.UseSwaggerUI(c => | |
{ | |
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Taskin V1"); | |
}); |
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
// Add Swagger | |
services.AddSwaggerGen(options => | |
{ | |
options.SwaggerDoc("v1", | |
new Info | |
{ | |
Version = "v1", | |
Title = "Taskin API", | |
Description = "API to expose Taskin logic", | |
TermsOfService = "https://github.com/juanluelguerre/Taskin/blob/master/LICENSE" |
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
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Swashbuckle.AspNetCore.Swagger; | |
namespace ElGuerre.Taskin.Api | |
{ | |
public class Startup |
NewerOlder