Skip to content

Align four shared 2.17 and Preview schemas with what the API sends - #761

Merged
markdennis22 merged 3 commits into
mainfrom
markdennis/2-17-other-lane-schemas
Oct 27, 2026
Merged

markdennis22 merged 3 commits into
mainfrom
markdennis/2-17-other-lane-schemas

Conversation

@markdennis22

@markdennis22 markdennis22 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Why?

Four shared 2.17 schemas didn't match what the API sends: custom object instance attribute values, the admin avatar, event metadata values, and error codes, which a few validation errors send as integers. The Preview spec has the same schemas, and the next version is cut from Preview, so it needs the same fixes.

How?

Corrects the four schemas to match the API's current behaviour, in 2.17 and in Preview.

Risks

The Preview SDKs are generated from this spec, so these changes affect generated Preview types:

Change Could SDK code stop compiling? Did that code work before?
CustomObjectInstance.custom_attributes values become a CustomObjectInstanceCustomAttributesValue union of string, integer, number, boolean or reference object Yes, where they were typed as strings No. The API already returns numbers, booleans and reference lists
Admin.avatar becomes a new AdminAvatar object with image_url and type, instead of a string Yes, if it reads avatar as a string No. The API sends the object
ErrorErrorsItem.code becomes an ErrorErrorsItemCode union of string and integer Yes, where it was typed as a string No. A few validation errors send the HTTP status as an integer, for example 422
Notes for reviewers
  • data_event.metadata now lists the value types. The Preview Fern overrides already keep metadata a free-form map, so its Preview type doesn't change.
  • fern check shows 0 errors. There are no new dangling refs and no operationId changes, and no changed Preview type is a bare unknown.

Generated with Claude Code

markdennis22 and others added 2 commits October 22, 2026 09:50
Types custom_object_instance custom attribute values, gives admin.avatar its object shape, widens data_event metadata values, and lets an error code be an integer as a few validation errors send it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Applies the same 2.17 changes to the Preview spec, merged operation by operation so Preview-only content stays, such as the `{id}` path parameter name. The next version is cut from Preview, and the Preview SDKs are generated from it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@markdennis22 markdennis22 changed the title Align four shared 2.17 schemas with what the API sends Align four shared 2.17 and Preview schemas with what the API sends Oct 23, 2026

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 wording fixes on admin.avatar, the same as the internal docs PR. The other three changes look right.

  1. avatar.type is only returned by List all admins. Retrieve an admin and Set an admin to away return avatar with image_url only. Suggested: "Value is avatar. Returned by List all admins only."
  2. On List all admins, avatar is only included when display_avatar is true, and it falls back to the default avatar image rather than a gravatar. Suggested: "The teammate's avatar image. On List all admins it is only included when display_avatar is true. Elsewhere it is left out when the teammate has neither an uploaded avatar nor a gravatar."

~ Automated via Claude

avatar.type is only sent by List all admins, and there avatar depends on display_avatar rather than an upload or gravatar.

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

Copy link
Copy Markdown
Contributor Author

Fixed both admin.avatar points in e708371, in the 2.17 and Preview (descriptions/0) specs, using your suggested wording. Same change on intercom/developer-docs#1279.

~ Automated via Claude

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.

Thanks Mark. e708371 fixes both admin.avatar points with the suggested wording, in 2.17 and Preview. At this head, merged with current main, both specs parse with no dangling refs, and fern check still shows 0 errors and the same 317 warnings as main.

Approving. The admin.avatar Preview SDK change is listed in the Risks table.

~ Automated via Claude

@markdennis22
markdennis22 merged commit 5038dcc into main Oct 27, 2026
4 checks passed
@markdennis22
markdennis22 deleted the markdennis/2-17-other-lane-schemas branch October 27, 2026 15:03
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