mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
docs(archival): 📝 document endpoints
This commit is contained in:
parent
95627ee1d3
commit
bdb30d2104
4 changed files with 15 additions and 0 deletions
4
services/Archival/FilterLists.Archival.Api/.editorconfig
Normal file
4
services/Archival/FilterLists.Archival.Api/.editorconfig
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
|
||||
|
||||
[*.cs]
|
||||
dotnet_diagnostic.CS1591.severity = suggestion
|
||||
|
|
@ -8,6 +8,10 @@ namespace FilterLists.Archival.Api.Controllers
|
|||
[Produces("application/json")]
|
||||
public class PingController : ControllerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// A sample endpoint.
|
||||
/// </summary>
|
||||
/// <returns>Pong.</returns>
|
||||
[HttpGet]
|
||||
[ProducesResponseType(typeof(string), StatusCodes.Status200OK)]
|
||||
#pragma warning disable CA1822 // Mark members as static
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<PublishReadyToRunShowWarnings>true</PublishReadyToRunShowWarnings>
|
||||
<RuntimeIdentifiers>alpine.3.12-x64;win10-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.OpenApi.Models;
|
||||
|
|
@ -25,6 +27,10 @@ public static void AddSwaggerGen(this IServiceCollection services)
|
|||
Url = new Uri("https://github.com/collinbarrett/FilterLists/blob/master/LICENSE")
|
||||
}
|
||||
});
|
||||
|
||||
var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
|
||||
var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFile);
|
||||
o.IncludeXmlComments(xmlPath);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue