Repository navigation
Defaulting, Validation, and Canonicalization for Admin Api V2 #40385
shawkins
started this conversation in
API guidelines
Replies: 1 comment
|
So basically there are two distinct approaches we can take here:
Couple of thoughts on that:
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
On any create / update operation it is expected that resources will progress through defaulting and validation proir to being stored by the model. Similarly before any resource is served there should be canonicalization performed to ensure things like stable ordering - which may also be applicable prior to storage.
We should elaborate on how / where these will be implemented.
With the v1 logic the defaulting and validation are handled in RepresentationToModel, adjunct logic like the LoginProtocolFactory, and in the service layer. With the initial v2 prototype we are mapping directly to the model layer, so we will end up needing to replicate any such logic as it's dependent upon the legacy representation logic.
The other approach would be to layer the v2 logic on the v1 logic with a follow up tasks to separate v2 from v1.
All reactions