[OpenAPI] Support using Default
trait when derive Object
#369
Labels
enhancement
New feature or request
Default
trait when derive Object
#369
Description of the feature
Currently, only the fields of
Object
has thedefault
parameter. And it can only be used for some types that already implementDefault
, or have a function to generate the default value.It might be more convenient if we could define
Default
for structs and use it.Notice: I don't know if this is possible. Have taken a simple look at the macro of
Object
, it takes fields' attributes one by one and generates codes.Code example (if possible)
Suppose rust codes like this:
The text was updated successfully, but these errors were encountered: