I am moving into a new home. The kitchen has a separate gas cooktop and gas wall oven. Both were supplied by a half inch black iron pipe terminating at a valve in the bottom of one cabinet. From there, two flare fittings connected to a tee allowed for flexible gas connectors to run to each appliance. Each gas connector ran through several cabinets before reaching the appliance.
I added runs of black iron pipe so that they each terminate in the same cabinet/cavity as the appliance.
Underneath the gas cooktop is just a standard cabinet, where things like pots and pans could be stored. It also has two drawers which close almost to the very back of the cabinet. One drawer actually has a piece cut out of it to avoid hitting the regulator valve. I have two small children and I'm worried about the flexible gas line getting bumped by pots and pans in that cabinet. I am also unsure if this is even up to code (I'm in New York State) to have the flexible gas connector exposed inside of a usable cabinet space like this.
I would like to hard pipe all the way up to the appliance. The cooktop has a regulator valve underneath it with 1/2" female threading so my plan would be to add some fittings and pipe until I get to the other end of pipe terminating in the cabinet, then connect the two with a union. I see the utility in using a flexible gas connector for something like a combined range/oven or a gas dryer where it needs to be pulled away from the wall in order to connect/disconnect. In my situation however, I can open up the cabinet and have direct access to the connection and valve. Practically speaking, I don't see the need for the flexible connector aside from the fact that it would be quicker and easier to install.
To summarize, my questions are:
Is it legal in NYS to have a flexible gas connector exposed inside a used/ working cabinet space?
Can I legally forgo use of a flexible gas connector and use black iron pipe to connect directly to the appliance?