trebol-ecommerce / trebol-backend-monolith

Monolithic eCommerce backend web application that exposes a RESTful API.
MIT License
16 stars 21 forks source link

Make `POST /data/products` not to cascade creation of other elements #103

Closed bglamadrid closed 2 years ago

bglamadrid commented 2 years ago

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...