We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a6d3386 + 0c548a1 commit 2da3a72Copy full SHA for 2da3a72
1 file changed
src/Swashbuckle.AspNetCore.SwaggerGen/SchemaGenerator/SchemaGenerator.cs
@@ -90,7 +90,7 @@ private OpenApiSchema GenerateSchemaForMember(
90
}
91
92
// NullableAttribute behaves diffrently for Dictionaries
93
- if (modelType.IsGenericType && modelType.GetGenericTypeDefinition() == typeof(Dictionary<,>))
+ if (schema.AdditionalPropertiesAllowed && modelType.IsGenericType && modelType.GetGenericTypeDefinition() == typeof(Dictionary<,>))
94
{
95
schema.AdditionalProperties.Nullable = !memberInfo.IsDictionaryValueNonNullable();
96
0 commit comments