We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I need to validate that enum is defined. Can you add support for EnumDataType
Exemple below :
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public enum BeerType { [System.Runtime.Serialization.EnumMember(Value = @"Aromatique")] Aromatique = 0, [System.Runtime.Serialization.EnumMember(Value = @"Doux")] Doux = 1, [System.Runtime.Serialization.EnumMember(Value = @"Ambre")] Ambre = 2, // ... } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SetBeerInput { [System.Text.Json.Serialization.JsonPropertyName("type")] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))] // TODO : Add [EnumDataType(typeof(BeerType))] To Allow ValidationContext public BeerType Type { get; set; } = default!; [System.Text.Json.Serialization.JsonPropertyName("name")] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(30, MinimumLength = 7)] public string Name { get; set; } = default!; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I need to validate that enum is defined.
Can you add support for EnumDataType
Exemple below :
The text was updated successfully, but these errors were encountered: