You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an engineer, I want to investigate approaches for standardizing mock API responses across the VA application ecosystem, focusing initially on the most commonly used endpoints, to reduce duplication of effort and improve local development experience.
Background
Mock responses are scattered across repositories (vets-api, vets-website) and implemented inconsistently. This leads to:
Duplicate effort in maintaining mock data
Inconsistent response structures
Limited reusability across applications
Potential divergence from actual API behavior
Difficulty in simulating different data scenarios
Discovery Goals
Current State
Document existing mock server implementations
vets-website local mock server
applications using mock server
vets-api mock data
MSW usage in tests
Cypress intercepts in e2e tests
Identify most frequently used endpoints across applications
Analyze current mock response patterns in regards to what we can standardize, and where data inconsistencies
Response Structure Investigation
Study in_progress_forms/{FORM_ID} responses across different forms
Identify common fields and patterns
Document variations and special cases
Technical Approaches Evaluation
Evaluate MSW for browser-based mocking for maintainability, conciseness, and reusability
Compare with current Mocker-api/Express-based mock server
Assess feasibility of sharing mock data between vets-api and vets-website
Questions to Answer
What are the minimum required fields for common endpoint responses?
Can we create a tiered approach with basic/extended mock responses?
How can we maintain mock data consistency with real API changes?
What's the developer experience impact of different mocking approaches?
Can we make the experience better with combined responses that can be utilized within various environments (unit tests, e2e, local browser)
form_profile_mappings in vets-api each form can choose how their prefill data is structured, so this is one of the largest areas that could use standardization
21-686c prefill model in vets-api this model has more complex data that is connected so adds a layer of complexity on what can be mapped for this form
I reviewed the POC branch and it works as expected.
Really great work on doing some foundational exploration into this type of idea @bellepx0 !
I also added some additional notes and general thoughts at the bottom of your google doc. We can close this as done now, and revisit next steps after the holiday / next sprint.
User Story
As an engineer, I want to investigate approaches for standardizing mock API responses across the VA application ecosystem, focusing initially on the most commonly used endpoints, to reduce duplication of effort and improve local development experience.
Background
Mock responses are scattered across repositories (vets-api, vets-website) and implemented inconsistently. This leads to:
Discovery Goals
Current State
Response Structure Investigation
in_progress_forms/{FORM_ID}
responses across different formsTechnical Approaches Evaluation
Questions to Answer
Resources
Deliverables
Analysis document covering:
Proof of concept implementing recommended approach for 2-3 common endpoints
Success Criteria
Constraints & Considerations
Review Needed By
Definition of Done
The text was updated successfully, but these errors were encountered: