[#513] Added hook to disable/enable the swagger plugin via external configuration

resolves #513