
73 Wn.2d 451 (1968)
439 P.2d 246
THE STATE OF WASHINGTON, on the Relation of Roman Klappsa et al., Appellant,
v.
THE CITY OF ENUMCLAW et al., Respondents.[*]
No. 39311.
The Supreme Court of Washington, Department One.
March 28, 1968.
Duane S. Radliff, for appellant.
Derrill T. Bastian and Philip E. Biege, for respondents.
ROSELLINI, J.
[1] The relators[1] petitioned the superior *452 court for a writ of mandamus directed to certain officials of the city of Enumclaw, ordering them to issue a building permit to authorize the relators to erect certain commercial buildings on their premises in the city of Enumclaw. It was alleged in the petition that proper application had been made for the permit but that it had been refused upon the invalid ground that the buildings in question would violate the zoning ordinance of the city.
At the close of the presentation of the relators' evidence, the trial court dismissed the petition, finding the evidence insufficient. Specifically, the trial court found that the relators' application for a building permit was defective, in that it did not supply all of the information which is required under the city's building code and was not accompanied by detailed plans and specifications.
It is the contention of the relators that it was not necessary for them to furnish all of the information and specifications at the time of their original application and that it was not even customary for the applicant to do so; that they have at all times been ready, willing and able to furnish the additional information and specifications, but that to do so would be a useless act inasmuch as the respondents have expressed themselves as unwilling to issue the permit, whether or not the requirements of the building code are met.
We find the record supports the contention that the relators declared themselves ready, willing and able to supply the required information and specifications. The question before us is whether the trial court erred in dismissing the petition on the ground that the application was defective.
It is not suggested by the respondents that the information contained in the application was insufficient to support the issuance of a conditional permit, such as that which was issued in the case of Bishop v. Town of Houghton, 69 Wn.2d 786, 420 P.2d 368 (1966). While it was not material to the issue in that case, we did take note of the fact that the city of Houghton issued a permit, upon payment of the required fee, conditioned upon final plans and specifications being in accordance with the requirements of the building *453 code. The respondents do not deny that they sometimes follow the same procedure.
However, the respondents argue in support of the judgment that the trial court could not grant the relief requested by the relators because a writ of mandamus is not available if the act which it directs is discretionary. They cite Lillions v. Gibbs, 47 Wn.2d 629, 289 P.2d 203 (1955) and Benedict v. Board of Police Pension Fund Comm'rs of Seattle, 35 Wn.2d 465, 214 P.2d 171, 27 A.L.R.2d 992 (1950), which support this general proposition. Since the approving of the specifications would involve the exercise of discretion, they argue, no writ of mandamus may issue.
[2, 3] The fallacy of the respondents' position is in assuming that the trial court cannot grant appropriate relief to the relators without ordering the respondents to exercise their discretion in a certain manner. This is an unwarranted assumption. The question which the relators seek to have determined is whether there was in existence, at the time of their application, a valid and applicable zoning ordinance. If the trial court finds that there was no such ordinance,[2] it can issue a writ of mandamus requiring the respondents to issue a building permit conditioned upon the final plans and specifications being in accordance with the building code, just as was done in the case of Bishop v. Town of Houghton, supra. In substance, this would be simply a writ of mandamus requiring the proper office or officers to exercise the discretion which it is their duty to exercise under the law. Such a writ is proper. State ex rel. Stephens v. Odell, 61 Wn.2d 476, 378 P.2d 932 (1963).
The writ would not, as the respondents argue, permit the relators to circumvent the requirements of the building code. It would simply order the respondents to issue a permit if those requirements are met. We ordered the issuance of a writ under similar circumstances in State ex rel. *454 Craven v. Tacoma, 63 Wn.2d 23, 385 P.2d 372 (1963), cited in the respondents' brief. In that case, the city officials had refused to provide the applicant with an application form for a permit, claiming that the proposed building would be unlawful. We held that, if the zoning ordinances were complied with, the issuance of a building permit is a ministerial act involving no exercise of discretion on the part of the city officials, and ordered the issuance of the permit even though formal application had not been made when the action was brought.
Assuming, however, that the respondents are correct in their theory that discretion is involved in determining whether plans and specifications meet the requirements of the building code, we are satisfied that the court has the power to issue a writ directing that that discretionary function be performed if and when the relators submit their plans and specifications.
[4] It is also well settled that, in a mandamus action, the court can grant the relief to which the petitioner is entitled if it is less than that requested in the petition. Shoultes v. Quast, 109 Wash. 510, 187 Pac. 356 (1920) and cases cited therein. Here the relators asked for an unconditional writ; if they prevail in their contention that there was no valid and subsisting zoning ordinance applicable to their property at the time of their application for a building permit, they will be entitled to a writ conditioned upon their compliance with the terms of the building code.
The judgment is reversed and the cause remanded with directions to proceed in accord with the views expressed herein.
FINLEY, C.J., WEAVER, HALE, and McGOVERN, JJ., concur.
NOTES
[*]  Reported in 439 P.2d 246.
[1]  This action was commenced in the name of the State, and under Rule on Appeal 18, RCW vol. 0, we must use the title under which the action was brought. However, we call attention to the fact that, under RCW 7.16.010 and Civil Rule for Superior Court 17, the action should be brought in the name of the real party in interest, who should be designated the plaintiff; the adverse party should be designated the defendant. See Luellen v. Aberdeen, 20 Wn.2d 594, 148 P.2d 849 (1944).
[2]  This is a question which cannot be answered in this court upon the present state of the record. The relators' evidence tended to show that no ordinance had been filed at the time of the application, but the respondents may be able to convince the trial court that such an ordinance was in effect.
