Browse Source

Merge pull request #178 from provokateurin/fix/required-parameters-with-default

dynamite: Fix required parameters with default value
pull/180/head
Kate 2 years ago committed by GitHub
parent
commit
df2060f41a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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