Document article AI agent availability fields in Preview OpenAPI spec#495
Open
ib-skoric wants to merge 1 commit into
Conversation
…w spec Add ai_chatbot_availability, ai_copilot_availability, and ai_sales_agent_availability to article_content and article_list_item schemas in the Preview OpenAPI spec (descriptions/0/). - article_content: fields propagate to translated_content per-locale objects - article_list_item: fields appear at top-level article responses - Updated inline response examples for 5 article endpoints Source: intercom/intercom#508483
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?
PR intercom/intercom#508483 added three boolean availability fields (
ai_chatbot_availability,ai_copilot_availability,ai_sales_agent_availability) to article content responses on the Preview API version, but the OpenAPI spec did not document them. Without this, SDK consumers miss the fields in generated types and the API reference is inaccurate.How?
Add the three boolean properties to both
article_contentandarticle_list_itemschemas in the Preview spec, and extend inline response examples for the five article endpoints that return article bodies.Decisions
article_contentandarticle_list_itemso the fields surface at the top level and insidetranslated_content.{locale};articleandarticle_translated_contentinherit viaallOf/$refand need no direct edits.descriptions/0/api.intercom.io.yamlsince the source PR gates the fields behind the Preview version only.create_article_request,update_article_request) and the DELETE endpoint example were left alone.default: false(unlike theexternal_pageprecedent) because these are response-only fields with no server-side request default.article_list_itemto match the convention already used by sibling properties.Review Guidance
░░░░░░░░░░ 0.8Why
Single-file YAML edit with isolated, repeated insertions; no cross-cutting impact.░░░░░░░░░░ 0.6Why
Diff matches the PR description and plan precisely with no surprises.░░░░░░░░░░ 0.8Why
Documentation-only spec change with no runtime, auth, or data implications.Attention: Routine review — Pure additive OpenAPI doc change matching the plan exactly — three boolean fields added to two schemas and five inline examples.
🧪 This AI-generated review guidance is experimental. Share feedback
Implementation Plan
Worker Implementation Plan
Plan: Add article AI agent availability fields to OpenAPI spec
Context
PR
intercom/intercom#508483added three boolean fields —ai_chatbot_availability,ai_copilot_availability,ai_sales_agent_availability— to article content API responses in the Preview version. The intercom-openapi spec needs to document these fields so SDK consumers see them in generated types and the API docs are accurate.Only the Preview spec (
descriptions/0/api.intercom.io.yaml) needs updating. No other version files are affected.File to modify
descriptions/0/api.intercom.io.yaml— single file, all edits below.Understanding the schema relationships
articleschema (line ~19297) usesallOfwitharticle_list_item+ addsstatisticsarticle_list_item(lines 19496-19599) defines top-level article properties (title, body, state, url, folder_id, etc.)article_content(lines 19320-19388) defines per-locale content properties; used viaarticle_translated_contentfor multilingual articlesarticle_translated_content(lines 19814-19939) has locale keys that each$refarticle_contentarticle_list_item)Both
article_contentANDarticle_list_itemneed the new fields:article_content: so the fields appear intranslated_content.{locale}.*for multilingual articlesarticle_list_item: so the fields appear at the top level of article responses (where inline examples live)Request schemas are out of scope — the order is about response documentation.
Edits (apply bottom-up to avoid line drift)
Edit 1:
article_list_item— add 3 fields afterfolder_id(line 19599)Insert after line 19599 (
example: 6), before line 19600 (internal_article_list_item:):Convention note: The "For multilingual articles, this will be the value of the default language's content." suffix matches the pattern used by other
article_list_itemproperties (title,description,body,state, etc.).Edit 2:
article_content— add 3 fields afteraudience_ids(line 19388)Insert after line 19388 (
- 2), before line 19389 (internal_article_list:):Edit 3: Inline response examples — add fields to 5 article endpoints
Add the 3 boolean fields after
urlin each article endpoint's inline response example. The fields are NOT added to the DELETE endpoint (which returns{id, object, deleted}only).3a. GET /articles (list) — after line 1251
After
url: http://help-center.test/myapp-64/en/articles/39-..., insert (22-space indent):3b. POST /articles (create) — after line 1313
After
url: http://help-center.test/myapp-68/en/articles/42-..., insert (20-space indent):3c. GET /articles/{id} (retrieve) — after line 1428
After
url: http://help-center.test/myapp-74/en/articles/45-..., insert (20-space indent):3d. PUT /articles/{id} (update) — after line 1512
After
url: http://help-center.test/myapp-80/en/articles/48-..., insert (20-space indent):3e. GET /articles/search — after line 1689
After
url:(null value), insert (24-space indent):Edit order (to avoid line drift)
Apply edits from highest line number to lowest:
article_list_item(line 19599)article_content(line 19388)What NOT to change
article_translated_content$refsarticle_content, so new fields propagate automaticallyarticleschemaarticle_list_itemviaallOf, so new fields propagate automaticallycreate_article_request/update_article_requestinternal_article_list_item/articles/{id}example{id, object, deleted}only — no content fieldsdescriptions/2.7/throughdescriptions/2.15/)Verification
fern checkto validate the specarticle_contentschema has all 3 boolean propertiesarticle_list_itemschema has all 3 boolean propertiesfern checkfails, read the error output carefully — likely an indentation or YAML syntax issueExisting pattern reference
The closest precedent is
ai_agent_availability/ai_copilot_availabilityon theexternal_pageschema (lines ~25662-25674), which uses:The new article fields omit
defaultbecause they are response-only documentation (not request fields where a server-side default applies).Parthas Order (task/issue)
Add article AI agent availability fields to OpenAPI spec
Problem
PR intercom/intercom#508483 added three boolean fields —
ai_chatbot_availability,ai_copilot_availability,ai_sales_agent_availability— to article content API responses, gated behind the Preview API version viaAddArticleAgentAvailabilityFields. The intercom-openapi spec does not yet document these fields on thearticle_contentschema.Why This Matters
Without the spec update, SDK consumers on the Preview version will not see these fields in generated types, and the API documentation will be inaccurate.
Goal
The Preview OpenAPI spec documents the three AI agent availability boolean fields on the
article_contentschema, with correct types, descriptions, and examples.Context
descriptions/0/api.intercom.io.yamlneeds updatinggenerate-openapi-from-prskill — use it with the source PR URLarticle_contentschema is at approximately line 19320 of the preview specai_agent_availabilityandai_copilot_availabilityinteger fields on some schemas (non-boolean, different naming) — the new fields are boolean and named with anai_prefix pattern (ai_chatbot_availability,ai_copilot_availability,ai_sales_agent_availability)Acceptance Criteria
article_contentschema indescriptions/0/api.intercom.io.yamlincludesai_chatbot_availability,ai_copilot_availability, andai_sales_agent_availabilityas boolean propertiesfern checkpassesGenerated with Claude Code, zen coded with Parthas