Skip to content

Mirror Article version-history endpoints into Preview spec + Fern overrides#550

Open
rotimiy wants to merge 1 commit into
mainfrom
rotimiyemitan/parthas/55027b37-mirror-article-version-history-endpoints-into-preview-spec-fern-overr
Open

Mirror Article version-history endpoints into Preview spec + Fern overrides#550
rotimiy wants to merge 1 commit into
mainfrom
rotimiyemitan/parthas/55027b37-mirror-article-version-history-endpoints-into-preview-spec-fern-overr

Conversation

@rotimiy

@rotimiy rotimiy commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Why?

The Article version-history endpoints (GET /articles/{article_id}/versions and .../versions/{id}) shipped in the monolith and were documented in developer-docs, but were missing from the Preview OpenAPI spec that feeds Fern SDK generation. Without them here, SDK clients had no methods for version history even though the API supports it.

How?

Mirror the two path operations and three supporting schemas into descriptions/0/api.intercom.io.yaml, and add x-fern-sdk-* / x-fern-pagination entries to fern/preview-openapi-overrides.yml so Fern emits articles.listVersions() and articles.findVersion() methods.

Related PRs

  • Ships the endpoints (monolith): intercom/intercom#521981
  • Companion developer-docs type-fix: intercom/developer-docs#972
Decisions
  • Scoped to Preview only (descriptions/0/ + fern/preview-openapi-overrides.yml); stable versions and fern/openapi-overrides.yml are untouched.
  • Response *_id fields (article_id, author_id, created_by_id) are typed string with quoted examples, matching the shipped monolith presenter (it stringifies them via .to_s, asserted by the merged request specs). The companion developer-docs PR (intercom/developer-docs#972) aligns the canonical spec on the same string typing.
  • URL path-parameter article_id stays type: integer — it comes off the Rails route and does not pass through the presenter.
  • SDK naming follows the stable Articles convention: group articles, methods listVersions / findVersion, request names ListArticleVersionsRequest / FindArticleVersionRequest.
  • x-fern-pagination is added only on the list operation, matching the /articles precedent.
  • Verified via fern check — no new errors (the 3 pre-existing errors are unrelated).

Generated with Claude Code, zen coded with Parthas

Mirrors developer-docs PR #970 into the Intercom-OpenAPI Preview spec so SDK
generation produces client methods for the new version-history endpoints from
monolith PR intercom/intercom#521981:

- GET /articles/{article_id}/versions  (listArticleVersions / articles.listVersions)
- GET /articles/{article_id}/versions/{id}  (retrieveArticleVersion / articles.findVersion)

Adds three response schemas (article_version, article_version_list,
article_version_summary) and SDK overrides in fern/preview-openapi-overrides.yml
under the existing 'articles' group, with x-fern-pagination on the list
operation matching the /articles GET precedent.

Corrects developer-docs PR #970's typing of response *_id fields: article_id,
author_id and created_by_id are 'string' (not 'integer') with quoted example
values, because the monolith presenter stringifies them via .to_s (verified
against the merged request specs). URL path-param article_id stays 'integer'
since it does not pass through the presenter. PR #970 will be patched
separately to match.
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.

1 participant