richhollis / swagger-docs

Generates swagger-ui json files for Rails APIs with a simple DSL.
MIT License
750 stars 150 forks source link

How so set a generic base_path to manage multiple slug #145

Open Charrette opened 8 years ago

Charrette commented 8 years ago

Hi,

I have an URL as app.myapp.com where each account get an unique slug, and the URL can become first-account.app.myapp.com or second-account.app.myapp.com

I can access swagger documentation by going on app.myapp.com/api/index but I'd like to be able to do also: first-account.app.myapp.com/api/index but this is not working, I get the error Unable to read api 'events' from path app.myapp.com/app/events.json (server returned undefined)

Actually in config/initializers/swagger_docs.rb I have: :base_path => "app.myapp.com"

Any idea?