mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
fix(kubernetes): allow merging options if strings are equal
This commit is contained in:
parent
c1dda2b22f
commit
a4526cc8c3
1 changed files with 9 additions and 2 deletions
|
|
@ -12,11 +12,18 @@ let
|
|||
hasAttr "type" def &&
|
||||
elem def.type ["string" "integer" "boolean" "object"];
|
||||
|
||||
str = mkOptionType {
|
||||
name = "str";
|
||||
description = "string";
|
||||
check = isString;
|
||||
merge = mergeEqualOption;
|
||||
};
|
||||
|
||||
mapType = def:
|
||||
if def.type == "string" then
|
||||
if hasAttr "format" def && def.format == "int-or-string"
|
||||
then types.either types.int types.str
|
||||
else types.str
|
||||
then types.either types.int str
|
||||
else str
|
||||
else if def.type == "integer" then types.int
|
||||
else if def.type == "boolean" then types.bool
|
||||
else if def.type == "object" then types.attrs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue