40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
from services.dbservice import DbService
|
|
from flask import Response, request
|
|
from flask_restful import Resource,reqparse
|
|
from services.utilityservices import sendRestResponse
|
|
from flask_restful_swagger import swagger
|
|
|
|
#this one for sample of individual modules/components in flask
|
|
class WorkingController(Resource):
|
|
|
|
@swagger.operation(
|
|
notes='Test Implemetaion of swaagger UI API',
|
|
responseClass='None',
|
|
nickname='Test API1',
|
|
parameters=[
|
|
{
|
|
"name": "name",
|
|
"description": "blueprint object that needs to be added. YAML.",
|
|
"required": False,
|
|
"allowMultiple": False,
|
|
"dataType": 'string',
|
|
"paramType": "query"
|
|
}
|
|
],
|
|
responseMessages=[
|
|
{
|
|
"code": 201,
|
|
"message": "Created. The URL of the created blueprint should be in the Location header"
|
|
},
|
|
{
|
|
"code": 405,
|
|
"message": "Invalid input"
|
|
}
|
|
]
|
|
)
|
|
|
|
def get(self, id=100):
|
|
page = request.args
|
|
print(page)
|
|
# return Response({'msg':'Welcome'},status=200)
|
|
return sendRestResponse(200,{'msg':id}) |