1

hi i have two model in django like Device and Data, the Data is related many-to-one to Device and my api returned a list of the Devices and orther api return a list of Data that related to Device. and the android developer say i have both of that with one request so you must merge tow api to onece and i try to say it's not best practice and don't followed the SOLID principle .

now what should we do and what approach should we take?

Nova
  • 413
  • 4
  • 11
  • 2
    As per SOLID principle, one is Single Responsibility, each API should have unique functionality. If it is /deviceById as example, it should return multiple data. Similarly a data may also give multiple devices. But two different should not give the same set of data. – Sambit Jul 31 '21 at 16:18

0 Answers0