Swagger docs

This commit is contained in:
Xavier J 2016-02-18 18:02:07 +01:00
parent a643f34621
commit c3410c104b
10 changed files with 280 additions and 1 deletions

View 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

View 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" => "",
}
}
}
})