Open pshirshov opened 6 years ago
@pshirshov How get should deal with follow input?
"from": {
"email": "sam.smith@example.com",
"name": "Sam Smith"
},
"reply_to": {
"email": "sam.smith@example.com",
"name": "Sam Smith"
"extra_field" : "foo" // new field!
}
Either:
// One for both inputs
data emailUser {
email : str
name : str
extraField : opt[str]
}
or
data emailUser {
email : str
name : str
}
data emailUserWithExtra {
email : str
name : str
extraField : str
}
I guess second one. From what I can see first one requires a complex and fragile heuristic.
We may implement a tool converting a JSON into a set of model drafts.
This API call:
may be translated into
This may allow us to interoperate with simple REST data providers.
Also we may convert swagger and other popular formats into our models. Kinda related: 7mind/idealingua-v1#19