Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle body content in parts #59

Merged
merged 1 commit into from
Oct 25, 2023
Merged

Handle body content in parts #59

merged 1 commit into from
Oct 25, 2023

Conversation

csutter
Copy link
Contributor

@csutter csutter commented Oct 25, 2023

This parses body content in the same way search-api currently does
(sanitising and truncating) (see GovukIndex::PartsPresenter)

  • Add loofah gem as explicit dependency
  • Add ContentWithMultipleTypes to extract data from the
    multiple_content_types publishing API sub-schema definition
  • Parse and add details.parts[*].body to the metadata
  • Return parts as nil when not present

This parses body content in the same way `search-api` currently does
(sanitising and truncating) (see `GovukIndex::PartsPresenter`)

- Add `loofah` gem as explicit dependency
- Add `ContentWithMultipleTypes` to extract data from the
  `multiple_content_types` publishing API sub-schema definition
- Parse and add `details.parts[*].body` to the metadata
- Return `parts` as nil when not present
@csutter csutter merged commit 3204a63 into main Oct 25, 2023
3 checks passed
@csutter csutter deleted the parts-body branch October 25, 2023 17:04
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