Determination of questions under deed, will, written contract, statute, municipal ordinance, contract or franchise. Any person interested under a deed, will, written contract or other writings constituting a contract or whose rights, status or other legal relations are affected by a statute, municipal ordinance, contract or franchise may have determined any question of construction or validity arising under the instrument, statute, ordinance, contract or franchise and obtain a declaration of rights, status or other legal relations thereunder. Construction of contract before or after breach. A contract may be construed either before or after there has been a breach thereof. Rights under trust or estate of decedent, infant, lunatic or insolvent.
Enumeration is no restriction on general powers.
Declaratory judgment may be refused. The court may refuse to render or enter a declaratory judgment or decree when such judgment or decree, if rendered or entered, would not terminate the uncertainty or controversy giving rise to the proceeding. 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 shall be entitled to be heard. If the statute, ordinance or franchise is alleged to be unconstitutional the Attorney General shall also be served with a copy of the proceeding and be entitled to be heard.