mirror of
https://github.com/dhall-lang/dhall-kubernetes.git
synced 2024-09-17 10:27:08 +03:00
Add apiVersion and kind
This commit is contained in:
parent
f8d92a8e41
commit
a70334e45c
@ -313,7 +313,18 @@ toDefinition crd =
|
||||
kind = crdKind,
|
||||
apiVersion = version
|
||||
}
|
||||
pure $ propsToDefinition schema (Just baseData)
|
||||
let completeSchemaProperties =
|
||||
fmap
|
||||
(Data.Map.union
|
||||
(
|
||||
Data.Map.fromList [
|
||||
("apiVersion", (mkV1beta1JSONSchemaProps {v1beta1JSONSchemaPropsType = Just "string"}))
|
||||
, ("kind", (mkV1beta1JSONSchemaProps {v1beta1JSONSchemaPropsType = Just "string"} ))
|
||||
]
|
||||
))
|
||||
(v1beta1JSONSchemaPropsProperties schema)
|
||||
let completeSchema = schema { v1beta1JSONSchemaPropsProperties = completeSchemaProperties}
|
||||
pure $ propsToDefinition (completeSchema) (Just baseData)
|
||||
propsToDefinition :: V1beta1JSONSchemaProps -> Maybe BaseData -> Definition
|
||||
propsToDefinition schema basedata =
|
||||
Definition
|
||||
|
Loading…
Reference in New Issue
Block a user