@@ -20,7 +20,7 @@ public class OpenApiValidator : OpenApiVisitorBase, IValidationContext
20
20
private readonly IList < OpenApiValidatorWarning > _warnings = new List < OpenApiValidatorWarning > ( ) ;
21
21
22
22
/// <summary>
23
- /// Create a vistor that will validate an OpenAPIDocument
23
+ /// Create a visitor that will validate an OpenAPIDocument
24
24
/// </summary>
25
25
/// <param name="ruleSet"></param>
26
26
public OpenApiValidator ( ValidationRuleSet ruleSet )
@@ -198,6 +198,100 @@ public void AddWarning(OpenApiValidatorWarning warning)
198
198
/// <param name="items">The object to be validated</param>
199
199
public override void Visit ( IList < OpenApiExample > items ) => Validate ( items , items . GetType ( ) ) ;
200
200
201
+ /// <summary>
202
+ /// Execute validation rules against a <see cref="OpenApiPathItem"/>
203
+ /// </summary>
204
+ /// <param name="item">The object to be validated</param>
205
+ public override void Visit ( OpenApiPathItem item ) => Validate ( item ) ;
206
+
207
+ /// <summary>
208
+ /// Execute validation rules against a <see cref="OpenApiServerVariable"/>
209
+ /// </summary>
210
+ /// <param name="item">The object to be validated</param>
211
+ public override void Visit ( OpenApiServerVariable item ) => Validate ( item ) ;
212
+
213
+ /// <summary>
214
+ /// Execute validation rules against a <see cref="OpenApiSecurityScheme"/>
215
+ /// </summary>
216
+ /// <param name="item">The object to be validated</param>
217
+ public override void Visit ( OpenApiSecurityScheme item ) => Validate ( item ) ;
218
+
219
+ /// <summary>
220
+ /// Execute validation rules against a <see cref="OpenApiSecurityRequirement"/>
221
+ /// </summary>
222
+ /// <param name="item">The object to be validated</param>
223
+ public override void Visit ( OpenApiSecurityRequirement item ) => Validate ( item ) ;
224
+
225
+ /// <summary>
226
+ /// Execute validation rules against a <see cref="OpenApiRequestBody"/>
227
+ /// </summary>
228
+ /// <param name="item">The object to be validated</param>
229
+ public override void Visit ( OpenApiRequestBody item ) => Validate ( item ) ;
230
+
231
+ /// <summary>
232
+ /// Execute validation rules against a <see cref="OpenApiPaths"/>
233
+ /// </summary>
234
+ /// <param name="item">The object to be validated</param>
235
+ public override void Visit ( OpenApiPaths item ) => Validate ( item ) ;
236
+
237
+ /// <summary>
238
+ /// Execute validation rules against a <see cref="OpenApiLink"/>
239
+ /// </summary>
240
+ /// <param name="item">The object to be validated</param>
241
+ public override void Visit ( OpenApiLink item ) => Validate ( item ) ;
242
+
243
+ /// <summary>
244
+ /// Execute validation rules against a <see cref="OpenApiExample"/>
245
+ /// </summary>
246
+ /// <param name="item">The object to be validated</param>
247
+ public override void Visit ( OpenApiExample item ) => Validate ( item ) ;
248
+
249
+ /// <summary>
250
+ /// Execute validation rules against a <see cref="OpenApiOperation"/>
251
+ /// </summary>
252
+ /// <param name="item">The object to be validated</param>
253
+ public override void Visit ( OpenApiOperation item ) => Validate ( item ) ;
254
+ /// <summary>
255
+ /// Execute validation rules against a <see cref="IDictionary{OperationType, OpenApiOperation}"/>
256
+ /// </summary>
257
+ /// <param name="item">The object to be validated</param>
258
+ public override void Visit ( IDictionary < OperationType , OpenApiOperation > item ) => Validate ( item , item . GetType ( ) ) ;
259
+ /// <summary>
260
+ /// Execute validation rules against a <see cref="IDictionary{String, OpenApiHeader}"/>
261
+ /// </summary>
262
+ /// <param name="item">The object to be validated</param>
263
+ public override void Visit ( IDictionary < string , OpenApiHeader > item ) => Validate ( item , item . GetType ( ) ) ;
264
+ /// <summary>
265
+ /// Execute validation rules against a <see cref="IDictionary{String, OpenApiCallback}"/>
266
+ /// </summary>
267
+ /// <param name="item">The object to be validated</param>
268
+ public override void Visit ( IDictionary < string , OpenApiCallback > item ) => Validate ( item , item . GetType ( ) ) ;
269
+ /// <summary>
270
+ /// Execute validation rules against a <see cref="IDictionary{String, OpenApiMediaType}"/>
271
+ /// </summary>
272
+ /// <param name="item">The object to be validated</param>
273
+ public override void Visit ( IDictionary < string , OpenApiMediaType > item ) => Validate ( item , item . GetType ( ) ) ;
274
+ /// <summary>
275
+ /// Execute validation rules against a <see cref="IDictionary{String, OpenApiExample}"/>
276
+ /// </summary>
277
+ /// <param name="item">The object to be validated</param>
278
+ public override void Visit ( IDictionary < string , OpenApiExample > item ) => Validate ( item , item . GetType ( ) ) ;
279
+ /// <summary>
280
+ /// Execute validation rules against a <see cref="IDictionary{String, OpenApiLink}"/>
281
+ /// </summary>
282
+ /// <param name="item">The object to be validated</param>
283
+ public override void Visit ( IDictionary < string , OpenApiLink > item ) => Validate ( item , item . GetType ( ) ) ;
284
+ /// <summary>
285
+ /// Execute validation rules against a <see cref="IDictionary{String, OpenApiServerVariable}"/>
286
+ /// </summary>
287
+ /// <param name="item">The object to be validated</param>
288
+ public override void Visit ( IDictionary < string , OpenApiServerVariable > item ) => Validate ( item , item . GetType ( ) ) ;
289
+ /// <summary>
290
+ /// Execute validation rules against a <see cref="IDictionary{String, OpenApiEncoding}"/>
291
+ /// </summary>
292
+ /// <param name="item">The object to be validated</param>
293
+ public override void Visit ( IDictionary < string , OpenApiEncoding > item ) => Validate ( item , item . GetType ( ) ) ;
294
+
201
295
private void Validate < T > ( T item )
202
296
{
203
297
var type = typeof ( T ) ;
0 commit comments