When declaratory relief is sought, all persons shall be made parties who have or claim any interest which would be affected by the declaration, and no declaration shall prejudice the rights of persons not parties to the proceeding. In any proceeding which involves the validity of a municipal ordinance or franchise, the municipality shall be made a party and may be heard. If the statute, ordinance or franchise is alleged to be unconstitutional, the attorney general of the state shall be served with a copy of the proceeding and may be heard.
W.S. 1-37-113