Faulty open API spec


I found a bug in the open api specification: https://developers.pipedrive.com/docs/api/v1/openapi.yaml.
The endpoint /deals/{dealId}/products will spit out the following structure:

data: [
        "id": 999,
        "deal_id": 999,
        "product_id": 999,
        "product_variation_id": null,
        "name": "XXXXXXXXXXX",
        "order_nr": 0,

But according to the Open API specification, the data has an items key nested inside with the array of objects.

Hi Nathan!

Good catch. We deployed a fix today. Documentation was wrong, it should be just an array of objects.

You can find an example of the response in the API developer corner: Pipedrive API v1 Reference

Other inconsistencies, feel free to raise for us to fix.

Best Regards,
Pedro Franco

1 Like

Thanks @Pedro_Franco, I have built a strictly typed codegen based on the schema and it’s working now. Many thanks!

I have found one more small dubious thing, then that should be it, for now :slight_smile:

updateMailThreadDetailsRequest →

  • shared_flag
  • read_flag
  • archived_flag

Should those be strings instead of numbers? Debatable but this is currently the case according to the typescript spec for the method formUrlEncoded.append.

See URLSearchParams API should accept numbers for values · Issue #1568 · microsoft/TypeScript-DOM-lib-generator · GitHub