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

proposal: split /regulator/{id} into two endpoints #16

Open
1e1f opened this issue Jul 27, 2022 · 0 comments
Open

proposal: split /regulator/{id} into two endpoints #16

1e1f opened this issue Jul 27, 2022 · 0 comments

Comments

@1e1f
Copy link
Member

1e1f commented Jul 27, 2022

Some members will want to use a regulator tag directly as a manifest of all cases/eaches that are "currently assigned" to that tag as it pertains to reporting. Others may which to use parent/historical/batch/other tags as a means to get a slice of products that want to be viewed or need to be updated. These two behaviors alias in a potentially dangerous (illegal) way, and so we should identify the intention at a high and clear level. As such, rather than a flag, I propose we make them explicitly different endpoints. 1 serving the current and the other serving history.

So:

/regulator/current/{id} matches only cases/eaches where the supplied id is the current/latest id
/regulator/history/{id} matches any case/each that has a the supplied id in it's full history of ids that have been applied

Furthermore (list order):

We should also standardize the order of the list when queried (the actual persistence layer can be implementation specific).

Do we agree that the end/back/last element of the list is most recent, aka: [1A4_Original, 1A4_More_Recent, 1A4_Current]

If that is non-controversial, then the endpoints are simply implemented as: "/regulator/current/{id}" matches last element in the list, "/regulator/history/{id}" matches any element in the list

P.R. to follow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant