You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At this moment we have get verb that accepts a SELECT query. Some endpoints return a single object (GET /category/1) while others return a list (GET /categories). In addition, when we expect an object, code should return 404 error for an empty result, while for a list, it should return an empty list. Example:
- path: /categories/:idget: SELECT id,name FROM categories WHERE id = :id
- path: /categoriesget: SELECT id,name FROM categories
How we can distinguish such cases so we can generate different code?