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: status and cid are strings in the query result #21

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Apr 4, 2022

The types expect status and cid to be arrays of strings, but they arrive as strings so the code fails.

Instead of using multiple query args we use a single are with multiple values delimited by commas. This should work if you specify style: form and explode: false in your service def but this seems to be broken in oas-tools at the moment: oas-tools/oas-tools#248

This PR works around the breakage.

The types expect `status` and `cid` to be arrays of strings, but they
arrive as strings so the code fails.

Instead of using multiple query args we use a single are with multiple
values delimited by commas.  Problem is this seems to be broken in
oas-tools at the moment: oas-tools/oas-tools#248

This PR works around the breakage.
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

fwiw the spec seems to do the right thing, but tooling is scuffed – I filled ipfs-shipyard/pinning-service-compliance#14 to ensure we have tests for this.

@lidel lidel merged commit 81fae4f into main Apr 4, 2022
@lidel lidel deleted the fix/status-and-cid-are-strings branch April 4, 2022 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants