intercom / Intercom-OpenAPI

An OpenAPI description for Intercom's REST API
MIT License
11 stars 8 forks source link

[Schema Inaccuracy] `sort` parameter is available but not documented. #114

Open rassakhatsky opened 1 year ago

rassakhatsky commented 1 year ago

Schema Inaccuracy

The searchConversations endpoint lacks documentation for the sort option, which is available but not mentioned. I'm trying to generate a Golang client.

Expected

I expect the documentation to include information about the sort functionality.

Reproduction Steps

Use the following cURL command with your Intercom API token:

   curl -i -X POST \
     https://api.intercom.io/conversations/search \
     -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
     -H 'Content-Type: application/json' \
     -H 'Intercom-Version: 2.10' \
     -d '{
     "sort": {
       "field": "id",
       "order": "ascending"
     },
     "query": {
       // YOUR_QUERY_HERE
     }
   }'
jekh commented 10 months ago

I believe this applies to other Search* operations too, such as SearchContacts.

I found the documentation for sort here: https://developers.intercom.com/docs/build-an-integration/learn-more/rest-apis/pagination-sorting-search/#sorting

But since it's not in the schema, it obviously makes consuming it in clients generated from the OpenAPI spec rather difficult.