Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Swagger for API docs #125

Merged
merged 5 commits into from
Aug 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions helpo-api/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions helpo-api/helpo/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def base_dir_join(*args):
'import_export',

'rest_framework',
'rest_framework_swagger',
'knox',

'common',
Expand Down Expand Up @@ -123,3 +124,8 @@ def base_dir_join(*args):
'10.0.2.2:8001',
'10.0.2.2:8081'
)

# Swagger
SWAGGER_SETTINGS = {
'LOGIN_URL': '/auth/log_in/'
}
5 changes: 5 additions & 0 deletions helpo-api/helpo/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
from rest_framework import routers
from actividades import urls as actividades_urls
from users import urls as users_urls
from rest_framework_swagger.views import get_swagger_view

schema_view = get_swagger_view(title='Helpo API')

urlpatterns = [
url(r'^admin/', admin.site.urls),
Expand All @@ -19,3 +22,5 @@
urlpatterns = [
url(r'^__debug__/', include(debug_toolbar.urls)),
] + urlpatterns

urlpatterns += [ url(r'^docs/', schema_view) ]