Commit Graph

14937 Commits

Author SHA1 Message Date
simonredfern
e08d25520e Dynamic Entity Example id is snake case e.g. piano_id rather than
pianoId
2026-01-26 13:03:35 +01:00
simonredfern
26f2fd192b Docfix: Mentioning content=dynamic for resource docs 2026-01-26 10:51:33 +01:00
simonredfern
7efbf6389a closing database connections after StoredProcedure calls and Migrations. 2026-01-22 18:41:01 +01:00
simonredfern
6ad3689fd3 Merge remote-tracking branch 'upstream/develop' into develop 2026-01-22 18:38:39 +01:00
simonredfern
3d4660ec0b added _links for dynamic entity CRUD endpoints. + adding GET system
database pool endpoint
2026-01-22 18:37:42 +01:00
Simon Redfern
3cb783affa
Merge pull request #2662 from hongwei1/develop
feature/addResourceDocsGuardsForHttp4s
2026-01-22 16:35:11 +01:00
hongwei
0415d13b1a refactor/(http4s): improve documentation and code clarity in error handling and support utilities
- Enhance ErrorResponseConverter documentation with detailed handler descriptions and response format details
- Add comprehensive comments explaining error type handling (APIFailureNewStyle, Box Failure, unknown exceptions)
- Document correlation-Id header inclusion and HTTP status code mapping in error responses
- Simplify error matching logic in toHttp4sResponse using pattern matching
- Improve Http4sSupport file documentation with clear component descriptions
- Add usage examples for RequestOps implicit class in endpoint implementations
- Clarify CallContext storage mechanism using http4s Vault (type-safe key-value store)
- Document validated entity storage (user, bank, bankAccount, view, counterparty) within CallContext
- Add inline comments explaining ResourceDocMatcher functionality and request matching process
- Improve code readability with consistent formatting and clearer method documentation
2026-01-22 16:19:53 +01:00
hongwei
83d90bfc44 Merge remote-tracking branch 'Simon/develop' into develop
# Conflicts:
#	.gitignore
2026-01-22 16:11:59 +01:00
hongwei
11e4a71cc4 feature(http4s): add EndpointHelpers for simplified endpoint implementations
- 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
2026-01-22 15:43:49 +01:00
hongwei
df54e60fd0 refactor(http4s): simplify CallContext access with implicit RequestOps extension
- 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
2026-01-22 15:26:59 +01:00
simonredfern
b4856ef2ac docfix: fixing dynamic-entity example response for list 2026-01-22 15:09:16 +01:00
hongwei
dbd046bf7c refactor(http4s): enhance CallContext extraction and validation chain
- 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
2026-01-22 14:36:58 +01:00
hongwei
e8999ba54c refactor(http4s): consolidate validated entities into CallContext
- 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
2026-01-22 14:13:34 +01:00
Simon Redfern
f1a2915640
Merge pull request #2664 from simonredfern/develop
v6.0.0 versions of Dynamic Entities endpoints use entity_name rather than dynamic key
2026-01-22 11:46:58 +01:00
simonredfern
6466c8e9f7 Updating frozen metadata for Challenge Commons (added 3 new fields, not
a breaking change as long as Adapters are lenient on extra fields)
2026-01-22 11:05:47 +01:00
hongwei
baecbc110f Merge remote-tracking branch 'Simon/develop' into develop 2026-01-22 09:04:50 +01:00
simonredfern
3462363228 rebasefix: fixing errors introduced during rebase merging 2026-01-22 07:39:19 +01:00
simonredfern
b5282b4568 fixing merge rebase v6.0.0 of dynmaic endpoints with improved json 2026-01-22 07:39:19 +01:00
simonredfern
0b63bfcae3 Test isolation 2026-01-22 07:39:19 +01:00
simonredfern
191f867fd2 docfix: Added Connector.User.Authentication 2026-01-22 07:39:19 +01:00
karmaking
bb4e082160 add context lines to build failures 2026-01-22 07:39:19 +01:00
simonredfern
7a27d3ac0d Schema Validation tests 2026-01-22 07:39:19 +01:00
simonredfern
aaf04ee036 fixtest: GET my dynamic entity endpoint gets records the user created,
not just records with hasPersonalEntity=true. Previous behaviour was
confusing.
2026-01-22 07:39:19 +01:00
simonredfern
c0a0dfed0b fix tricky behaviour with personal dynamic endpoints. /my dynamic
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)
2026-01-22 07:39:19 +01:00
simonredfern
afa73894c5 forcing lower_case entity names 2026-01-22 07:39:19 +01:00
simonredfern
606f7089e0 apiTagDynamicEntity 2026-01-22 07:39:19 +01:00
simonredfern
7fdf8faacc Dynamic Entity definition to schema 2026-01-22 07:39:19 +01:00
simonredfern
bfa3917ce1 v6.0.0 of dynmaic endpoints with improved json 2026-01-22 07:39:19 +01:00
simonredfern
ceba49c0ea Added /personal-dynamic-entities/available 2026-01-22 07:39:19 +01:00
simonredfern
ea266cdb59 Fixing new challenge fields 2026-01-22 07:39:19 +01:00
simonredfern
d48c68fbcf added untracked_files 2026-01-22 07:39:19 +01:00
simonredfern
3f371cf551 Adding Message Doc Json schema files 2026-01-22 07:39:19 +01:00
simonredfern
79c44db3bc Added v6.0.0 GET /my/dynamic-entities with explicit entity_name instead
of dynamic key and snake_case
2026-01-22 07:39:19 +01:00
simonredfern
3f85cb9a02 docfix: glossary Response format for GET /mydynamic-entities 2026-01-22 07:39:19 +01:00
simonredfern
41a1506a66 Adding challengePurpose, challengeContextHash and
challengeContextStructure
2026-01-22 07:39:19 +01:00
simonredfern
3a77043bfc docfix: Dynamic Linking glossary item. 2026-01-22 07:39:19 +01:00
simonredfern
0e9a69dfe6 docfix: hasPersonalEntity flag note 2026-01-22 07:39:19 +01:00
simonredfern
18d1884703 Docfix: Added note about hasPersonalEntity in Dynamic Entity glossary
item.
2026-01-22 07:39:18 +01:00
simonredfern
a9f42f905f Tagging Message Doc related endpoints. 2026-01-22 07:39:18 +01:00
simonredfern
5f7bbc3e5f ABAC Error message codes 2026-01-22 07:39:18 +01:00
Simon Redfern
8fcc4ec04b
Merge pull request #2663 from hongwei1/refactor/renameUserNotLoggedIn
refactor/rename UserNotLoggedIn to AuthenticatedUserIsRequired
2026-01-21 16:11:40 +01:00
hongwei
61abf36784 Merge remote-tracking branch 'Hongwei/refactor/renameUserNotLoggedIn' into develop 2026-01-21 15:13:19 +01:00
hongwei
3b467129fb refactor/rename UserNotLoggedIn to AuthenticatedUserIsRequired 2026-01-21 15:11:04 +01:00
hongwei
f73ad667b9 refactor/tweaked code 2026-01-21 14:58:52 +01:00
hongwei
ef6bff5698 refactor/tweaked the variable names 2026-01-21 14:05:20 +01:00
hongwei
f6d095bf1b docfix/added comments 2026-01-21 13:44:40 +01:00
hongwei
48afd126d5 docfix/added comments 2026-01-21 13:39:45 +01:00
Simon Redfern
9ce6cb4164
Merge pull request #2660 from hongwei1/developPom
refactor/reduce the maven build time
2026-01-21 13:10:10 +01:00
hongwei
31624464b9 refactor(http4s700): comment out getCounterpartyByIdWithMiddleware endpoint and related ResourceDoc
- 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.
2026-01-20 15:27:44 +01:00
hongwei
de2ed5f61a refactor(api): update authentication error handling to use AuthenticatedUserIsRequired
- 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.
2026-01-20 15:21:57 +01:00