findAll(); return $this->json(["results" => $catList]); } /** * Get a room category by ID. */ #[Route('/api/room/category/{id}', name: 'app_room_category', methods: ["GET"])] #[OA\Tag(name: "Rooms")] #[OA\Response( response: 200, description: 'Returns a room category', content: new OA\JsonContent( type: 'object', ref: new Model(type: RoomCategory::class), ) )] #[OA\Parameter( name: 'id', in: 'path', description: 'RoomCategory ID', )] public function getById(RoomCategory $category): Response { return $this->json($category); } }