DiamondLightSource / blueapi

Apache License 2.0
3 stars 5 forks source link

Remove models that are just wrappers for lists #624

Open DiamondJoseph opened 2 weeks ago

DiamondJoseph commented 2 weeks ago

DeviceResponse, PlanResponse and TaskListResponse base models all just wrap a list. We could just return the list.

callumforrester commented 2 weeks ago

See the top answer here: https://softwareengineering.stackexchange.com/questions/286293/whats-the-best-way-to-return-an-array-as-a-response-in-a-restful-api

stan-dot commented 1 week ago

petition to close as not planned @DiamondJoseph

callumforrester commented 1 week ago

I wanted to make sure this is documented in @keithralphs' service design guidelines, once I've checked I'll close this.

stan-dot commented 1 week ago

link for reference https://gitlab.diamond.ac.uk/sscc-docs/developer-guide/-/merge_requests/115