keel
keel copied to clipboard
fix: create hierarchical input messages for write functions
When creating write messages with inline fields; e.g.:
// keel schema
write testAction(id, name?, relation.id?) returns (SomeResponse)
we should create hierarchical input messages for any models field (relation.id
) e.g.:
// json schema
{
"type": "object",
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"relation": { "$ref": "#/components/schemas/TestActionRelationInput" }
},
"components": {
"schemas": {
"TestActionRelationInput": {
"type": ["object", "null"],
"properties": { "id": { "type": "string" } },
"additionalProperties": false
}
}
}