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

(feat) Functional API #188

Closed
wants to merge 12 commits into from
Closed

(feat) Functional API #188

wants to merge 12 commits into from

Conversation

dselman
Copy link
Contributor

@dselman dselman commented Mar 27, 2020

Signed-off-by: Dan Selman danscode@selman.org

Issue #187

Create a functional API for concerto objects.

Changes

Flags

Related Issues

  • Issue #
  • Pull Request #

Signed-off-by: Dan Selman <danscode@selman.org>
Signed-off-by: Dan Selman <danscode@selman.org>
Signed-off-by: Dan Selman <danscode@selman.org>
Signed-off-by: Dan Selman <danscode@selman.org>
Signed-off-by: Dan Selman <danscode@selman.org>
Signed-off-by: Dan Selman <danscode@selman.org>
Signed-off-by: Dan Selman <danscode@selman.org>
Signed-off-by: Dan Selman <danscode@selman.org>
@jeromesimeon jeromesimeon self-requested a review March 30, 2020 14:14
Copy link
Member

@jeromesimeon jeromesimeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most immediate suggestion: please do the work on top of the release-1.0 branch.

I think we may need the validate method to return a new JS object (we are filling in default values, turning ISO 8601 dates into moment objects, etc). -- Alternatively we could separate those things into two passes: one which changes the data representation (e.g., string to date) the other which validates and only fails/succeeds without changing anything).

I would love if those methods would be functional (i.e., validate would not change the input JSON but construct a new one).

Signed-off-by: Dan Selman <danscode@selman.org>
Signed-off-by: Dan Selman <danscode@selman.org>
@dselman
Copy link
Contributor Author

dselman commented Mar 31, 2020

Most immediate suggestion: please do the work on top of the release-1.0 branch.

I like the idea of releasing this first for 0.82.x as I think it will help people migrate progressively to 1.0. I don't think it will be too much work to then update this code for 1.0.

I think we may need the validate method to return a new JS object (we are filling in default values, turning ISO 8601 dates into moment objects, etc). -- Alternatively we could separate those things into two passes: one which changes the data representation (e.g., string to date) the other which validates and only fails/succeeds without changing anything).

I would love if those methods would be functional (i.e., validate would not change the input JSON but construct a new one).

Yes, good idea. Should not be hard to implement.

Signed-off-by: Dan Selman <danscode@selman.org>
Signed-off-by: Dan Selman <danscode@selman.org>
@dselman
Copy link
Contributor Author

dselman commented Jun 16, 2020

Already merged into release-1.0 branch.

@dselman dselman closed this Jun 16, 2020
@jeromesimeon jeromesimeon deleted the functional-api branch April 8, 2021 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants