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

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

Open
difernandez opened this issue Sep 4, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@difernandez
Copy link
Contributor

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

@difernandez difernandez added the enhancement New feature or request label Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant