archiloque / sinatra-swagger-exposer

Create Swagger endpoint for your Sinatra application
MIT License
15 stars 20 forks source link

How do I turn off verification? #8

Closed astrieanna closed 8 years ago

astrieanna commented 8 years ago

While verification is helpful in tests and qa, I don't want to needlessly break my application in production. How can I globally turn off verification of the swagger documentation?

astrieanna commented 8 years ago

Nevermind, I think I found it: app.set :result_validation, (ENV['RACK_ENV'] != 'production')

https://github.com/archiloque/sinatra-swagger-exposer/blob/master/lib/sinatra/swagger-exposer/swagger-exposer.rb#L22