Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
bb0cc7b2
authored
2020-06-19 19:47:50 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
modify upload doc url
1 parent
d5c6be4b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
docs/main.yaml
src/apps/urls.py
src/common/management/commands/generate_api_doc.py
docs/main.yaml
View file @
bb0cc7b
...
...
@@ -12,7 +12,7 @@ schemes:
-
https
-
http
paths
:
/api/create/v1
/
:
/api/create/v1
:
post
:
tags
:
-
doc
...
...
src/apps/urls.py
View file @
bb0cc7b
...
...
@@ -19,5 +19,5 @@ from django.urls import path, include
urlpatterns
=
[
path
(
'admin/'
,
admin
.
site
.
urls
),
path
(
r'api/users/'
,
include
(
'apps.account.urls'
)),
path
(
r'api/create/v1
/
'
,
include
(
'apps.doc.urls'
)),
path
(
r'api/create/v1'
,
include
(
'apps.doc.urls'
)),
]
...
...
src/common/management/commands/generate_api_doc.py
View file @
bb0cc7b
...
...
@@ -48,6 +48,8 @@ class Command(BaseCommand):
view_class
=
view
.
view_class
url_path
,
path_parameters
=
pattern
[
0
][
0
]
url_path
=
unify_url_path_format
(
url_path
)
if
url_path
!=
'/api/create/v1'
:
continue
url_path_paramters
=
getattr
(
view
,
'parameters_doc'
,
None
)
if
url_path_paramters
:
url_path_paramters
=
yaml
.
load
(
url_path_paramters
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment