The council may appoint a city attorney, together with such assistant city attorneys as may be authorized by ordinance. The city attorney shall be responsible for representing and defending the city in all litigation in which the city is a part, shall be the prosecuting officer in the city court, shall attend all meetings of the council, shall advise the council, mayor and other officers and employees of the city concerning legal aspects of the city's affairs, shall approve as to form and legality all contracts, deeds, bonds, ordinances, resolutions, and motions prescribed by the council or mayor.