Skip to content

Remove narratives, trends, geo - #256

Merged
wpears merged 6 commits into
mainfrom
remove-narratives
Aug 18, 2026
Merged

Remove narratives, trends, geo#256
wpears merged 6 commits into
mainfrom
remove-narratives

Conversation

@wpears

@wpears wpears commented Aug 17, 2026

Copy link
Copy Markdown
Member

Companion to cfpb/ccdb5-ui#630

Summary

  • Removes Narratives, Map (geo), and Trends support from the CCDB search API.
  • Drops /geo/states and /trends endpoints, plus narrative-related fields/filters (has_narrative, complaint_what_happened) from search, serializers, defaults, and exports.
  • Defaults search field to all instead of narrative text.
  • Updates OpenAPI (swagger-config.yaml) to match the remaining API surface so public docs stay accurate (this file is the source loaded by https://cfpb.github.io/ccdb5-api/documentation/).
  • Removes related tests and expected-result fixtures.

Test plan

  • Confirm /, /_suggest_company, /_suggest_zip, and /{id} still work
  • Confirm /geo/states and /trends return 404
  • Confirm has_narrative / narrative fields are no longer accepted or returned
  • Confirm CSV export no longer includes narrative columns
  • After merge, verify Swagger UI still loads and no longer lists geo/trends/narrative options

Comment thread swagger-config.yaml

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.

Do we still need this file?
it would be good to have a single source of truth.

i see there is another version of this swagger file here in the API
https://github.com/cfpb/api/blob/gh-pages/swagger-config.yaml

should this narratives API PR remove the endpoints for trends and geo too?

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.

It looks like the cfpb/api
https://github.com/cfpb/api/blob/gh-pages/ccdb/api.md#L7-L8

references ccdb5-api's own GH-pages branch through this:
https://github.com/cfpb/ccdb5-api/blob/gh-pages/documentation/swagger-initializer.js#L6

cfpb/api's swagger file appears to be stale and unused and we should probably delete it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, interesting, yeah I was assuming I'd need to do that work on the gh-pages branch, but looks like it's just done in this file.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be resolved now in 64f78b9

@flacoman91 flacoman91 left a comment

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.

LGTM. 👍

@wpears
wpears merged commit 9bf8c3e into main Aug 18, 2026
2 checks passed
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