@@ -17,6 +17,9 @@ public class OpenApiSchemaReference : OpenApiSchema
1717 internal OpenApiSchema _target ;
1818 private readonly OpenApiReference _reference ;
1919 private string _description ;
20+ private JsonNode _default ;
21+ private JsonNode _example ;
22+ private IList < JsonNode > _examples ;
2023
2124 private OpenApiSchema Target
2225 {
@@ -90,6 +93,8 @@ internal OpenApiSchemaReference(OpenApiSchema target, string referenceId)
9093 /// <inheritdoc/>
9194 public override JsonSchemaType ? Type { get => Target . Type ; set => Target . Type = value ; }
9295 /// <inheritdoc/>
96+ public override string Const { get => Target . Const ; set => Target . Const = value ; }
97+ /// <inheritdoc/>
9398 public override string Format { get => Target . Format ; set => Target . Format = value ; }
9499 /// <inheritdoc/>
95100 public override string Description
@@ -114,7 +119,11 @@ public override string Description
114119 /// <inheritdoc/>
115120 public override decimal ? MultipleOf { get => Target . MultipleOf ; set => Target . MultipleOf = value ; }
116121 /// <inheritdoc/>
117- public override JsonNode Default { get => Target . Default ; set => Target . Default = value ; }
122+ public override JsonNode Default
123+ {
124+ get => _default ??= Target . Default ;
125+ set => _default = value ;
126+ }
118127 /// <inheritdoc/>
119128 public override bool ReadOnly { get => Target . ReadOnly ; set => Target . ReadOnly = value ; }
120129 /// <inheritdoc/>
@@ -152,9 +161,17 @@ public override string Description
152161 /// <inheritdoc/>
153162 public override OpenApiDiscriminator Discriminator { get => Target . Discriminator ; set => Target . Discriminator = value ; }
154163 /// <inheritdoc/>
155- public override JsonNode Example { get => Target . Example ; set => Target . Example = value ; }
164+ public override JsonNode Example
165+ {
166+ get => _example ??= Target . Example ;
167+ set => _example = value ;
168+ }
156169 /// <inheritdoc/>
157- public override IList < JsonNode > Examples { get => Target . Examples ; set => Target . Examples = value ; }
170+ public override IList < JsonNode > Examples
171+ {
172+ get => _examples ??= Target . Examples ;
173+ set => Target . Examples = value ;
174+ }
158175 /// <inheritdoc/>
159176 public override IList < JsonNode > Enum { get => Target . Enum ; set => Target . Enum = value ; }
160177 /// <inheritdoc/>
0 commit comments