Skip to content

Hangar API Documentation for endpoint is wrongย #1520

@outasi

Description

@outasi

Observed/problematic behavior

The example in the documentation for /api/v1/projects endpoint suggests that for pagination, the requests should be made with GET parameters as such, after setting up the pagination according to the schema and pressing on TRY:
curl -X GET "https://hangar.papermc.io/api/v1/projects?pagination%5Blimit%5D=1&pagination%5Boffset%5D=0" \ -H 'accept: application/json'

The response, either through curl or the built-in UI for requests is:
{ "message": "[pagination[offset], pagination[limit]] are invalid parameters/filters for this request", "messageArgs": [], "isHangarApiException": true, "httpError": { "statusCode": 400 } }

Expected behavior

Either a 200 response with a single project listed, or a different endpoint configuration in the example that returns 200.

Steps to reproduce

On the page https://hangar.papermc.io/api-docs#get-/api/v1/projects, simply click TRY, as the default curl command will be
curl -X GET "https://hangar.papermc.io/api/v1/projects?pagination%5Blimit%5D=1&pagination%5Boffset%5D=0" \ -H 'accept: application/json'

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. bugSomething isn't working1. documentationImprovements or additions to documentation

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions