forked from acoomans/flask-autodoc
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional JSON doc formatting options and adapt unit tests
- Loading branch information
1 parent
91f6e20
commit 59c54fd
Showing
10 changed files
with
517 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import doctest | ||
import logging | ||
import os | ||
import subprocess | ||
import unittest | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,126 @@ | ||
{"endpoints":[{"args":[],"docstring":"Return all posts.","methods":["GET","HEAD","OPTIONS"],"rule":"/"},{"args":[],"docstring":"Admin interface.","methods":["GET","HEAD","OPTIONS"],"rule":"/admin"},{"args":[["greeting","Hello"],["id",null]],"docstring":"Return the user for the given id.","methods":["GET","HEAD","OPTIONS"],"rule":"/greet/<greeting>/user/<int:id>"},{"args":[["id",-1]],"docstring":"Return the user for the given id.","methods":["GET","HEAD","OPTIONS"],"rule":"/hello/user/<int:id>"},{"args":[],"docstring":"Create a new post.\n Form Data: title, content, authorid.\n ","methods":["OPTIONS","POST"],"rule":"/post"},{"args":[["id",null]],"docstring":"Return the post for the given id.","methods":["GET","HEAD","OPTIONS"],"rule":"/post/<int:id>"},{"args":[],"docstring":"Return all posts.","methods":["GET","HEAD","OPTIONS"],"rule":"/posts"},{"args":[["id",null]],"docstring":"Return the user for the given id.","methods":["GET","HEAD","OPTIONS"],"rule":"/user/<int:id>"},{"args":[],"docstring":"Return all users.","methods":["GET","HEAD","OPTIONS"],"rule":"/users"},{"args":[],"docstring":"Creates a new user.\n Form Data: username.\n ","methods":["OPTIONS","POST"],"rule":"/users"}]} | ||
{ | ||
"endpoints": [ | ||
{ | ||
"args": [], | ||
"docstring": "Return all posts.", | ||
"methods": [ | ||
"GET", | ||
"HEAD", | ||
"OPTIONS" | ||
], | ||
"rule": "/" | ||
}, | ||
{ | ||
"args": [], | ||
"docstring": "Admin interface.", | ||
"methods": [ | ||
"GET", | ||
"HEAD", | ||
"OPTIONS" | ||
], | ||
"rule": "/admin" | ||
}, | ||
{ | ||
"args": [ | ||
[ | ||
"greeting", | ||
"Hello" | ||
], | ||
[ | ||
"id", | ||
null | ||
] | ||
], | ||
"docstring": "Return the user for the given id.", | ||
"methods": [ | ||
"GET", | ||
"HEAD", | ||
"OPTIONS" | ||
], | ||
"rule": "/greet/<greeting>/user/<int:id>" | ||
}, | ||
{ | ||
"args": [ | ||
[ | ||
"id", | ||
-1 | ||
] | ||
], | ||
"docstring": "Return the user for the given id.", | ||
"methods": [ | ||
"GET", | ||
"HEAD", | ||
"OPTIONS" | ||
], | ||
"rule": "/hello/user/<int:id>" | ||
}, | ||
{ | ||
"args": [], | ||
"docstring": "Create a new post.\n Form Data: title, content, authorid.\n", | ||
"methods": [ | ||
"OPTIONS", | ||
"POST" | ||
], | ||
"rule": "/post" | ||
}, | ||
{ | ||
"args": [ | ||
[ | ||
"id", | ||
null | ||
] | ||
], | ||
"docstring": "Return the post for the given id.", | ||
"methods": [ | ||
"GET", | ||
"HEAD", | ||
"OPTIONS" | ||
], | ||
"rule": "/post/<int:id>" | ||
}, | ||
{ | ||
"args": [], | ||
"docstring": "Return all posts.", | ||
"methods": [ | ||
"GET", | ||
"HEAD", | ||
"OPTIONS" | ||
], | ||
"rule": "/posts" | ||
}, | ||
{ | ||
"args": [ | ||
[ | ||
"id", | ||
null | ||
] | ||
], | ||
"docstring": "Return the user for the given id.", | ||
"methods": [ | ||
"GET", | ||
"HEAD", | ||
"OPTIONS" | ||
], | ||
"rule": "/user/<int:id>" | ||
}, | ||
{ | ||
"args": [], | ||
"docstring": "Return all users.", | ||
"methods": [ | ||
"GET", | ||
"HEAD", | ||
"OPTIONS" | ||
], | ||
"rule": "/users" | ||
}, | ||
{ | ||
"args": [], | ||
"docstring": "Creates a new user.\n Form Data: username.\n", | ||
"methods": [ | ||
"OPTIONS", | ||
"POST" | ||
], | ||
"rule": "/users" | ||
} | ||
] | ||
} |
Oops, something went wrong.