public void Accept()

in src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Visitors/OpenApiSchemaAcceptor.cs [54:97]


        public void Accept(VisitorCollection collection, NamingStrategy namingStrategy)
        {
            // Checks the properties only.
            if (this.Properties.Any())
            {
                foreach (var property in this.Properties)
                {
                    var attributes = new List<Attribute>
                    {
                        property.Value.GetCustomAttribute<OpenApiSchemaVisibilityAttribute>(inherit: false),
                        property.Value.GetCustomAttribute<OpenApiPropertyAttribute>(inherit: false),
                    };
                    attributes.AddRange(property.Value.GetCustomAttributes<ValidationAttribute>(inherit: false));
                    attributes.AddRange(property.Value.GetCustomAttributes<JsonPropertyAttribute>(inherit: false));

                    foreach (var visitor in collection.Visitors)
                    {
                        if (!visitor.IsVisitable(property.Value.PropertyType))
                        {
                            continue;
                        }

                        var type = new KeyValuePair<string, Type>(property.Key, property.Value.PropertyType);
                        visitor.Visit(this, type, namingStrategy, attributes.ToArray());
                    }
                }

                return;
            }

            // Checks the types only.
            foreach (var type in this.Types)
            {
                foreach (var visitor in collection.Visitors)
                {
                    if (!visitor.IsVisitable(type.Value))
                    {
                        continue;
                    }

                    visitor.Visit(this, type, namingStrategy);
                }
            }
        }