Skip to content

Commit

Permalink
feat: detect empty name in integer type (#270)
Browse files Browse the repository at this point in the history
Part of
#253.
Fixes two discrepancies in the test that checks consistency between the
action's logic and the schema.
  • Loading branch information
krzema12 authored Feb 1, 2025
1 parent f26c8da commit f79aae8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ fun ApiItem.validateInteger(): ItemValidationResult {
if (this.namedValues?.keys?.any { it.isBlank() } == true) {
return ItemValidationResult.Invalid("Named value names must not be empty.")
}
if (this.name != null && this.name.isBlank()) {
return ItemValidationResult.Invalid("Name must not be empty.")
}
if (this.allowedValues != null) {
return ItemValidationResult.Invalid("'allowed-values' is not allowed for this type.")
}
Expand Down

0 comments on commit f79aae8

Please # to comment.