Skip to content

Separate attributes that go in the serialized object from the ones needed for create/update #18

@difernandez

Description

@difernandez

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions