Closed digitaldogsbody closed 1 year ago
At the moment we have some fields that are required, such as type coming through as Optional with a default set.
type
Optional
It looks like datamodel-code-generator has an argument that can make these fields required while preserving the default. See https://github.com/koxudaxi/datamodel-code-generator/issues/757
Although we have a constrained string for type, I think it should still work - so we should investigate generating the skeleton with this and seeing if everything still works!
Discussed in call 13th Jan. Would be useful to investigate.
This worked perfectly first time, type no longer gets the Optional[] annotation and everything still works :grinning:
Optional[]
At the moment we have some fields that are required, such as
type
coming through asOptional
with a default set.It looks like datamodel-code-generator has an argument that can make these fields required while preserving the default. See https://github.com/koxudaxi/datamodel-code-generator/issues/757
Although we have a constrained string for type, I think it should still work - so we should investigate generating the skeleton with this and seeing if everything still works!