/// <summary> /// Visits <see cref="OpenApiEncoding"/> and child objects /// </summary> internal void Walk(OpenApiEncoding encoding) { if (encoding == null) { return; } _visitor.Visit(encoding); Walk(encoding as IOpenApiExtensible); }
public static OpenApiEncoding LoadEncoding(ParseNode node) { var mapNode = node.CheckMapNode("encoding"); var encoding = new OpenApiEncoding(); foreach (var property in mapNode) { property.ParseField(encoding, _encodingFixedFields, _encodingPatternFields); } return(encoding); }
public void Traverse(OpenApiEncoding encoding) { if (encoding == null) { return; } Visitor.Visit(encoding); if (encoding.Headers != null) { foreach (var header in encoding.Headers) { Traverse(header.Value); } } }
public void OpenApiEncodingComparerShouldSucceed( string testCaseName, OpenApiEncoding source, OpenApiEncoding target, List <OpenApiDifference> expectedDifferences) { _output.WriteLine(testCaseName); var comparisonContext = new ComparisonContext(new OpenApiComparerFactory(), _sourceDocument, _targetDocument); var comparer = new OpenApiEncodingComparer(); comparer.Compare(source, target, comparisonContext); var differences = comparisonContext.OpenApiDifferences.ToList(); differences.Count().ShouldBeEquivalentTo(expectedDifferences.Count); differences.ShouldBeEquivalentTo(expectedDifferences); }
/// <summary> /// Visits <see cref="OpenApiEncoding"/> /// </summary> public virtual void Visit(OpenApiEncoding encoding) { }
/// <summary> /// Visits <see cref="OpenApiEncoding"/> and child objects /// </summary> /// <param name="encoding"></param> internal void Walk(OpenApiEncoding encoding) { _visitor.Visit(encoding); Walk(encoding as IOpenApiExtensible); }
/// <summary> /// Execute validation rules against an <see cref="OpenApiEncoding"/> /// </summary> /// <param name="item">The object to be validated</param> public override void Visit(OpenApiEncoding item) => Validate(item);
public override void Visit(OpenApiEncoding encoding) { EncodeCall(); base.Visit(encoding); }