-
Notifications
You must be signed in to change notification settings - Fork 980
Open
Description
The JSON schema for invoice.exposeprivatechannels defines a oneOf with both boolean and array variants (doc/schemas/invoice.json:63-83):
"exposeprivatechannels": {
"oneOf": [
{ "type": "boolean" },
{ "type": "array", "items": { "type": "short_channel_id" } },
{ "type": "short_channel_id" }
]
}
However, in contrib/msggen/msggen/model.py:502, this field is manually overridden to only the array type:
InvoiceExposeprivatechannelsField = ArrayField(
itemtype=PrimitiveField("short_channel_id", None, None, added=None, deprecated=None),
dims=1, path=None, description=None, added=None, deprecated=None
)
And applied at model.py:544:
overrides = {
'Invoice.exposeprivatechannels': InvoiceExposeprivatechannelsField,
...
}
This causes the generated cln-rpc binding to type the field as Option<Vec<ShortChannelId>> (cln-rpc/src/model.rs), making it impossible to pass exposeprivatechannels: true through the typed API.
Since msggen already has UnionField support for oneOf schemas (model.py:369-387), could this override be removed or updated to preserve both variants?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels