Skip to content

Commit

Permalink
feat(impl): [#528] add @future to validUntil attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmf committed May 7, 2024
1 parent 84ea791 commit c7efaa6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.json.JsonObject;
import jakarta.validation.constraints.Future;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;

Expand All @@ -42,6 +43,7 @@ public record CreatePolicyRequest(
@Schema(description = "Timestamp after which the policy will no longer be accepted in negotiations.",
example = "2025-12-12T23:59:59.999Z") //
@NotNull //
@Future(message = "must be in future") //
OffsetDateTime validUntil, //

@Schema(description = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.util.List;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Future;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import org.eclipse.tractusx.irs.policystore.validators.ValidListOfBusinessPartnerNumbers;
Expand All @@ -39,6 +40,7 @@ public record UpdatePolicyRequest(

@Schema(description = "Timestamp after which the policy will no longer be accepted in negotiations.") //
@NotNull //
@Future(message = "must be in future") //
OffsetDateTime validUntil, //

@Schema(description = "Business Partner Number (BPN).") //
Expand Down

0 comments on commit c7efaa6

Please sign in to comment.