diff --git a/docs/API.dox b/docs/API.dox index f33f901cb2..c4cec21c15 100644 --- a/docs/API.dox +++ b/docs/API.dox @@ -144,9 +144,9 @@ You will be granted a bearer token as in basic auth. This will have an extended @subsubsection api_auth_o_providers Supported Providers -- ID: 0, Name: GitHub, Documentation: https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/ -- ID: 1, Name: Discord, Documentation: https://discord.com/developers/docs/topics/oauth2 -- ID: 2, Name: TGForums, Documentation: https://tgstation13.org/phpBB/viewtopic.php?f=45&t=9922 +- GitHub: https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/ +- Discord: https://discord.com/developers/docs/topics/oauth2 +- TGForums: https://tgstation13.org/phpBB/viewtopic.php?f=45&t=9922 @section api_perms Permissions diff --git a/src/Tgstation.Server.Api/Models/OAuthConnection.cs b/src/Tgstation.Server.Api/Models/OAuthConnection.cs index d684a04e2e..f68f7d2f16 100644 --- a/src/Tgstation.Server.Api/Models/OAuthConnection.cs +++ b/src/Tgstation.Server.Api/Models/OAuthConnection.cs @@ -1,3 +1,5 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; using System.ComponentModel.DataAnnotations; namespace Tgstation.Server.Api.Models @@ -10,6 +12,7 @@ namespace Tgstation.Server.Api.Models /// /// The of the . /// ] + [JsonConverter(typeof(StringEnumConverter))] [EnumDataType(typeof(OAuthProvider))] public OAuthProvider Provider { get; set; } diff --git a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj index 7b61d94fec..f971e5b548 100644 --- a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj +++ b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj @@ -37,6 +37,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + all runtime; build; native; contentfiles; analyzers diff --git a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj index 3070b75011..4ceb1f0844 100644 --- a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj +++ b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj @@ -31,7 +31,6 @@ - all runtime; build; native; contentfiles; analyzers