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
Currently inside the x/posts module we have defined two types to handle the optional data that's associated with a post:
OptionalDataEntry that represents a single optional data, and
OptionalData that represents a slice of optional data
In my opinion, these very similar names might be confusing for external developers. Also, I think the current naming of OptionalData might be confusing as well. For this reason, I propose the following changes:
Remove the OptionalData type and use only the []OptionalDataEntry
Rename the OptionalDataEntry type to be Attribute
Rename the OptionalData field of a Post into AdditionalAttributes
This way, the final Post object would then be something like
Currently inside the
x/posts
module we have defined two types to handle the optional data that's associated with a post:OptionalDataEntry
that represents a single optional data, andOptionalData
that represents a slice of optional dataIn my opinion, these very similar names might be confusing for external developers. Also, I think the current naming of
OptionalData
might be confusing as well. For this reason, I propose the following changes:OptionalData
type and use only the[]OptionalDataEntry
OptionalDataEntry
type to beAttribute
OptionalData
field of aPost
intoAdditionalAttributes
This way, the final
Post
object would then be something likeIMO, this would make it very easy for external developers to understand that they can insert additional things inside that array.
The text was updated successfully, but these errors were encountered: