Open
Description
Hello, everyone, I am not sure that it is a right place to post it, but I came from
https://flask-restplus.readthedocs.io/en/stable/swagger.html link
I posted this already swagger-api/swagger-ui#5794
Let me be more clear:
I try to fill with info and push button:
And nothing happens, only JS console error. I tried to debug it, but have not got anything.
What I want to get is:
class IDMovies(Resource):
@swagger.operation(
notes='Get info about a movie by id',
nickname="getmovie",
parameters=[
{
"name": "movie_id",
"description": "ID of a movie to return",
"required":True,
"allowMultiple": False,
"dataType":"string",
}],
responseMessages=[
{
"status": 200,
"error": False
},
{
"error_msg": "Not found movie",
"status": 404,
"error": True
}
])
def get(self, movie_id):
movie = Movies.query.filter_by(imdbid=movie_id).first()
if movie:
movie = '{' + movie.__repr__() + '}'
movie = json.loads(movie)
return {'movie': movie, 'status': 200, 'error': False}
else:
return {'movie': "Not found movie", 'status': 404, 'error': True}