Summary
The /cancelhodlinvoice request body references #/components/schemas/InvoiceCancelRequest, but that schema does not exist. The defined OpenAPI component and the Rust request type are both named CancelHodlInvoiceRequest.
Affected commit / version
- Commit:
af03c7f1a65135a429f05a5820600338215954dc
- Package version:
0.1.0
- Branch:
dev
Environment
- Python 3 with PyYAML 6.0.1
- Local
openapi.yaml; no daemon or network service
Expected behavior
Every local OpenAPI $ref should resolve to a component in the same document.
Actual behavior
The reference-resolution test reports one missing component:
test_all_local_schema_references_resolve ... FAIL
AssertionError: ['InvoiceCancelRequest'] != []
Minimal local regression test
Recursively collect every $ref starting with #/components/schemas/ and assert that each referenced name is present under components.schemas.
Exact command and observed output
python3 audit_tests/test_openapi_contract.py
...
AssertionError: ['InvoiceCancelRequest'] != []
Root cause
- Broken reference:
|
/cancelhodlinvoice: |
|
post: |
|
tags: |
|
- Invoices |
|
summary: Cancel a HODL invoice |
|
description: Cancel a held HTLC for a HODL invoice. Rejects cancellation if a settlement is already in progress. |
|
requestBody: |
|
content: |
|
application/json: |
|
schema: |
|
$ref: '#/components/schemas/InvoiceCancelRequest' |
- Runtime request:
|
#[derive(Deserialize, Serialize)] |
|
pub(crate) struct CancelHodlInvoiceRequest { |
|
pub(crate) payment_hash: String, |
|
} |
The reference uses the old/inverted name while the component and runtime use CancelHodlInvoiceRequest.
Concrete user impact
The published API contract is internally unresolved for this endpoint. This audit tested reference resolution only; it did not claim a specific generator/runtime error.
Fork / upstream assessment
The endpoint is absent from the compared upstream master. Upstream PR #91 contains HODL invoice work, but no review or issue was found for this OpenAPI reference defect.
Duplicate-check evidence and limitations
Exact schema name, endpoint, $ref, OpenAPI, and unresolved-reference searches found no report/fix in either tracker. Current UTEXO PRs #139/#140 modify the spec but have no relevant schema-name hunk. Private discussions are not visible.
Suggested fix direction
Point the request body at #/components/schemas/CancelHodlInvoiceRequest and add a repository OpenAPI local-reference validation gate.
Summary
The
/cancelhodlinvoicerequest body references#/components/schemas/InvoiceCancelRequest, but that schema does not exist. The defined OpenAPI component and the Rust request type are both namedCancelHodlInvoiceRequest.Affected commit / version
af03c7f1a65135a429f05a5820600338215954dc0.1.0devEnvironment
openapi.yaml; no daemon or network serviceExpected behavior
Every local OpenAPI
$refshould resolve to a component in the same document.Actual behavior
The reference-resolution test reports one missing component:
Minimal local regression test
Recursively collect every
$refstarting with#/components/schemas/and assert that each referenced name is present undercomponents.schemas.Exact command and observed output
Root cause
rgb-lightning-node/openapi.yaml
Lines 174 to 184 in af03c7f
rgb-lightning-node/src/routes.rs
Lines 465 to 468 in af03c7f
The reference uses the old/inverted name while the component and runtime use
CancelHodlInvoiceRequest.Concrete user impact
The published API contract is internally unresolved for this endpoint. This audit tested reference resolution only; it did not claim a specific generator/runtime error.
Fork / upstream assessment
The endpoint is absent from the compared upstream master. Upstream PR #91 contains HODL invoice work, but no review or issue was found for this OpenAPI reference defect.
Duplicate-check evidence and limitations
Exact schema name, endpoint,
$ref, OpenAPI, and unresolved-reference searches found no report/fix in either tracker. Current UTEXO PRs #139/#140 modify the spec but have no relevant schema-name hunk. Private discussions are not visible.Suggested fix direction
Point the request body at
#/components/schemas/CancelHodlInvoiceRequestand add a repository OpenAPI local-reference validation gate.