Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
fixed route /docs and edited projects endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerwoud committed Mar 19, 2024
1 parent 4e34eef commit 315aeff
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/project/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from .endpoints.projects.project_endpoint import project_bp
from .endpoints.submissions import submissions_bp
from .endpoints.courses.join_codes.join_codes_config import join_codes_bp
from .endpoints.docs.docs_endpoint import swagger_ui_blueprint

def create_app():
"""
Expand All @@ -25,6 +26,7 @@ def create_app():
app.register_blueprint(project_bp)
app.register_blueprint(submissions_bp)
app.register_blueprint(join_codes_bp)
app.register_blueprint(swagger_ui_blueprint)

return app

Expand Down
16 changes: 16 additions & 0 deletions backend/project/endpoints/docs/docs_endpoint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
Module for defining the swagger docs
"""

from flask_swagger_ui import get_swaggerui_blueprint

SWAGGER_URL = "/docs"
API_URL = "/static/testyallah.json"

swagger_ui_blueprint = get_swaggerui_blueprint(
SWAGGER_URL,
API_URL,
config={
'app_name': 'Pigeonhole API'
}
)

0 comments on commit 315aeff

Please sign in to comment.