Skip to content

Remove Preview SDK request body overrides that point at missing schemas - #750

Open
yasser-aboelgheit-intercom wants to merge 2 commits into
mainfrom
yasser/fern-preview-request-refs
Open

yasser-aboelgheit-intercom wants to merge 2 commits into
mainfrom
yasser/fern-preview-request-refs

Conversation

@yasser-aboelgheit-intercom

@yasser-aboelgheit-intercom yasser-aboelgheit-intercom commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Why?

Six Preview SDK overrides pointed at request schemas that don't exist, so the generated Preview SDK typed those requests as unknown. This covers creating and updating a data attribute, and creating an article, a company, a phone call redirect and a ticket type.

How?

Removes those override blocks so Fern uses the request schemas the Preview spec already defines. Each of these Preview SDK methods now takes a named request type instead of unknown, so callers will see required fields such as name and category on ticket types and phone on phone call redirects.

Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@cathalging cathalging left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two more overrides point at missing schemas

The four repoints here are right. Each new target is what the Preview spec's own requestBody already uses, so the SDK and the docs now agree for those operations.

Required: data attributes have the same problem

fern/preview-openapi-overrides.yml:8 and :15:

$ref: '#/components/schemas/CreateDataAttributeRequest'   # POST /data_attributes
$ref: '#/components/schemas/UpdateDataAttributeRequest'   # PUT /data_attributes/{id}

Neither schema is defined in descriptions/0 or in the overrides file. The defined ones are create_data_attribute_request and update_data_attribute_request. The generated Preview SDK shows the same symptom as the other four: createDataAttribute(request?: unknown). Repointing these two would make the file fully clean.

Operation Current target Suggested target
POST /data_attributes CreateDataAttributeRequest (missing) create_data_attribute_request
PUT /data_attributes/{id} UpdateDataAttributeRequest (missing) update_data_attribute_request

@yasser-aboelgheit-intercom, would you rather fold these two into this PR, or merge the four and follow up with data attributes separately?

Optional

  • Delete the override blocks instead. Each repointed block now just repeats what the spec already says, so removing it gives the same merged spec. Fern Check reports 0 errors and 317 warnings with or without these broken refs, so a future rename would break a repeated block again without any warning.
  • Heads-up for the release notes: each request goes from accepting anything to a named type, which changes the method signature for Preview SDK callers. Fields that become required: name and category on ticket types, and phone on phone call redirects.

~ Automated via Claude (about: https://github.com/intercom/claude-plugins/blob/main/plugins/base/docs/external-message-attribution.md)

cathalging
cathalging previously approved these changes Oct 21, 2026

@cathalging cathalging left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. The point in my earlier comment is your call: fix it here or take it as a follow-up.

~ Automated via Claude (about: https://github.com/intercom/claude-plugins/blob/main/plugins/base/docs/external-message-attribution.md)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@yasser-aboelgheit-intercom yasser-aboelgheit-intercom changed the title Point Preview SDK request body overrides at schemas that exist Remove Preview SDK request body overrides that point at missing schemas Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I checked it with fern check (0 errors, same warnings as main) and the Fern IR before and after, checked every $ref in the overrides file against the Preview spec, and checked the required fields against how the API behaves. There's no companion docs PR because this only touches the Fern overrides.

  • All six removed overrides pointed at schemas that don't exist in the Preview spec. After this PR, every remaining $ref in the file resolves.
  • In the IR, the six request bodies change from unknown to named types: CreateArticleRequest, CreateDataAttributeRequest, UpdateDataAttributeRequestBody, CreateOrUpdateCompanyRequest, CreatePhoneSwitchRequest and CreateTicketTypeRequest. The IR's unknown count drops by 7.
  • The API does require the fields the PR mentions. Ticket types need name, and category on 2.10+ and Preview. Phone call redirects need phone.

A few questions:

  1. Preview SDK signatures — Six Preview SDK methods change from taking unknown to taking typed requests with required fields. That's the point of the PR, but it changes method signatures, so callers who passed a loose object may see compile errors. Could someone who owns the SDK release confirm that's fine for a Preview release?
  2. Phone call redirect error shape — If phone is missing, the API returns 422 with {"error_key": "caller_phone"} rather than the usual error.list. That's outside this PR, but worth a follow-up so the documented error matches.

Not approving: this is my own PR, and item 1 needs a human decision.

~ Automated via Claude

@cathalging cathalging left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving. Removing the blocks is the cleaner fix: each one only repeated the spec's own request body, the two data attribute overrides that pointed at missing schemas are gone with them, and the overrides file no longer has any $ref left to go stale. For the release notes: six Preview request types go from untyped to named types, with name/category (ticket types), phone (phone call redirects) and name/model/data_type (create data attribute) becoming required.

~ Automated via Claude (about: https://github.com/intercom/claude-plugins/blob/main/plugins/base/docs/external-message-attribution.md)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants