Add README documentation for lib/common library components#27784
Open
AdamKing0126 wants to merge 5 commits intomasterfrom
Open
Add README documentation for lib/common library components#27784AdamKing0126 wants to merge 5 commits intomasterfrom
AdamKing0126 wants to merge 5 commits intomasterfrom
Conversation
Documents all components in lib/common including FileHelpers, HashHelpers, PdfHelpers, S3Helpers, VirusScan, and ConvertToPdf in the top-level README. Adds new README files for exceptions/ and models/ covering the full class hierarchy and usage patterns for each.
Contributor
There was a problem hiding this comment.
Pull request overview
Expands documentation for the lib/common shared utility library in vets-api, adding comprehensive READMEs for common models and exception hierarchies to make component usage and contracts easier to discover and apply consistently.
Changes:
- Expanded
lib/common/README.mdto document Common library components and link to sub-READMEs. - Added
lib/common/exceptions/README.mddescribing the exception hierarchy and usage. - Added
lib/common/models/README.mddocumenting non-ActiveRecord model base classes, collections, and Redis-backed models.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| lib/common/README.md | Provides an index-style overview of Common components with usage snippets and links. |
| lib/common/exceptions/README.md | Documents exception classes, intended HTTP statuses, and raising patterns. |
| lib/common/models/README.md | Documents Common model base classes/concerns (Virtus/Dry::Struct/RedisStore/Collection). |
Contributor
Author
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/department-of-veterans-affairs/vets-api/sessions/fb441a1b-2707-43ee-8389-e1d27056c4c7 Co-authored-by: AdamKing0126 <7659922+AdamKing0126@users.noreply.github.com>
- Fix Common::VirusScan: false means not confirmed clean (infected or scanning blocked/skipped); add Settings.clamav.mock type-casting note
- Fix Common::ConvertToPdf: always writes ClamAV temp file first; PDFs return a temp copy, not a pass-through
- Fix Common::Models intro to use Common namespace (not Common::Models::*)
- Fix Comparable::Ascending/Descending to Common::Ascending/Descending
- Fix exceptions README: TimeoutError -> Timeout with status 500
- Move FailedDependency (424) from 5xx to 4xx section
- Fix OpenIdServiceError status to %{status} (caller-supplied)
- Fix ServiceError to 500, UpstreamPartialFailure to 502, PrescriptionRefillResponseMismatch to 502
Agent-Logs-Url: https://github.com/department-of-veterans-affairs/vets-api/sessions/fb441a1b-2707-43ee-8389-e1d27056c4c7
Co-authored-by: AdamKing0126 <7659922+AdamKing0126@users.noreply.github.com>
Agent-Logs-Url: https://github.com/department-of-veterans-affairs/vets-api/sessions/fb441a1b-2707-43ee-8389-e1d27056c4c7 Co-authored-by: AdamKing0126 <7659922+AdamKing0126@users.noreply.github.com>
Contributor
Applied all review feedback in commit cbc7a43:
|
jesse-b-wilcore
approved these changes
Apr 21, 2026
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.
Summary
lib/common/README.mdto document all components:FileHelpers,HashHelpers,PdfHelpers,S3Helpers,VirusScan,ConvertToPdf, and links to theclient/andmodels/subdirectory READMEslib/common/exceptions/README.mdwith the full exception class hierarchy grouped by category, base class descriptions, and usage exampleslib/common/models/README.mdcoveringBase,Collection,RedisStore,Resource,CacheAside, and supporting typesTest plan
exceptions/README.mdclass table matches files inlib/common/exceptions/models/README.mdexamples are consistent with the actual class APIs