Browse Source

dynamite: Fix required parameters with default value

pull/178/head
jld3103 2 years ago
parent
commit
16b5e5b7ff
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/dynamite/lib/src/openapi_builder.dart

2
packages/dynamite/lib/src/openapi_builder.dart

@ -584,7 +584,7 @@ class OpenAPIBuilder implements Builder {
b
..named = true
..name = _toDartName(parameter.name)
..required = parameter.required ?? false;
..required = (parameter.required ?? false) && defaultValueCode == null;
if (parameter.schema != null) {
b.type = refer(
_makeNullable(

Loading…
Cancel
Save