As of .NET 9, Microsoft has introduced a JSON schema exporter for .NET classes:
https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/extract-schema