📄 SpotifyOptions.cs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
using System.ComponentModel.DataAnnotations;
using Microsoft.Extensions.Options;

namespace MSearch.SearchProviders.Spotify;

internal sealed class SpotifyOptions
{
    [Required]
    public required string ClientId { get; set; }

    [Required]
    public required string ClientSecret { get; set; }
}

[OptionsValidator]
internal sealed partial class SpotifyOptionsValidator : IValidateOptions<SpotifyOptions>;