mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Remove some json ignores on ids
This commit is contained in:
parent
0c0037416a
commit
ec6b90b33c
@ -129,7 +129,6 @@ namespace Kyoo.Abstractions.Models
|
||||
/// <summary>
|
||||
/// The ID of the Studio that made this show.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public Guid? StudioId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -57,7 +57,6 @@ namespace Kyoo.Abstractions.Models
|
||||
/// <summary>
|
||||
/// The ID of the user that started watching this episode.
|
||||
/// </summary>
|
||||
[SerializeIgnore]
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -69,7 +68,6 @@ namespace Kyoo.Abstractions.Models
|
||||
/// <summary>
|
||||
/// The ID of the movie started.
|
||||
/// </summary>
|
||||
[SerializeIgnore]
|
||||
public Guid MovieId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -114,7 +112,6 @@ namespace Kyoo.Abstractions.Models
|
||||
/// <summary>
|
||||
/// The ID of the user that started watching this episode.
|
||||
/// </summary>
|
||||
[SerializeIgnore]
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -126,7 +123,6 @@ namespace Kyoo.Abstractions.Models
|
||||
/// <summary>
|
||||
/// The ID of the episode started.
|
||||
/// </summary>
|
||||
[SerializeIgnore]
|
||||
public Guid? EpisodeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -171,7 +167,6 @@ namespace Kyoo.Abstractions.Models
|
||||
/// <summary>
|
||||
/// The ID of the user that started watching this episode.
|
||||
/// </summary>
|
||||
[SerializeIgnore]
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -183,7 +178,6 @@ namespace Kyoo.Abstractions.Models
|
||||
/// <summary>
|
||||
/// The ID of the show started.
|
||||
/// </summary>
|
||||
[SerializeIgnore]
|
||||
public Guid ShowId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@ -213,7 +207,6 @@ namespace Kyoo.Abstractions.Models
|
||||
/// <summary>
|
||||
/// The ID of the episode started.
|
||||
/// </summary>
|
||||
[SerializeIgnore]
|
||||
public Guid? NextEpisodeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -96,7 +96,7 @@ namespace Kyoo.Core
|
||||
.AddJsonOptions(x =>
|
||||
{
|
||||
x.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
|
||||
x.JsonSerializerOptions.TypeInfoResolver = new PolymorphicTypeResolver();
|
||||
x.JsonSerializerOptions.TypeInfoResolver = new WithKindResolver();
|
||||
x.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
|
||||
})
|
||||
.AddDataAnnotations()
|
||||
|
@ -26,7 +26,7 @@ using static System.Text.Json.JsonNamingPolicy;
|
||||
|
||||
namespace Kyoo.Core.Api;
|
||||
|
||||
public class PolymorphicTypeResolver : DefaultJsonTypeInfoResolver
|
||||
public class WithKindResolver : DefaultJsonTypeInfoResolver
|
||||
{
|
||||
public override JsonTypeInfo GetTypeInfo(Type type, JsonSerializerOptions options)
|
||||
{
|
Loading…
x
Reference in New Issue
Block a user