Mirror Article version-history endpoints into Preview spec + Fern overrides#550
Open
rotimiy wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
The Article version-history endpoints (
GET /articles/{article_id}/versionsand.../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 addx-fern-sdk-*/x-fern-paginationentries tofern/preview-openapi-overrides.ymlso Fern emitsarticles.listVersions()andarticles.findVersion()methods.Related PRs
Decisions
descriptions/0/+fern/preview-openapi-overrides.yml); stable versions andfern/openapi-overrides.ymlare untouched.*_idfields (article_id,author_id,created_by_id) are typedstringwith 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.article_idstaystype: integer— it comes off the Rails route and does not pass through the presenter.articles, methodslistVersions/findVersion, request namesListArticleVersionsRequest/FindArticleVersionRequest.x-fern-paginationis added only on the list operation, matching the/articlesprecedent.fern check— no new errors (the 3 pre-existing errors are unrelated).Generated with Claude Code, zen coded with Parthas