Swagger docs
This commit is contained in:
parent
a643f34621
commit
c3410c104b
10 changed files with 280 additions and 1 deletions
3
config/initializers/grape_swagger_rails.rb
Normal file
3
config/initializers/grape_swagger_rails.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
GrapeSwaggerRails.options.url = 'api-docs.json'
|
||||
GrapeSwaggerRails.options.app_name = 'API TéléProcédure Simplifiée'
|
||||
GrapeSwaggerRails.options.app_url = TPS::Application::URL
|
21
config/initializers/swagger-docs.rb
Normal file
21
config/initializers/swagger-docs.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
Swagger::Docs::Config.register_apis({
|
||||
"1.0" => {
|
||||
# the extension used for the API
|
||||
# :api_extension_type => :json,
|
||||
# the output location where your .json files are written to
|
||||
:api_file_path => "public",
|
||||
# the URL base path to your API
|
||||
:base_path => TPS::Application::URL,
|
||||
# if you want to delete all .json files at each generation
|
||||
:clean_directory => false,
|
||||
# Ability to setup base controller for each api version. Api::V1::SomeController for example.
|
||||
# :parent_controller => API::V1,
|
||||
# add custom attributes to api-docs
|
||||
:attributes => {
|
||||
:info => {
|
||||
"title" => "API TéléProcédure Simplifiée",
|
||||
"description" => "",
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue