Skip to content

Commit

Permalink
Remove requiredness of name attribute in ObjectMeta
Browse files Browse the repository at this point in the history
It is only required for top-level objects .  (E.g. `Deployment`, `Pod`, `DaemonSet`) but it is Optional when it is part of a compond object
(e.g. `PodTemplateSpec` inside a `Deployment` or `DaemonSet`)


See #8 (comment)
and #84 (comment)
  • Loading branch information
arianvp authored Oct 19, 2019
1 parent dea2c92 commit e85c2dd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dhall-kubernetes-generator/src/Dhall/Kubernetes/Convert.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ requiredFields maybeName required
-- | Some models require keys that are not in the required set,
-- but are in the docs or just work
requiredConstraints = Data.Map.fromList
[ ( ModelName "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"
, Set.fromList [FieldName "name"])
]
[ ]

-- | Some models should not require some keys, and this is not
-- in the Swagger spec but just in the docs
Expand Down

0 comments on commit e85c2dd

Please sign in to comment.