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, the --attributes option defines what params are permitted in the controller as well as what attributes get serialized and included in swagger. Sometimes it's desirable to have them as two separate collections. For example, one could want to serialize the created_at attribute but not permit it.
We could separate the functionality, something like an --attributes option for serializer/swagger and a --params option for permitted params. We should assess if it introduces too much complexity though.
Implementation Considerations
One way of going about this would be to extract functionality related to attributes and params to an Attributes and AttributesCollection classes. For example, this could be an Attribute method and this an AttributesCollection method. Then, the resource would have two AttributesCollections, one for params and one for (serialization) attributes
The text was updated successfully, but these errors were encountered:
Currently, the
--attributes
option defines what params are permitted in the controller as well as what attributes get serialized and included in swagger. Sometimes it's desirable to have them as two separate collections. For example, one could want to serialize thecreated_at
attribute but not permit it.We could separate the functionality, something like an
--attributes
option for serializer/swagger and a--params
option for permitted params. We should assess if it introduces too much complexity though.Implementation Considerations
One way of going about this would be to extract functionality related to attributes and params to an
Attributes
andAttributesCollection
classes. For example, this could be anAttribute
method and this anAttributesCollection
method. Then, the resource would have twoAttributesCollection
s, one for params and one for (serialization) attributesThe text was updated successfully, but these errors were encountered: