Foam is combustible, so the code keeps it away from living space. Under the Residential Code of Ohio, foam must be covered by a thermal barrier such as half-inch drywall, with narrower exceptions for attics, crawl spaces, and rim joists.
More detail
Section 316.4 of the Residential Code of Ohio requires foam plastic to be separated from the interior by half-inch gypsum board, 23/32-inch wood structural panel, or a material that passes the NFPA 275 fire tests. Section 316.5 lists the exceptions homeowners meet most often. In an attic or crawl space entered only for repairs or maintenance, an ignition barrier can stand in, such as 3/8-inch gypsum board or 1-1/2 inches of mineral fiber insulation, unless the foam system has been tested for that exposed use. In the rim joist, foam up to 3-1/4 inches thick with a density of 0.5 to 2.0 pounds per cubic foot and qualifying flame spread and smoke ratings may stay uncovered. A finished basement, a bonus room, or a pole barn office used as living space needs the full thermal barrier. The DC315 versus drywall FAQ explains where a coating fits.