In our auto-generated input json file we have this object:
"DataStream": {
"properties": {
"metadata": {
"type": "object",
"title": "Metadata",
"description": "Arbitrary metadata in key/value pairs.",
"default": {}
}
},
"type": "object",
"title": "DataStream"
},
This results in this invalid dart code after running openapi_spec:
abstract class DataStream with _$DataStream {
const DataStream._();
const factory DataStream({
@Default(dynamic()) dynamic metadata,
}) = _DataStream;
}
The error message is:
'dynamic' isn't a function.
Try correcting the name to match an existing function, or define a method or function named 'dynamic'.
Is this a bug or is the json input not on a valid format?