Skip to content

Commit

Permalink
replace flask-restful with flask-restplus. better API doc generation …
Browse files Browse the repository at this point in the history
…using swagger docs
  • Loading branch information
boompig committed Mar 5, 2018
1 parent 171fa01 commit bf0847c
Show file tree
Hide file tree
Showing 27 changed files with 2 additions and 1,479 deletions.
8 changes: 1 addition & 7 deletions passzero/api_v1.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
from datetime import datetime

from flask import Blueprint, escape, render_template, session
from flask import Blueprint, escape, session
from sqlalchemy.orm.exc import NoResultFound

from . import backend, change_password
Expand All @@ -27,12 +27,6 @@ class TokenExpiredException(Exception):
pass


@api_v1.route("/api/v1", methods=["GET"])
def show_api():
"""Display all available APIs"""
return render_template("api_v1.html", title="PassZero · API v1")


@api_v1.route("/api/csrf_token", methods=["GET"])
@api_v1.route("/api/v1/csrf_token", methods=["GET"])
def api_get_csrf_token():
Expand Down
8 changes: 1 addition & 7 deletions passzero/api_v2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from multiprocessing import Pool

from flask import Blueprint, render_template, session
from flask import Blueprint, session
from sqlalchemy.orm.exc import NoResultFound
from typing import List

Expand Down Expand Up @@ -29,12 +29,6 @@ def __jsonify_entries_multiprocess(enc_entries: List[Entry]):
return results


@api_v2.route("/api/v2", methods=["GET"])
def show_api():
"""Display all available APIs"""
return render_template("api_v2.html", title="PassZero · API v2")


@api_v2.route("/api/v2/entries", methods=["GET"])
@requires_json_auth
def api_get_entries():
Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ bs4==0.0.1
certifi==2018.1.18
cffi==1.11.5
click==6.7
coloredlogs==9.0
coverage==4.5.1
cryptography==2.1.4
decorator==4.2.1
Expand All @@ -19,7 +18,6 @@ Flask-Compress==1.0.2
Flask-Cors==3.0.3
Flask-JWT-Extended==3.7.0
Flask-Login==0.2.11
Flask-RESTful==0.3.6
flask-restplus==0.10.1
Flask-SQLAlchemy==2.0
Flask-SSLify==0.1.4
Expand Down
43 changes: 0 additions & 43 deletions templates/api_v1.html

This file was deleted.

58 changes: 0 additions & 58 deletions templates/api_v1_docs/delete_entries_id.html

This file was deleted.

59 changes: 0 additions & 59 deletions templates/api_v1_docs/delete_user.html

This file was deleted.

38 changes: 0 additions & 38 deletions templates/api_v1_docs/get_csrf_token.html

This file was deleted.

55 changes: 0 additions & 55 deletions templates/api_v1_docs/get_entries.html

This file was deleted.

47 changes: 0 additions & 47 deletions templates/api_v1_docs/get_user_preferences.html

This file was deleted.

0 comments on commit bf0847c

Please sign in to comment.