public static OpenApiSchema GetPropertySchema(this OpenApiSchema schema, string propertyName) { if (string.IsNullOrEmpty(propertyName)) { throw new ArgumentNullException(nameof(propertyName)); } if (schema == null) { return(null); } return(schema.GetAllProperties().FirstOrDefault(p => p.Key.Equals(propertyName, StringComparison.OrdinalIgnoreCase)).Value); }