- Add EndpointHelpers object with reusable endpoint execution patterns
- Implement executeAndRespond helper for Future-based business logic execution
- Implement withUser helper to extract and validate User from CallContext
- Implement withBank helper to extract and validate Bank from CallContext
- Implement withUserAndBank helper for endpoints requiring both User and Bank
- Add comprehensive documentation and usage examples for each helper
- Import EndpointHelpers in Http4s700 for endpoint implementation
- Reduce boilerplate in endpoint implementations by centralizing common patterns
- Improve code consistency and maintainability across http4s endpoints
- Replace withCallContext helper method with implicit RequestOps extension class
- Add `req.callContext` syntax for cleaner CallContext extraction in endpoints
- Enhance Http4sRequestAttributes documentation with usage examples
- Update Http4s700 endpoints to use new implicit CallContext accessor pattern
- Remove nested callback pattern in favor of direct implicit CallContext availability
- Improve code readability by eliminating withCallContext wrapper boilerplate
- Add RequestOps import to Http4s700 for implicit extension method support
- Add withCallContext helper method to Http4sSupport for simplified endpoint code
- Document use of http4s Vault for type-safe request attributes storage
- Clarify that validated entities (bank, bankAccount, view, counterparty) are stored within CallContext
- Reorder validation chain in ResourceDocMiddleware to check roles before entity validation
- Add special handling for resource-docs endpoint with configurable role requirement
- Extract runValidationChain method to support both middleware and endpoint wrapping patterns
- Improve authentication error handling with better Box pattern matching
- Add comprehensive documentation and usage examples for CallContext extraction
- Enhance logging for validation chain execution and debugging
- Add bank, bankAccount, view, and counterparty fields to CallContext case class
- Remove individual Vault keys for User, Bank, BankAccount, View, and Counterparty from Http4sRequestAttributes
- Simplify Http4sRequestAttributes to store only CallContext in request attributes
- Update ResourceDocMiddleware to enrich CallContext with validated entities instead of storing them separately
- Remove ValidatedContext case class as validated entities are now part of CallContext
- Streamline request attribute management by centralizing all validated data in a single CallContext object
- Improves code maintainability and reduces complexity in the validation chain
entitity endpoints now return records created by user_id even if not via
/my endpoints (i.e. if created with another endpoint that requires a
role, the record is still yours)
- Commented out the implementation of the getCounterpartyByIdWithMiddleware endpoint and its associated ResourceDoc to prevent its usage.
- Updated the allRoutes definition to exclude the commented-out counterparty route, ensuring clarity in the current API structure.
- Replaced instances of UserNotLoggedIn with AuthenticatedUserIsRequired across multiple API versions and utility classes.
- Updated error response handling in ResourceDocMiddleware and APIUtil to reflect the new authentication requirement.
- Ensured consistency in error messages and improved clarity in authentication checks throughout the codebase.
- Updated ensureJsonContentType method to use pattern matching for content type validation.
- Ensured that responses with a media type of application/json retain their content type.
- Simplified response handling logic for better clarity and maintainability.
- Introduced a new private method to enforce JSON content type on responses.
- Added `Content-Type` import and defined a constant for application/json.
- Updated response handling to apply JSON content type if not already set.
- Replace static API info response with dynamic banks retrieval
- Add Http4sCallContextBuilder to extract request context and API version
- Integrate NewStyle.function.getBanks for fetching bank data from backend
- Use IO.fromFuture to handle asynchronous bank retrieval operations
- Convert bank data to JSON using JSONFactory400.createBanksJson
- Maintain consistent response formatting with jsonContentType header
- Enable proper call context propagation through the request lifecycle
- Refactored multiple API classes across various versions to improve code organization and readability.
- Centralized common functionalities and reduced redundancy in API implementations.
- Enhanced error handling and logging mechanisms for better debugging and traceability.
- Updated tests to align with the refactored API structure, ensuring comprehensive coverage and reliability.
- Introduced centralized properties for hosted organization details, including email, phone, and website.
- Updated JSONFactory classes to utilize the new centralized properties instead of direct property retrieval.
- Simplified API info JSON generation by reducing redundancy in property access.
- Enhanced clarity and maintainability of API information retrieval across different API versions.