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

openapi: Change schema for team ids to string #144

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

pavog
Copy link
Contributor

@pavog pavog commented Nov 23, 2023

The schema for the team IDs in /teams is currently defined as:

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

this is wrong.
It would mean that a request to fetch multiple teams would look like this:
https://api.modrinth.com/v2/teams?ids=wKkoqHrH&ids=Ojp3IEa8
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 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/teams?ids=["vNcGR3Fd", "EBqEP7Kk"]

Related to:

@triphora triphora merged commit ecf9e44 into modrinth:master Nov 23, 2023
@pavog pavog deleted the patch-6 branch December 4, 2023 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants