fix cycle detection
cycle detection in SwaggerApp.prepare

- when upgrade from 1.2, now skip basePath part, everything after host
would be used as path.