Skip to content

It should avoid conflicts in expose rules #57

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

Closed

Conversation

slavafomin
Copy link

I've added a broken test to demonstrate another issue with conflicting expose rules. Here, I'm using set of expose rules to control object transformation from plain to class and another from class to plain. For some reason there is a conflict. Password should not be set for "update" group, but it is.

@cojack cojack changed the base branch from master to develop October 21, 2018 14:27
@cojack
Copy link
Contributor

cojack commented Oct 21, 2018

@slavafomin how it should works if @Expose decorator bind meta by key name, so basically it overrides one by one.

@cojack cojack added the type: question Questions about the usage of the library. label Oct 21, 2018
@slavafomin
Copy link
Author

Hello @cojack, this was a long time ago, I can't tell exactly what the issues was about.

I think the idea was that expose decorators shouldn't be mutually exclusive, but rather they should build a list of rules, which are followed in the [de]serialization process, because as a developers we want more granular control based on the different serialization groups and serialization direction (from-plain/to-plain).

In order to solve this the rules should be stored as a list for each object property rather than a single rule for each property.

@NoNameProvided
Copy link
Member

NoNameProvided commented Jul 29, 2020

Closing in favor of #378 to allow refactor.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants