Skip to content

Commit

Permalink
Merge pull request tofu-tf#409 from leviysoft/feature/defaulted-prope…
Browse files Browse the repository at this point in the history
…rties

Treat properties with default values as optional
  • Loading branch information
Odomontois authored Sep 17, 2020
2 parents 593502b + c31a467 commit ac65c9e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object Swagger extends Derivation[SwaggerTypeable] {
)
}.toVector,
required = Eval.later(caseClass.parameters.toVector.collect {
case prop if !prop.typeclass.optional => cfg.propMod(prop.label)
case prop if !prop.typeclass.optional && prop.default.isEmpty => cfg.propMod(prop.label)
})
)
)
Expand Down

0 comments on commit ac65c9e

Please sign in to comment.