-
-
Notifications
You must be signed in to change notification settings - Fork 547
CSharpGenerator
Rico Suter edited this page May 8, 2020
·
11 revisions
- Package: NJsonSchema.CodeGeneration
- Settings: CSharpGeneratorSettings
The CSharpGenerator
class generates C# DTO classes from a given JSON Schema (or Swagger/OpenAPI model schema):
var schema = JsonSchema.FromType<Person>();
var settings = new CSharpGeneratorSettings();
var generator = new CSharpGenerator(schema, settings);
var code = generator.GenerateFile();
More information about System.Text.Json support.