diff --git a/src/main/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemEntityPatcher.java b/src/main/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemEntityPatcher.java index 2131bef5..24f2f41c 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemEntityPatcher.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemEntityPatcher.java @@ -22,8 +22,6 @@ public class HsBookingItemEntityPatcher implements EntityPatcher entity.getResources().patch(KeyValueMap.from(resource.getResources()))); - OptionalFromJson.of(resource.getValidFrom()) - .ifPresent(entity::setValidFrom); OptionalFromJson.of(resource.getValidTo()) .ifPresent(entity::setValidTo); } diff --git a/src/main/resources/api-definition/hs-booking/hs-booking-item-schemas.yaml b/src/main/resources/api-definition/hs-booking/hs-booking-item-schemas.yaml index 7424a46e..bf64d994 100644 --- a/src/main/resources/api-definition/hs-booking/hs-booking-item-schemas.yaml +++ b/src/main/resources/api-definition/hs-booking/hs-booking-item-schemas.yaml @@ -32,10 +32,6 @@ components: caption: type: string nullable: true - validFrom: - type: string - format: date - nullable: true validTo: type: string format: date diff --git a/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemControllerAcceptanceTest.java b/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemControllerAcceptanceTest.java index fa4ce211..55bdbb2c 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemControllerAcceptanceTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemControllerAcceptanceTest.java @@ -258,7 +258,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup .body("", lenientlyEquals(""" { "caption": "some test-booking", - "validFrom": "2020-06-05", + "validFrom": "2022-11-01", "validTo": "2022-12-31", "resources": { "CPU": "4", diff --git a/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemEntityPatcherUnitTest.java b/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemEntityPatcherUnitTest.java index 7e7f4308..b7ff8ab4 100644 --- a/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemEntityPatcherUnitTest.java +++ b/src/test/java/net/hostsharing/hsadminng/hs/booking/item/HsBookingItemEntityPatcherUnitTest.java @@ -34,7 +34,6 @@ class HsBookingItemEntityPatcherUnitTest extends PatchUnitTestBase< private static final UUID INITIAL_BOOKING_ITEM_UUID = UUID.randomUUID(); private static final LocalDate GIVEN_VALID_FROM = LocalDate.parse("2020-04-15"); - private static final LocalDate PATCHED_VALID_FROM = LocalDate.parse("2022-10-30"); private static final LocalDate PATCHED_VALID_TO = LocalDate.parse("2022-12-31"); private static final Map INITIAL_RESOURCES = patchMap( @@ -103,11 +102,6 @@ class HsBookingItemEntityPatcherUnitTest extends PatchUnitTestBase< HsBookingItemEntity::putResources, PATCHED_RESOURCES) .notNullable(), - new JsonNullableProperty<>( - "validfrom", - HsBookingItemPatchResource::setValidFrom, - PATCHED_VALID_FROM, - HsBookingItemEntity::setValidFrom), new JsonNullableProperty<>( "validto", HsBookingItemPatchResource::setValidTo,