Skip to content

Commit

Permalink
Recurrent card : add a control in the code to forbid negative number …
Browse files Browse the repository at this point in the history
…for "minutes to remind before task" (#5483)

Signed-off-by: vlo-rte <valerie.longa@rte-france.com>
  • Loading branch information
vlo-rte committed Dec 5, 2023
1 parent 5d9de43 commit 427c16f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ public static EasyRandom instantiateEasyRandom() {
.scanClasspathForConcreteTypes(true)
.overrideDefaultInitialization(false)
.ignoreRandomizationErrors(true)
.excludeField(predicate->predicate.getName().equals("durationInMinutes"))
.excludeField(predicate->predicate.getName().equals("secondsBeforeTimeSpanForReminder"))
.excludeField(predicate->predicate.getName().equals("usersAcks"))
.excludeField(predicate->predicate.getName().equals("usersReads"))
.excludeField(predicate->predicate.getName().equals("entitiesAcks"));
Expand Down
3 changes: 3 additions & 0 deletions services/cards-publication/src/main/modeling/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ definitions:
durationInMinutes:
description: Duration in minutes of the event
type: integer
minimum: 0
TimeSpan:
type: object
description: An object to define a business time span
Expand Down Expand Up @@ -229,6 +230,7 @@ definitions:
durationInMinutes:
description: Duration in minutes of the event
type: integer
minimum: 0
required:
- hoursAndMinutes
HoursAndMinutes:
Expand Down Expand Up @@ -404,6 +406,7 @@ definitions:
description: Contains projection ex. 'EPSG:4326'
secondsBeforeTimeSpanForReminder:
type: integer
minimum: 0
toNotify:
type: boolean
description: Is false if the card must not be displayed in the feed and in monitoring screen
Expand Down

0 comments on commit 427c16f

Please sign in to comment.