Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tftypes: Further document Object type OptionalAttributes field usage #149

Merged
merged 2 commits into from
Feb 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tftypes/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ type Object struct {
// are considered part of the type signature, and their absence means a
// value is no longer of that type.
//
// OptionalAttributes is only valid when declaring a type constraint
// (e.g. Schema) and should not be used as part of a Type when creating
// a Value (e.g. NewValue()). When creating a Value, all OptionalAttributes
// must still be defined in the Object by setting each attribute to a null
// or known value for its attribute type.
//
// The key of OptionalAttributes should be the name of the attribute
// that is optional. The value should be an empty struct, used only to
// indicate presence.
Expand Down