I developed the POST operation of /data/products so that existing categories may be detected and linked when included in the JSON body, but if they don't exist they are created. Same goes for product images.
This is a side-effect not documented anywhere 😥
Not to mention, it doesn't comply with the API spec, since it goes against the isolation principle that most resources follow.
Proposal
While this cascading could be added to the specification, for now the concerning parts should be commented out.
Yeah, darned past me writing these shadowy functionalities...
I developed the POST operation of
/data/products
so that existing categories may be detected and linked when included in the JSON body, but if they don't exist they are created. Same goes for product images. This is a side-effect not documented anywhere 😥Not to mention, it doesn't comply with the API spec, since it goes against the isolation principle that most resources follow.
Proposal While this cascading could be added to the specification, for now the concerning parts should be commented out.
Yeah, darned past me writing these shadowy functionalities...