ABSOFUKENLUTLY BRO! They will charge you a huge fee to pay the salary of the Inspector. This is the angle the city's will take advantage of. They will make new ordinances and new codes just for this, you will have to jump thru firey hoops and pay astronomical fee's.
They will not let you have a garden that is not code compliant. This will be there excuse to shut your op down. It wasnt compliant.
That is why a Licensed General Contractor or equivalent must do the work. No way No how the citys wont take FULL ADVANTAGE of this!
They will also require semen, stool and blood samples. Your last 6 paystubs, your finger prints and your first daughter's virginity.