Skip to content
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Conversation

@pavog
Copy link
Contributor

@pavog pavog commented Nov 23, 2023

The schema for the thread IDs in /threads is currently defined as:

schema:
  type: array
  items:
    type: string
  example: "[\"AABBCCDD\", \"EEFFGGHH\"]"

this is wrong.
It would mean that my request to fetch multiple threads would look like this:
https://api.modrinth.com/v2/threads?ids=vNcGR3Fd&ids=EBqEP7Kk
This does not work and returns this response:

{
  "error": "invalid_input",
  "description": "Error while validating input: Query deserialize error: duplicate field `ids`"
}

This PR changes the schema for the thread IDs to string.
It is actually a string, written like an array in json.

New

schema:
 type: string
 example: "[\"AABBCCDD\", \"EEFFGGHH\"]"

And the request will look like this:
https://api.modrinth.com/v2/threads?ids=["vNcGR3Fd", "EBqEP7Kk"]

Related to:

@triphora triphora merged commit 3015936 into modrinth:master Nov 23, 2023
@pavog pavog deleted the patch-5 branch December 4, 2023 09:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants