You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It can be difficult to track giant nested schemas.
Instead, create an Attributes() method for each model struct in the schema. This way I can keep the struct definition (tfsdk tags and whatnot) and its schema elements together. For example, check out the nesting in this resource. You'd never suspect it from the six-line Schema() method. The top-level model has an Attributes() method which invokes Attributes() methods of nested models which invoke Attributes() methods of nested models... I dunno if you'll find it helpful, but it did wonders for my sanity (lots of re-use of these models and identical chunks of schema in my case).
The text was updated successfully, but these errors were encountered:
It can be difficult to track giant nested schemas.
Instead, create an
Attributes()
method for each model struct in the schema. This way I can keep the struct definition (tfsdk tags and whatnot) and its schema elements together. For example, check out the nesting in this resource. You'd never suspect it from the six-line Schema() method. The top-level model has an Attributes() method which invokes Attributes() methods of nested models which invoke Attributes() methods of nested models... I dunno if you'll find it helpful, but it did wonders for my sanity (lots of re-use of these models and identical chunks of schema in my case).The text was updated successfully, but these errors were encountered: