-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linting: added docs and removed trailing whitespaces
- Loading branch information
1 parent
80f3454
commit 98995ed
Showing
1 changed file
with
14 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
""" | ||
This is the index endpoint file. It contains the index endpoint of the API as specified by OpenAPI. | ||
""" | ||
|
||
from flask import Blueprint | ||
from flask_restful import Resource | ||
|
||
index_bp = Blueprint("index", __name__) | ||
|
||
class Index(Resource): | ||
""" | ||
Subclass of restfull Resource, used to define the index endpoint of the API. | ||
""" | ||
|
||
def get(self): | ||
""" | ||
Implementation of the GET method for the index endpoint. Returns the OpenAPI object. | ||
""" | ||
|
||
return {"Message": "Hello World!"} | ||
index_bp.add_url_rule("/", view_func=Index.as_view("index")) | ||
|
||
index_bp.add_url_rule("/", view_func=Index.as_view("index")) |