hierarchical-validation-baseline #59

Merged
hsh-michaelhoennig merged 18 commits from hierarchical-validation-baseline into master 2024-06-14 16:48:01 +02:00
No description provided.
hsh-michaelhoennig added 15 commits 2024-06-14 10:08:18 +02:00
hsh-marcsandlus reviewed 2024-06-14 10:13:08 +02:00
@ -59,2 +64,3 @@
final var saved = bookingItemRepo.save(valid(entityToSave));
final HsBookingItemEntity entityToSave1 = bookingItemRepo.save(entityToSave);
final var saved = HsBookingItemEntityValidatorRegistry.validated(entityToSave1);

variable inlinen

variable inlinen
hsh-michaelhoennig marked this conversation as resolved
hsh-marcsandlus reviewed 2024-06-14 10:16:14 +02:00
@ -78,6 +84,7 @@ public class HsBookingItemController implements HsBookingItemsApi {
context.define(currentUser, assumedRoles);
final var result = bookingItemRepo.findByUuid(bookingItemUuid);
result.ifPresent(entity -> em.detach(entity));

comment would be nice

comment would be nice
hsh-michaelhoennig marked this conversation as resolved
hsh-marcsandlus reviewed 2024-06-14 10:18:55 +02:00
@ -0,0 +23,4 @@
return sequentiallyValidate(
() -> enrich(prefix(bookingItem.toShortString(), "resources"), validateProperties(bookingItem.getResources())),
() -> enrich(prefix(bookingItem.toShortString(), "parentItem"), optionallyValidate(bookingItem.getParentItem())),
() -> validateAgainstSubEntities(bookingItem)

enrich?

enrich?
hsh-michaelhoennig marked this conversation as resolved
hsh-marcsandlus reviewed 2024-06-14 10:34:44 +02:00
@ -64,2 +63,3 @@
final var saved = assetRepo.save(valid(entityToSave));
final HsHostingAssetEntity persistentEntity = assetRepo.save(entityToSave);
final var saved = HsHostingAssetEntityValidatorRegistry.validated(persistentEntity);

evtl. zusammenfassen

evtl. zusammenfassen
hsh-michaelhoennig marked this conversation as resolved
hsh-marcsandlus reviewed 2024-06-14 10:34:56 +02:00
@ -119,2 +119,3 @@
final var saved = assetRepo.save(valid(current));
final HsHostingAssetEntity persistentEntity = assetRepo.save(current);
final var saved = HsHostingAssetEntityValidatorRegistry.validated(persistentEntity);

zusammenfassen

zusammenfassen
hsh-michaelhoennig marked this conversation as resolved
hsh-marcsandlus reviewed 2024-06-14 10:54:58 +02:00
@ -0,0 +38,4 @@
// then
assertThat(result).isInstanceOf(ValidationException.class)
.hasMessageContaining(
"D-12345:test project:Test-Server.resources.CPUs' is required but missing",

Hochkomma vorne einfügen

Hochkomma vorne einfügen
hsh-michaelhoennig marked this conversation as resolved
hsh-marcsandlus approved these changes 2024-06-14 11:08:18 +02:00
hsh-michaelhoennig added 2 commits 2024-06-14 15:05:26 +02:00
hsh-michaelhoennig added 1 commit 2024-06-14 15:22:12 +02:00
hsh-michaelhoennig merged commit 46dc653174 into master 2024-06-14 16:48:01 +02:00
hsh-michaelhoennig deleted branch hierarchical-validation-baseline 2024-06-14 16:48:01 +02:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hostsharing/hs.hsadmin.ng#59
No description provided.