diff --git a/src/LEGO.AsyncAPI/Models/AsyncApiSerializableExtensions.cs b/src/LEGO.AsyncAPI/Models/AsyncApiSerializableExtensions.cs index 624cfdba..1d1bd35a 100644 --- a/src/LEGO.AsyncAPI/Models/AsyncApiSerializableExtensions.cs +++ b/src/LEGO.AsyncAPI/Models/AsyncApiSerializableExtensions.cs @@ -109,6 +109,11 @@ public static void Serialize( throw new ArgumentNullException(nameof(stream)); } + if (settings is null) + { + throw new ArgumentNullException(nameof(settings)); + } + var streamWriter = new FormattingStreamWriter(stream, settings.CultureInfo); IAsyncApiWriter writer = format switch