Dalrimple, J.
If the mayor refused to sign a contract made in pursuance of the charter and ordinances of the city, the relator is entitled to the writ of mandamus.
Chief Justice Parker, in the case of Waldron v. Lee, 5 Pick. 328, says that there is a discretion in the court when applied to for the compulsory process of mandamus, to withhold or grant it, according to the justice of the case, and that if it should manifestly appear that a tax was illegally granted or assessed, so that the officer required to collect it would have no authority, or the persons taxed would have a right to restitution by action, without doubt the court would with*397hold the exercise of its power rather than throw the parties into an expensive field of litigation. In the case of The People v. Supervisor of Green, 12 Barb. 220, it is held that the only proper ground for the allowance of the writ is, that without it there would be a defect of justice; and that, though it issue in the name of the people, it is substantially a civil remedy granted to the relator, and that, to entitle him to this remedy, two things must appear: First. That he has a legal right to have something done by the party to whom he seeks to have the writ directed, and which has not been done; and, Secondly, that he has no specific legal remedy to which he can resort to compel the performance of this duty. In short, I think it must be acknowledged that the court is not obliged to issue the writ in all eases where it has the power to do so, but may exercise its discretion as well in refusing as granting the writ. The People v. Westchester, 15 Barb. 617.
The true rule applicable to this case I think is, that the relator must clearly show not only that the defendant is bound, in the discharge of his official duty, to do the act in question, but that the relator’s right to have it done is such as the law ought, at relator’s suit, to enforce. 2 Johns. Cases, (Shepherd’s ed.) 217; 4 Tapping on Mand. 27; 1 Cow. 512; 4 Hill 581.
If the contract, which the relator desires to compel the mayor to sign, has been made in violation of the city charter or ordinances, the writ should not be allowed. It, therefore, becomes necessary to inquire whether the contract in question is one which the law will uphold. We think it is not, for the following reasons:
First. No plans or specifications of the proposed improvement were ever filed in the street commissioner’s office, as required by tiie city ordinances. By section five of the ordinance, on page 202 of Book of City Ordinances, it is required that the advertisement for proposals for grading, graveling, and paving streets shall specify, in general terms, the nature of the work or improvement for which proposals are to be received, and shall request contractors and other persons *398intending to make proposals, to examine the plans and specifications of such work or improvement, at the office of the street commissioner; and by the following section of the same ordinance it is provided that whenever any special ordinance shall be passed for regulating and grading any street, the proposals for the work shall, in all cases, contain bids for furnishing and setting or re-setting curb-stones, if the same be necessary, and the committee on streets shall award the contract for all the materials and labor, including curbstones and setting or re-setting the same, as required in the specifications of such improvement, prepared and exhibited in the office of the street commissioner, to the same party or-parties, and not otherwise. These sections of the ordinance referred to plainly show that proposals for paving, or for regulating and grading a street, are to be made in reference to plans and specifications of the work on file in the office of the street commissioner. Tf none are there, I do not see how any contract for the work can lawfully he made. The city authorities are to specify the plan, and particulars of the work before proposals can properly be made, because such proposals must be to do the work in accordance with the plans and specifications adopted by the city. As decided in the case of The People v. The Board of Improvement of Union Street, 43 N. Y. 227, such plans and specifications must- be adopted and filed, though the pavement is patented, and there can, therefore, be no competition for the work.
Second. The relator’s contract is as well for doing the work necessary to lay the pavement as to keep it in repair for five years, whereas by the city charter the city has the power only to order a street or section of a street to be paved at the expense of the owners of lands on the line thereof. The cost of keeping a paved street in repair is to be paid out of the city treasury. It is justly inferable from the papers before us, that the expenses of keeping this pavement in repair for the term of five years are included in the price to be paid to the relator for the work. If so, they will be assessed, together with the original cost of the work, on the land-owners on the *399line of the section of the street to he paved. This cannot lawfully be done. It does not vary the case that the cost of repairs is not specially mentioned in the relator’s proposals for the work, nor in the contract proper. By a bond bearing even date with the contract, the relator is bound to keep the pavement in good repair, so that the street and pavement shall be kept in good condition and safe for use and travel from ordinary means, for the term of five years. The expenses of keeping the street in repair must have entered into l ho contract, and been included in the amount for which the relaior proposed to do the work. How this adjunct to the contract was regarded by the city authorities is evinced by a resolution of the street committee of the 17th of August, 1871, in which they say, “the contract of said Hioolson Pavement Company, to keep the pavement laid in repair for live years, is, in the opinion of this committee, a strong and additional reason why it is for the interest of the city and property-owners interested that they should have the contract.” It is understood that this committee, on behalf of the city, accepted the relator’s proposals and awarded it the contract, and thereby undertook to bind the property-owners. In order to ascertain what was the previous contract, we must look at- all contemporaneous writings between the parties relating to the subject; matter. 1 Greenl. Ev., § 282. The real parties to this controversy are the relator on the one side, and the property-owners on the section of the street proposed to be paved, on the other. The object sought to be attained is, in effect, to hind these property-owners by a contract, to the validity of which it is contended the mayor’s signature is essential. But the proceedings, in the particulars above specified, have not been in accordance with the charter and city ordinances, and for this reason the relator is not entitled to the contract it asks ns, by this proceeding, to compel the mayor to execute.
There was much discussion on the argument, whether the ordinance and petition therefor, being simply for wood-block pavement, were, under the act of 1871, (Laws of 1871, p. *400600,) sufficient to authorize a contract for a patented pavement, and whether the duty of the mayor, in respect to the execution of the contract, was or not merely ministerial. After the view of the case already expressed, it is not necessary to discuss these questions, which we do not consider free of difficulty. If we should hold the ordinance and petition therefor sufficient in form, and that the duty of the mayor, under the city charter and ordinances, to sign contracts for street paving, is ministerial, we should still be obliged to deny the relator the writ of mandamus for the reasons above set forth.
Let the rule be discharged, with costs.
Justices Bedle and Scudder concurred.
Cited in Hugg v. Camden, 10 Vr. 624.