If you disconnect that fuel line at the rubber hose, it should leak a little fuel then stop. Your genny will have a fuel pump mounted right on the generator, then a short line to the carburetor. If there was a fuel filter, it'd be before the fuel pump.
You want to disconnect the fuel line going into the carburetor, then crank over the genny and see if fuel comes out of the disconnected line. If not, could be bad fuel pump motor or rubber diaphragm inside it. Also could be pinhole (air holes from corrosion) in any steel tubing line. A pin hole will allow air to suck in and with a low volume fuel pump like the Onan, it won't suck hard enough to overcome it.