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

(maper for return from datasources) Support for resolve type from generic services. #11

Open
mikolajmitura opened this issue Aug 25, 2021 · 0 comments

Comments

@mikolajmitura
Copy link
Owner

mikolajmitura commented Aug 25, 2021

Something like mapper above service.
So generic service will invoke mapping/datastorages and by default will return combination from all returned datastorages responses:

so by default will does:

db-datastorage:

{
"id": 1,
"name":  "name value"
}

mongo-datastorage:

{
"uuid": "uuid value",
"surname": "surname value"
}

will combine to:

{
"id": 1,
"name": "name value",
"uuid": "uuid value",
"surname":  "surname value"
}

should based on #1
so when occurred field name duplication then write mapper script like below:

=*dataStorages // it will map from all data storages, this is default mapping for datastorages to service response
id=$mappingContext['db-datastorage'].id // it will put to id from result id from db-datastorage 

but this mapper will have additional function like "=*dataStorages" which under the hood will does:

=$mappingContext['db-datastorage']
=$mappingContext['mongo-datastorage']

should be opportunity for code/script for this mapper or point out normal java class for it.

@mikolajmitura mikolajmitura changed the title Support for resolve type from generic services. (maper for return from datasources) Support for resolve type from generic services. May 18, 2022
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

No branches or pull requests

1 participant