JSON Generation#
The publish-json command generates a JSON Schema that describes the JSON serialization contract used by the generated C# model.
Container shape#
The schema describes a flat ItemContainer with two top-level properties:
topLevelReferencesAn array of item references.
itemsAn array containing every serialized item instance.
References#
References are simple JSON objects. They contain:
$typethe configured identification properties
Identification from both Identification.csv and
Identification.Mixin.csv is reflected in the generated reference shape.
Discriminators#
The schema adds $type to item definitions and substitute reusable datatype
definitions directly. Discriminator values are constrained with enum.
item definitions are referenced directly in the
itemsunionthe schema does not use per-item wrapper
allOfblocks just to add a discriminatorreusable datatype substitution uses
$typewhenAllowSubtypesandIsSubstitutemake the C# runtime polymorphic
Formatting#
The generated JSON schema file is written in pretty-printed form.