Skip to content

Instantly share code, notes, and snippets.

@renatogroffe
Created September 23, 2024 13:52
Show Gist options
  • Save renatogroffe/f89df9c9002776a2891f9340ce8e4e47 to your computer and use it in GitHub Desktop.
Save renatogroffe/f89df9c9002776a2891f9340ce8e4e47 to your computer and use it in GitHub Desktop.
using ConsoleAppJsonSchemaExporter.Models;
using System.Runtime.InteropServices;
using System.Text.Json;
using System.Text.Json.Schema;
Console.WriteLine("***** Testes com .NET 9 | Utilizando JsonSchemaExporter *****");
Console.WriteLine($"Versao do .NET em uso: {RuntimeInformation
.FrameworkDescription} - Ambiente: {Environment.MachineName} - Kernel: {Environment
.OSVersion.VersionString}");
Console.WriteLine();
Console.WriteLine($"Schema do tipo {nameof(TorneioEsportivo)} no formato JSON:");
Console.WriteLine(JsonSchemaExporter.GetJsonSchemaAsNode(
JsonSerializerOptions.Default, typeof(TorneioEsportivo)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment