diff --git a/GitLab/Job/Type.dhall b/GitLab/Job/Type.dhall index 77ddcb3..f2c839e 100644 --- a/GitLab/Job/Type.dhall +++ b/GitLab/Job/Type.dhall @@ -24,7 +24,7 @@ in { stage : Optional Text , image : Optional Image , variables : Prelude.Map.Type Text Text , rules : Optional (List Rule) - , dependencies : List Text + , dependencies : Optional (List Text) , needs : List Text , allow_failure : Bool , tags : Optional (List Text) diff --git a/GitLab/Job/default.dhall b/GitLab/Job/default.dhall index 542dd10..944682a 100644 --- a/GitLab/Job/default.dhall +++ b/GitLab/Job/default.dhall @@ -24,7 +24,7 @@ in { stage = None Text , image = None Image , variables = Prelude.Map.empty Text Text , rules = None (List Rule) - , dependencies = [] : List Text + , dependencies = None (List Text) , needs = [] : List Text , allow_failure = False , tags = None (List Text) diff --git a/GitLab/Job/toJSON.dhall b/GitLab/Job/toJSON.dhall index 99be382..0d9ce69 100644 --- a/GitLab/Job/toJSON.dhall +++ b/GitLab/Job/toJSON.dhall @@ -70,9 +70,12 @@ in let Job/toJSON ) ) , dependencies = - if Prelude.List.null Text job.dependencies - then None JSON.Type - else Some (stringsArrayJSON job.dependencies) + let dependenciesList = + optionalList Text job.dependencies + + in if Prelude.List.null Text dependenciesList + then None JSON.Type + else Some (stringsArrayJSON dependenciesList) , needs = if Prelude.List.null Text job.needs then None JSON.Type