Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JSON API /contracts/lookup endpoint #3755

Closed
leo-da opened this issue Dec 5, 2019 · 3 comments · Fixed by #3809
Closed

Fix JSON API /contracts/lookup endpoint #3755

leo-da opened this issue Dec 5, 2019 · 3 comments · Fixed by #3809
Labels
component/json-api HTTP JSON API team/ledger-clients Related to the Ledger Clients team's components.

Comments

@leo-da
Copy link
Contributor

leo-da commented Dec 5, 2019

It currently allows only GET requests, which is a mistake:

case req @ HttpRequest(GET, Uri.Path("/contracts/lookup"), _, _, _) =>

@leo-da leo-da added this to the HTTP JSON API Maintenance milestone Dec 5, 2019
@leo-da
Copy link
Contributor Author

leo-da commented Dec 5, 2019

@hurryabit this should give you fetch by contract ID and fetch by contract key... when it is fixed.

@hurryabit
Copy link
Contributor

Can we please add documentation for this endpoint?

@leo-da
Copy link
Contributor Author

leo-da commented Dec 12, 2019

see the TODO in the above PR.

leo-da added a commit that referenced this issue Dec 12, 2019
CHANGELOG_BEGIN

- [JSON API - Experimental] Fix and document ``/contracts/lookup`` endpoint. See #3755.

CHANGELOG_END
@mergify mergify bot closed this as completed in #3809 Dec 12, 2019
mergify bot pushed a commit that referenced this issue Dec 12, 2019
* Lookup by Contract ID and Contract Key is WIP

* factor out "contract ID or key" JSON decoding

- adapted from fc13225 (#2695)

* Resolving conflicts

* Resolving conflicts

* Lookup by contract ID works

* Testing new contract created by IOU_Transfer can be looked up

* error if key and contractId specified for lookup at the same time

* Lookup by contract key test

* Lookup docs

* re-format with `./fmt.sh`

* minor cleanup

CHANGELOG_BEGIN

- [JSON API - Experimental] Fix and document ``/contracts/lookup`` endpoint. See #3755.

CHANGELOG_END
@stefanobaghino-da stefanobaghino-da added component/json-api HTTP JSON API team/ledger-clients Related to the Ledger Clients team's components. labels Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/json-api HTTP JSON API team/ledger-clients Related to the Ledger Clients team's components.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants