This is happening is because you haven't defined the formats that this restriction applies to. The metadata page is indicating this by not showing any formats available. You can specify the formats like so.
[Restrict(VisibilityTo = RequestAttributes.Localhost | RequestAttributes.Xml | RequestAttributes.Json)]
This will show the route on localhost requests for json and xml formats. To get the route visible in Swagger, you must allow Json.