From 98995edd7247a81cec008dd0b8f2afd0d5ee6a62 Mon Sep 17 00:00:00 2001 From: Aron Buzogany Date: Fri, 23 Feb 2024 18:10:33 +0100 Subject: [PATCH] linting: added docs and removed trailing whitespaces --- backend/project/endpoints/index.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/backend/project/endpoints/index.py b/backend/project/endpoints/index.py index b5536eaf..9d1e302c 100644 --- a/backend/project/endpoints/index.py +++ b/backend/project/endpoints/index.py @@ -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")) \ No newline at end of file + +index_bp.add_url_rule("/", view_func=Index.as_view("index"))