Skip to content

Instantly share code, notes, and snippets.

@lalitlogical
Last active December 18, 2018 09:54
Show Gist options
  • Save lalitlogical/9c13175c4059e3353f7f2bfe44e8d3e6 to your computer and use it in GitHub Desktop.
Save lalitlogical/9c13175c4059e3353f7f2bfe44e8d3e6 to your computer and use it in GitHub Desktop.
swagger configuration
GrapeSwaggerRails.options.url = '/api/v1/apis_doc.json'
GrapeSwaggerRails.options.before_action do
GrapeSwaggerRails.options.app_url = request.protocol + request.host_with_port
end
GrapeSwaggerRails.options.app_name = 'Service Name'
GrapeSwaggerRails.options.api_auth = 'basic' # Or 'bearer' for OAuth
GrapeSwaggerRails.options.api_key_name = 'Authorization'
GrapeSwaggerRails.options.api_key_type = 'header'
GrapeSwaggerRails.options.doc_expansion = 'list'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment