mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
fix(istio): generate definitions for config.istio.io/v1alpha2
This commit is contained in:
parent
ff66b0e0c3
commit
711073a6e6
2 changed files with 1204 additions and 1039 deletions
2228
istio/default.nix
2228
istio/default.nix
File diff suppressed because it is too large
Load diff
|
|
@ -188,7 +188,7 @@ let
|
||||||
}
|
}
|
||||||
) swagger.definitions);
|
) swagger.definitions);
|
||||||
|
|
||||||
genResources = swagger: mapAttrsToList (name: property: rec {
|
genResources = swagger: (mapAttrsToList (name: property: rec {
|
||||||
splittedType = splitString "." (removePrefix "me.snowdrop.istio.api." property.javaType);
|
splittedType = splitString "." (removePrefix "me.snowdrop.istio.api." property.javaType);
|
||||||
group = (concatStringsSep "." (take ((length splittedType) - 2) splittedType)) + ".istio.io";
|
group = (concatStringsSep "." (take ((length splittedType) - 2) splittedType)) + ".istio.io";
|
||||||
kind = removeSuffix "Spec" (last splittedType);
|
kind = removeSuffix "Spec" (last splittedType);
|
||||||
|
|
@ -196,9 +196,18 @@ let
|
||||||
ref = removePrefix "#/definitions/" property."$ref";
|
ref = removePrefix "#/definitions/" property."$ref";
|
||||||
})
|
})
|
||||||
(filterAttrs (name: property:
|
(filterAttrs (name: property:
|
||||||
hasPrefix "me.snowdrop.istio.api" property.javaType &&
|
(hasPrefix "me.snowdrop.istio.api" property.javaType) &&
|
||||||
hasSuffix "Spec" property.javaType
|
hasSuffix "Spec" property.javaType
|
||||||
) swagger.properties);
|
) swagger.properties)) ++ (mapAttrsToList (name: property: rec {
|
||||||
|
splittedType = splitString "." (removePrefix "me.snowdrop.istio.mixer." property.javaType);
|
||||||
|
group = "config.istio.io";
|
||||||
|
version = "v1alpha2";
|
||||||
|
kind = head (tail splittedType);
|
||||||
|
ref = removePrefix "#/definitions/" property."$ref";
|
||||||
|
}) (filterAttrs (name: property:
|
||||||
|
(hasPrefix "me.snowdrop.istio.mixer" property.javaType) &&
|
||||||
|
hasSuffix "Spec" property.javaType
|
||||||
|
) swagger.properties));
|
||||||
|
|
||||||
swagger = fetchSpecs spec;
|
swagger = fetchSpecs spec;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue