You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Swagger/OpenAPI documenation is supposed to be interactive and offer the user a way into an API. Currently, a number of endpoints in the plutus-chain-index docs are incomplete and it is difficult/impossible for a new user to access these and find the right way into the endpoints.
Take for example this naive use of the tx endpoint:
This successfully returns transaction information on preprod.
Connected to: #130
Connected to #652
Connected to #651
Connected to #4
Describe the approach you would take to fix this
Add the documentation to the endpoints where there is none. The example value/schema portion of the endpoint needs to be complete and accurate. Not just "string" as this can't be reverse engineered by anyone.
An annotated error response from plutus may also be amended to describe the expected schema, i.e. when is seeks an object, what does the object look like.
Error in $: parsing Plutus.V1.Ledger.Tx.TxId(TxId) failed, expected Object, but encountered String
Could be:
Error in $: parsing Plutus.V1.Ledger.Tx.TxId(TxId) failed, expected Object of type {"getTxId": "acdc1234"}, but encountered String
NB. Not a plutus developer, so this latter part may be out of anyone's control.
System info
Unsure as to which plutus-chain-index is being used as I am not sure version is available from the command line options.
The text was updated successfully, but these errors were encountered:
NB. between the POST verb here, and the JSON (getTxId) there's some confusion in verbage. I don't know what scope there is to fix that kind of thing, but if that's worthy of another ticket, we can make that. It will be easier to analyse the different schema once it's more visible.
Summary
Swagger/OpenAPI documenation is supposed to be interactive and offer the user a way into an API. Currently, a number of endpoints in the plutus-chain-index docs are incomplete and it is difficult/impossible for a new user to access these and find the right way into the endpoints.
Take for example this naive use of the tx endpoint:
Steps to reproduce the behavior
On the command line the result looks as follows:
Actual Result
Expected Result
A valid request can be built for any endpoint on the chain-index API and it will return something sensible.
Thanks to this Cardano stack exchange post, we have a way forward for this endpoint: https://cardano.stackexchange.com/questions/7714/how-to-query-the-chain-index-tx-endpoint
e.g.
This successfully returns transaction information on preprod.
Connected to: #130
Connected to #652
Connected to #651
Connected to #4
Describe the approach you would take to fix this
Add the documentation to the endpoints where there is none. The example value/schema portion of the endpoint needs to be complete and accurate. Not just "string" as this can't be reverse engineered by anyone.
An annotated error response from plutus may also be amended to describe the expected schema, i.e. when is seeks an object, what does the object look like.
Could be:
NB. Not a plutus developer, so this latter part may be out of anyone's control.
System info
Unsure as to which plutus-chain-index is being used as I am not sure version is available from the command line options.
The text was updated successfully, but these errors were encountered: