mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Integrate ApiVersioning library for ASP.NET
This commit is contained in:
parent
db1ebd0a1d
commit
c4c3eaf954
6 changed files with 16 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
using Autofac;
|
||||
|
||||
|
|
@ -29,6 +29,12 @@ namespace PluralKit.API
|
|||
services.AddControllers()
|
||||
.SetCompatibilityVersion(CompatibilityVersion.Latest)
|
||||
.AddNewtonsoftJson(); // sorry MS, this just does *more*
|
||||
|
||||
services.AddApiVersioning(c =>
|
||||
{
|
||||
c.AssumeDefaultVersionWhenUnspecified = true;
|
||||
c.DefaultApiVersion = ApiVersion.Parse("1.0");
|
||||
});
|
||||
}
|
||||
|
||||
public void ConfigureContainer(ContainerBuilder builder)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue