File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/jvmMain/kotlin/it/krzeminski/githubactionstyping/validation/types Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ fun ApiItem.validateInteger(): ItemValidationResult {
77 if ((this .namedValues == null ) && (this .name != null )) {
88 return ItemValidationResult .Invalid (" 'name' is only allowed for this type when also having 'named-values'." )
99 }
10+ if (this .namedValues?.isEmpty() == true ) {
11+ return ItemValidationResult .Invalid (" There must be at least one named value." )
12+ }
13+ if (this .namedValues?.keys?.any { it.isBlank() } == true ) {
14+ return ItemValidationResult .Invalid (" Named value names must not be empty." )
15+ }
1016 if (this .allowedValues != null ) {
1117 return ItemValidationResult .Invalid (" 'allowed-values' is not allowed for this type." )
1218 }
You can’t perform that action at this time.
0 commit comments