quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

[BUG]: C# Not Generating [JsonRequired] or [Required] Annotation

Open cawoodm opened this issue 6 months ago • 0 comments

With CSharp, required properties are not annotated as such:

Image

Indeed the "Fail if required properties are missing" option seems to do nothing.

Current Output

[JsonPropertyName("vatCode")]
public string VatCode { get; set; }

Expected Output:

[JsonRequired]
[JsonPropertyName("vatCode")]
public string VatCode { get; set; }

cawoodm avatar Apr 09 '25 08:04 cawoodm