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

refactor fields and fieldDefault #82

Open
MichaelHirn opened this issue Jul 27, 2019 · 1 comment
Open

refactor fields and fieldDefault #82

MichaelHirn opened this issue Jul 27, 2019 · 1 comment
Labels
refactor rlay-client-lib issues pertaining to @rlay/rlay-client-lib

Comments

@MichaelHirn
Copy link
Contributor

MichaelHirn commented Jul 27, 2019

EntityFactory currently has a prepareRlayFormat method that is applied to the payload or payload part that comes in as input for the .create and .from methods.

The purpose of that is that higher-level entities can be created, e.g. a DataPropertyAssertion that enforces a property cid or a subject cid like 0x00.

The purpose of the prepareRlayFormat and extended attributes and methods is three-fold and a bit tangled up atm: validate schema, default values, enforce values.

But in its current form it introduces a lot of code that is hard to test, not fully tested, and introduces a big amount of complexity.

Would be great to think more about this and refactor it in a future release.

@MichaelHirn MichaelHirn added rlay-client-lib issues pertaining to @rlay/rlay-client-lib refactor labels Jul 27, 2019
@MichaelHirn
Copy link
Contributor Author

closed by accident

@MichaelHirn MichaelHirn reopened this Jul 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor rlay-client-lib issues pertaining to @rlay/rlay-client-lib
Projects
None yet
Development

No branches or pull requests

1 participant