Fix GET /data_connectors/{id}: correct schema to use present_detail fields#407
Fix GET /data_connectors/{id}: correct schema to use present_detail fields#407salmanbshah wants to merge 2 commits intomainfrom
Conversation
ellicenelson
left a comment
There was a problem hiding this comment.
Is there a corresponding developer-docs PR for these changes?
Also this may conflict with new changes on main.
descriptions/0/api.intercom.io.yaml
Outdated
| You can retrieve the full detail of a single data connector by its ID. | ||
|
|
||
| The response includes full detail about the connector including its configuration, data inputs, response fields, and object mappings. | ||
| The response includes configuration, data inputs, response fields, and object mappings. Pass `state_version=draft` to retrieve the unpublished draft version. |
There was a problem hiding this comment.
The function of state_version is still behind a feature flag and is not yet rolled out. This (and the corresponding 400) should be excluded until that change has GA
descriptions/0/changelog.md
Outdated
| @@ -1,3 +1,6 @@ | |||
| ## `GET /data_connectors/{id}` schema corrected | |||
There was a problem hiding this comment.
These can be consolidated with the existing data connectors changelog entry and can avoid traces of "missing" and "fixed" since this is expected in the Unstable version
descriptions/0/api.intercom.io.yaml
Outdated
| schema: | ||
| "$ref": "#/components/schemas/data_connector" | ||
| "$ref": "#/components/schemas/data_connector_detail" | ||
| '400': |
41f03af to
5245126
Compare
salmanbshah
left a comment
There was a problem hiding this comment.
Separate developer-docs PR created for the data connectors show endpoint: https://github.com/intercom/developer-docs/pull/781
| @@ -1,5 +1,5 @@ | |||
| ## `GET /data_connectors/{id}` added | |||
| Added missing show endpoint for retrieving a single data connector by ID. | |||
| ## Data Connectors: `GET /data_connectors/{id}` | |||
There was a problem hiding this comment.
The changelog convention actually lives in developer-docs. I'd actually drop this file and keep changelog entries in developer-docs only for consistency
Why?
The original documentation for
GET /data_connectors/{id}(merged in PR #403) used the wrong response schema — it reflected the list-view fields fromDataConnectorPresenter.presentrather than the richerpresent_detailthat theshowaction actually calls. Ellice Nelson flagged this: "The schema updates here don't match the fields returned." Customers relying on the docs to build against this endpoint would see fields likedata_inputs,response_fields, andobject_mappingsin real responses that are completely absent from the spec.How?
Corrected the path entry to reference a new
data_connector_detailschema that matchesDataConnectorPresenter.present_detailexactly, and added the optionalstate_versionquery parameter (live/draft) that the controller supports.Decisions
data_connector_detailschema rather than patching the existingdata_connectorschema — the list endpoint uses the simpler fields intentionally and should stay lightweight.Implementation Plan
Fix data_connectors schema + Surgical developer-docs PR
Context
PR #778 is wrong — it replaces the entire developer-docs Unstable YAML with the Intercom-OpenAPI copy, causing a +1260/-1400 diff with hundreds of unrelated deletions. The two repos were NEVER true mirrors (2033 lines of diff across 123 chunks before our work). PR #777 also made a huge reformat (+2201/-3249) that #778 predates.
The correct approach: add ONLY the 3 missing path entries surgically to the developer-docs YAML (fin_voice was already added by #777).
Confirmed Gaps
api/v3/data_connectors_controller.rbGET /data_connectors/{id}— schema wrong, needspresent_detailfieldsapi/v3/conversation_parts_controller.rbPUT /conversations/{conversation_id}/conversation_parts/{id}api/v3/messages_controller.rbGET /messages/whatsapp/statusBackend References
Generated with Claude Code