-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: Adjustments to Generic Business Partner model #479
feat: Adjustments to Generic Business Partner model #479
Conversation
- optional BPN fields for input - bpnL/S/A naming - fixed assigment for isOwner, addressType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
394b5dd
to
93f6df6
Compare
bpns = entity.bpnS, | ||
bpna = entity.bpnA ?: throw NullPointerException("bpnA is null"), | ||
isOwner = entity.isOwner, | ||
bpnL = entity.bpnL ?: throw NullPointerException("bpnL is null"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we throw a Bpdm...Exception here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean like that:
throw BpdmNullMappingException(BusinessPartner::class, BusinessPartnerOutputDto::class, BusinessPartnerOutputDto::bpnL, entity.externalId)
val shortName: String? | ||
|
||
@get:ArraySchema(arraySchema = Schema(description = "The list of identifiers of the business partner.")) | ||
@get:ArraySchema(arraySchema = Schema(description = "The list of identifiers of the business partner. Sorted and duplicates are removed.")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is used for request and response.
The request does not have to be sorted.
Duplicates are only removed in the request. The response should not contain any duplicate entries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to phrase it that it works for both the request and response.
But yes, it's not quite clear. What do you think about:
"Automatically sorted and duplicates removed."
Any other suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idea: "Sorted and duplicates removed by the service."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, sounds better to me
…ion & error handling
Small improvements to the DTO model:
Solves #384