@@ -19,136 +19,136 @@ public class OpenApiSchema : IOpenApiExtensible, IOpenApiReferenceable, IOpenApi
19
19
/// <summary>
20
20
/// Follow JSON Schema definition. Short text providing information about the data.
21
21
/// </summary>
22
- public string Title { get ; set ; }
22
+ public virtual string Title { get ; set ; }
23
23
24
24
/// <summary>
25
25
/// $schema, a JSON Schema dialect identifier. Value must be a URI
26
26
/// </summary>
27
- public string Schema { get ; set ; }
27
+ public virtual string Schema { get ; set ; }
28
28
29
29
/// <summary>
30
30
/// $id - Identifies a schema resource with its canonical URI.
31
31
/// </summary>
32
- public string Id { get ; set ; }
32
+ public virtual string Id { get ; set ; }
33
33
34
34
/// <summary>
35
35
/// $comment - reserves a location for comments from schema authors to readers or maintainers of the schema.
36
36
/// </summary>
37
- public string Comment { get ; set ; }
37
+ public virtual string Comment { get ; set ; }
38
38
39
39
/// <summary>
40
40
/// $vocabulary- used in meta-schemas to identify the vocabularies available for use in schemas described by that meta-schema.
41
41
/// </summary>
42
- public string Vocabulary { get ; set ; }
42
+ public virtual string Vocabulary { get ; set ; }
43
43
44
44
/// <summary>
45
45
/// $dynamicRef - an applicator that allows for deferring the full resolution until runtime, at which point it is resolved each time it is encountered while evaluating an instance
46
46
/// </summary>
47
- public string DynamicRef { get ; set ; }
47
+ public virtual string DynamicRef { get ; set ; }
48
48
49
49
/// <summary>
50
50
/// $dynamicAnchor - used to create plain name fragments that are not tied to any particular structural location for referencing purposes, which are taken into consideration for dynamic referencing.
51
51
/// </summary>
52
- public string DynamicAnchor { get ; set ; }
52
+ public virtual string DynamicAnchor { get ; set ; }
53
53
54
54
/// <summary>
55
55
/// $recursiveAnchor - used to construct recursive schemas i.e one that has a reference to its own root, identified by the empty fragment URI reference ("#")
56
56
/// </summary>
57
- public string RecursiveAnchor { get ; set ; }
57
+ public virtual string RecursiveAnchor { get ; set ; }
58
58
59
59
/// <summary>
60
60
/// $recursiveRef - used to construct recursive schemas i.e one that has a reference to its own root, identified by the empty fragment URI reference ("#")
61
61
/// </summary>
62
- public string RecursiveRef { get ; set ; }
62
+ public virtual string RecursiveRef { get ; set ; }
63
63
64
64
/// <summary>
65
65
/// $defs - reserves a location for schema authors to inline re-usable JSON Schemas into a more general schema.
66
66
/// The keyword does not directly affect the validation result
67
67
/// </summary>
68
- public IDictionary < string , OpenApiSchema > Definitions { get ; set ; }
68
+ public virtual IDictionary < string , OpenApiSchema > Definitions { get ; set ; }
69
69
70
70
/// <summary>
71
71
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
72
72
/// </summary>
73
- public decimal ? V31ExclusiveMaximum { get ; set ; }
73
+ public virtual decimal ? V31ExclusiveMaximum { get ; set ; }
74
74
75
75
/// <summary>
76
76
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
77
77
/// </summary>
78
- public decimal ? V31ExclusiveMinimum { get ; set ; }
78
+ public virtual decimal ? V31ExclusiveMinimum { get ; set ; }
79
79
80
80
/// <summary>
81
81
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
82
82
/// </summary>
83
- public bool UnEvaluatedProperties { get ; set ; }
83
+ public virtual bool UnEvaluatedProperties { get ; set ; }
84
84
85
85
/// <summary>
86
86
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
87
87
/// Value MUST be a string in V2 and V3.
88
88
/// </summary>
89
- public object Type { get ; set ; }
89
+ public virtual object Type { get ; set ; }
90
90
91
91
/// <summary>
92
92
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
93
93
/// While relying on JSON Schema's defined formats,
94
94
/// the OAS offers a few additional predefined formats.
95
95
/// </summary>
96
- public string Format { get ; set ; }
96
+ public virtual string Format { get ; set ; }
97
97
98
98
/// <summary>
99
99
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
100
100
/// CommonMark syntax MAY be used for rich text representation.
101
101
/// </summary>
102
- public string Description { get ; set ; }
102
+ public virtual string Description { get ; set ; }
103
103
104
104
/// <summary>
105
105
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
106
106
/// </summary>
107
- public decimal ? Maximum { get ; set ; }
107
+ public virtual decimal ? Maximum { get ; set ; }
108
108
109
109
/// <summary>
110
110
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
111
111
/// </summary>
112
- public bool ? ExclusiveMaximum { get ; set ; }
112
+ public virtual bool ? ExclusiveMaximum { get ; set ; }
113
113
114
114
/// <summary>
115
115
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
116
116
/// </summary>
117
- public decimal ? Minimum { get ; set ; }
117
+ public virtual decimal ? Minimum { get ; set ; }
118
118
119
119
/// <summary>
120
120
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
121
121
/// </summary>
122
- public bool ? ExclusiveMinimum { get ; set ; }
122
+ public virtual bool ? ExclusiveMinimum { get ; set ; }
123
123
124
124
/// <summary>
125
125
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
126
126
/// </summary>
127
- public int ? MaxLength { get ; set ; }
127
+ public virtual int ? MaxLength { get ; set ; }
128
128
129
129
/// <summary>
130
130
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
131
131
/// </summary>
132
- public int ? MinLength { get ; set ; }
132
+ public virtual int ? MinLength { get ; set ; }
133
133
134
134
/// <summary>
135
135
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
136
136
/// This string SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect
137
137
/// </summary>
138
- public string Pattern { get ; set ; }
138
+ public virtual string Pattern { get ; set ; }
139
139
140
140
/// <summary>
141
141
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
142
142
/// </summary>
143
- public decimal ? MultipleOf { get ; set ; }
143
+ public virtual decimal ? MultipleOf { get ; set ; }
144
144
145
145
/// <summary>
146
146
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
147
147
/// The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided.
148
148
/// Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level.
149
149
/// For example, if type is string, then default can be "foo" but cannot be 1.
150
150
/// </summary>
151
- public OpenApiAny Default { get ; set ; }
151
+ public virtual OpenApiAny Default { get ; set ; }
152
152
153
153
/// <summary>
154
154
/// Relevant only for Schema "properties" definitions. Declares the property as "read only".
@@ -158,7 +158,7 @@ public class OpenApiSchema : IOpenApiExtensible, IOpenApiReferenceable, IOpenApi
158
158
/// A property MUST NOT be marked as both readOnly and writeOnly being true.
159
159
/// Default value is false.
160
160
/// </summary>
161
- public bool ReadOnly { get ; set ; }
161
+ public virtual bool ReadOnly { get ; set ; }
162
162
163
163
/// <summary>
164
164
/// Relevant only for Schema "properties" definitions. Declares the property as "write only".
@@ -168,64 +168,64 @@ public class OpenApiSchema : IOpenApiExtensible, IOpenApiReferenceable, IOpenApi
168
168
/// A property MUST NOT be marked as both readOnly and writeOnly being true.
169
169
/// Default value is false.
170
170
/// </summary>
171
- public bool WriteOnly { get ; set ; }
171
+ public virtual bool WriteOnly { get ; set ; }
172
172
173
173
/// <summary>
174
174
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
175
175
/// Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
176
176
/// </summary>
177
- public IList < OpenApiSchema > AllOf { get ; set ; } = new List < OpenApiSchema > ( ) ;
177
+ public virtual IList < OpenApiSchema > AllOf { get ; set ; } = new List < OpenApiSchema > ( ) ;
178
178
179
179
/// <summary>
180
180
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
181
181
/// Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
182
182
/// </summary>
183
- public IList < OpenApiSchema > OneOf { get ; set ; } = new List < OpenApiSchema > ( ) ;
183
+ public virtual IList < OpenApiSchema > OneOf { get ; set ; } = new List < OpenApiSchema > ( ) ;
184
184
185
185
/// <summary>
186
186
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
187
187
/// Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
188
188
/// </summary>
189
- public IList < OpenApiSchema > AnyOf { get ; set ; } = new List < OpenApiSchema > ( ) ;
189
+ public virtual IList < OpenApiSchema > AnyOf { get ; set ; } = new List < OpenApiSchema > ( ) ;
190
190
191
191
/// <summary>
192
192
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
193
193
/// Inline or referenced schema MUST be of a Schema Object and not a standard JSON Schema.
194
194
/// </summary>
195
- public OpenApiSchema Not { get ; set ; }
195
+ public virtual OpenApiSchema Not { get ; set ; }
196
196
197
197
/// <summary>
198
198
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
199
199
/// </summary>
200
- public ISet < string > Required { get ; set ; } = new HashSet < string > ( ) ;
200
+ public virtual ISet < string > Required { get ; set ; } = new HashSet < string > ( ) ;
201
201
202
202
/// <summary>
203
203
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
204
204
/// Value MUST be an object and not an array. Inline or referenced schema MUST be of a Schema Object
205
205
/// and not a standard JSON Schema. items MUST be present if the type is array.
206
206
/// </summary>
207
- public OpenApiSchema Items { get ; set ; }
207
+ public virtual OpenApiSchema Items { get ; set ; }
208
208
209
209
/// <summary>
210
210
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
211
211
/// </summary>
212
- public int ? MaxItems { get ; set ; }
212
+ public virtual int ? MaxItems { get ; set ; }
213
213
214
214
/// <summary>
215
215
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
216
216
/// </summary>
217
- public int ? MinItems { get ; set ; }
217
+ public virtual int ? MinItems { get ; set ; }
218
218
219
219
/// <summary>
220
220
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
221
221
/// </summary>
222
- public bool ? UniqueItems { get ; set ; }
222
+ public virtual bool ? UniqueItems { get ; set ; }
223
223
224
224
/// <summary>
225
225
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
226
226
/// Property definitions MUST be a Schema Object and not a standard JSON Schema (inline or referenced).
227
227
/// </summary>
228
- public IDictionary < string , OpenApiSchema > Properties { get ; set ; } = new Dictionary < string , OpenApiSchema > ( ) ;
228
+ public virtual IDictionary < string , OpenApiSchema > Properties { get ; set ; } = new Dictionary < string , OpenApiSchema > ( ) ;
229
229
230
230
/// <summary>
231
231
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
@@ -234,96 +234,96 @@ public class OpenApiSchema : IOpenApiExtensible, IOpenApiReferenceable, IOpenApi
234
234
/// egular expression dialect. Each property value of this object MUST be an object, and each object MUST
235
235
/// be a valid Schema Object not a standard JSON Schema.
236
236
/// </summary>
237
- public IDictionary < string , OpenApiSchema > PatternProperties { get ; set ; } = new Dictionary < string , OpenApiSchema > ( ) ;
237
+ public virtual IDictionary < string , OpenApiSchema > PatternProperties { get ; set ; } = new Dictionary < string , OpenApiSchema > ( ) ;
238
238
239
239
/// <summary>
240
240
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
241
241
/// </summary>
242
- public int ? MaxProperties { get ; set ; }
242
+ public virtual int ? MaxProperties { get ; set ; }
243
243
244
244
/// <summary>
245
245
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
246
246
/// </summary>
247
- public int ? MinProperties { get ; set ; }
247
+ public virtual int ? MinProperties { get ; set ; }
248
248
249
249
/// <summary>
250
250
/// Indicates if the schema can contain properties other than those defined by the properties map.
251
251
/// </summary>
252
- public bool AdditionalPropertiesAllowed { get ; set ; } = true ;
252
+ public virtual bool AdditionalPropertiesAllowed { get ; set ; } = true ;
253
253
254
254
/// <summary>
255
255
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
256
256
/// Value can be boolean or object. Inline or referenced schema
257
257
/// MUST be of a Schema Object and not a standard JSON Schema.
258
258
/// </summary>
259
- public OpenApiSchema AdditionalProperties { get ; set ; }
259
+ public virtual OpenApiSchema AdditionalProperties { get ; set ; }
260
260
261
261
/// <summary>
262
262
/// Adds support for polymorphism. The discriminator is an object name that is used to differentiate
263
263
/// between other schemas which may satisfy the payload description.
264
264
/// </summary>
265
- public OpenApiDiscriminator Discriminator { get ; set ; }
265
+ public virtual OpenApiDiscriminator Discriminator { get ; set ; }
266
266
267
267
/// <summary>
268
268
/// A free-form property to include an example of an instance for this schema.
269
269
/// To represent examples that cannot be naturally represented in JSON or YAML,
270
270
/// a string value can be used to contain the example with escaping where necessary.
271
271
/// </summary>
272
- public OpenApiAny Example { get ; set ; }
272
+ public virtual OpenApiAny Example { get ; set ; }
273
273
274
274
/// <summary>
275
275
/// A free-form property to include examples of an instance for this schema.
276
276
/// To represent examples that cannot be naturally represented in JSON or YAML,
277
277
/// a list of values can be used to contain the examples with escaping where necessary.
278
278
/// </summary>
279
- public IList < JsonNode > Examples { get ; set ; }
279
+ public virtual IList < JsonNode > Examples { get ; set ; }
280
280
281
281
/// <summary>
282
282
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
283
283
/// </summary>
284
- public IList < JsonNode > Enum { get ; set ; } = new List < JsonNode > ( ) ;
284
+ public virtual IList < JsonNode > Enum { get ; set ; } = new List < JsonNode > ( ) ;
285
285
286
286
/// <summary>
287
287
/// Allows sending a null value for the defined schema. Default value is false.
288
288
/// </summary>
289
- public bool Nullable { get ; set ; }
289
+ public virtual bool Nullable { get ; set ; }
290
290
291
291
/// <summary>
292
292
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
293
293
/// </summary>
294
- public bool UnevaluatedProperties { get ; set ; }
294
+ public virtual bool UnevaluatedProperties { get ; set ; }
295
295
296
296
/// <summary>
297
297
/// Additional external documentation for this schema.
298
298
/// </summary>
299
- public OpenApiExternalDocs ExternalDocs { get ; set ; }
299
+ public virtual OpenApiExternalDocs ExternalDocs { get ; set ; }
300
300
301
301
/// <summary>
302
302
/// Specifies that a schema is deprecated and SHOULD be transitioned out of usage.
303
303
/// Default value is false.
304
304
/// </summary>
305
- public bool Deprecated { get ; set ; }
305
+ public virtual bool Deprecated { get ; set ; }
306
306
307
307
/// <summary>
308
308
/// This MAY be used only on properties schemas. It has no effect on root schemas.
309
309
/// Adds additional metadata to describe the XML representation of this property.
310
310
/// </summary>
311
- public OpenApiXml Xml { get ; set ; }
311
+ public virtual OpenApiXml Xml { get ; set ; }
312
312
313
313
/// <summary>
314
314
/// This object MAY be extended with Specification Extensions.
315
315
/// </summary>
316
- public IDictionary < string , IOpenApiExtension > Extensions { get ; set ; } = new Dictionary < string , IOpenApiExtension > ( ) ;
316
+ public virtual IDictionary < string , IOpenApiExtension > Extensions { get ; set ; } = new Dictionary < string , IOpenApiExtension > ( ) ;
317
317
318
318
/// <summary>
319
319
/// Indicates object is a placeholder reference to an actual object and does not contain valid data.
320
320
/// </summary>
321
- public bool UnresolvedReference { get ; set ; }
321
+ public virtual bool UnresolvedReference { get ; set ; }
322
322
323
323
/// <summary>
324
324
/// Reference object.
325
325
/// </summary>
326
- public OpenApiReference Reference { get ; set ; }
326
+ public virtual OpenApiReference Reference { get ; set ; }
327
327
328
328
/// <summary>
329
329
/// Parameterless constructor
@@ -586,7 +586,7 @@ public void SerializeAsV2WithoutReference(IOpenApiWriter writer)
586
586
587
587
/// <inheritdoc/>
588
588
589
- public void SerializeAsV2 ( IOpenApiWriter writer )
589
+ public virtual void SerializeAsV2 ( IOpenApiWriter writer )
590
590
{
591
591
SerializeAsV2 ( writer : writer , parentRequiredProperties : new HashSet < string > ( ) , propertyName : null ) ;
592
592
}
0 commit comments