CardanoSolutions / ogmios

❇️ A WebSocket JSON/RPC bridge for Cardano
https://ogmios.dev
Mozilla Public License 2.0
304 stars 90 forks source link

AcquireResponse.result differs from json schema #15

Closed rhyslbw closed 3 years ago

rhyslbw commented 3 years ago

What Git revision are you using?

03c1110217b08d27fac2da442ec3adeec2f23058

What operating system are you using, and which version?

Describe what the problem is?

The json schema has the AcquireFailure object keyed as points:

 "points": { "$ref": "#/definitions/AcquireFailure" }  

... however the actual response is keyed as failure:

{ AcquireFailure: { failure: 'pointTooOld' } }

https://github.com/KtorZ/cardano-ogmios/blob/master/docs/static/ogmios.wsp.json#L361

What should be the expected behavior?

 "failure": { "$ref": "#/definitions/AcquireFailure" }  
KtorZ commented 3 years ago

Doh. Sounds like wrong copy-pasting in the wsp doc :facepalm: . And sadly, this isn't caught by the generic test suite. Thanks for reporting!

KtorZ commented 3 years ago

So I increased the test coverage w.r.t to the various query messages. So far the tests were only covering the Query command, but not the Acquire & Release ones because they were simple enough :grimacing: ... In addition to your report, I also found another error in the AcquireSuccess yielded by the new test suite (points vs point :facepalm:).

Anyway, all fixed now. I'll make a new minor release 3.1.0 soon, but I'd like to add support for the GetRewardProvenance new query from 1.25.1 in Ogmios. The documentation from the ledger specifications however about this query is a bit cryptic / inexistant at this stage, so I am not quite sure how to interpret it / map it in JSON.