create

Create an Avro schema for a .NET type.

Examples

Create a schema for a built-in type
$ dotnet avro create --type System.DateTime
"string"
Create a schema for a type in a compiled assembly
$ dotnet avro create --assembly ./out/Example.Models.dll --type Example.Models.ExampleModel
{"name":"Example.Models.ExampleModel",type":"record",fields:[{"name":"Text","type":"string"}]}

Options

-a, --assembly
The name of or path to an assembly to load (multiple space-separated values accepted).
--enums-as-ints
Whether enums should be represented as integers.
--nullable-references
Whether reference types should be nullable.
--temporal-behavior
Whether timestamps should be represented with "string" schemas (ISO 8601) or "long" schemas (timestamp logical types). Options are iso8601, epochmilliseconds, and epochmicroseconds.
-t, --type
The type to build a schema for.
Chr.Avro