You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public static final class ConstantDefaultProvider implements IDefaultProvider {
@Override
public String getDefaultValueFor(String optionName) {
return "hello";
}
}
the labels parameter will contain the default for each name, in this case twice, once parsing is complete.
The reason is that separate a ParameterDescription is created for each name of a parameter, which are however backed by single Parameter object. The default provider is called once for each description, which is acceptable for single value fields since the field will be simply overwritten (provided that the default provider handles both cases the same way), but in the case of collections we are mutating the field instead causing duplicates.
The text was updated successfully, but these errors were encountered:
npetzall
added a commit
to npetzall/schemaspy
that referenced
this issue
Mar 24, 2023
When using a list parameter with multiple names
and a
IDefaultProvider
the
labels
parameter will contain the default for each name, in this case twice, once parsing is complete.The reason is that separate a
ParameterDescription
is created for each name of a parameter, which are however backed by single Parameter object. The default provider is called once for each description, which is acceptable for single value fields since the field will be simply overwritten (provided that the default provider handles both cases the same way), but in the case of collections we are mutating the field instead causing duplicates.The text was updated successfully, but these errors were encountered: