Skip to content

CP-9078: Correct the Story custom field and Outcome Indicator schemas - #210

Merged
mattkepple merged 3 commits into
mainfrom
CP-9078-doc-fixes
Nov 24, 2026
Merged

mattkepple merged 3 commits into
mainfrom
CP-9078-doc-fixes

Conversation

@mattkepple

Copy link
Copy Markdown
Contributor

What & Why

Part of CP-9078. After #200, I refreshed the Rails repo's copy of this spec and ran its API contract specs against the real responses. Two schemas don't match what the API returns:

  • GET /stories. Story.custom_fields used CustomFieldValue, which gained a restricted flag for Contacts' Field Visibility in CP-9145. Stories don't do that masking; they return only id, name, type and value (Api::V2::StoryPayload#custom_fields). Story now uses its own StoryCustomFieldValue schema without restricted. CustomFieldValue is unchanged for Contacts.
  • GET /outcome_indicators. It returns framework_indicator_id, a column CP-9081 added on 7 Nov. It's now documented on OutcomeIndicator.

Only openapi.yaml changes; the endpoint cards in server.js don't mention either field. npm run check passes and the YAML parses.

Merge timing: the API docs are pre-launch, and both changes describe what production already returns.


Generated by Claude Code

Stories return id, name, type and value for each custom field; the
restricted flag from CP-9145 applies only to Contacts' fields, so Story
gets its own StoryCustomFieldValue schema. GET /outcome_indicators also
returns framework_indicator_id, added by CP-9081.

Both found by the Rails repo's contract specs when its copy of this
spec was refreshed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F1a5xrPqUbvvVon46Peko4
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api-docs Ready Ready Preview Nov 24, 2026 11:21am UTC

GET /beneficiaries leaves out weekly_availability and GET /projects
leaves out the seven Project detail fields, so give the lists their
own item shapes (ProjectListItem, Beneficiary) and the single-record
responses the fuller ones (Project, BeneficiaryDetail). Make
ContactWeeklyAvailability itself nullable: nullable beside allOf
doesn't let null through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F1a5xrPqUbvvVon46Peko4
POST and PATCH /event_categories return errors as an array of
messages, which UnprocessableEntityList describes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F1a5xrPqUbvvVon46Peko4
@mattkepple
mattkepple merged commit 3a32f30 into main Nov 24, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
Preview — 7ad7aeae Deployed Nov 24, 2026 by vercel[bot]
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