I'm running a rest api with swagger, flask-restx
However, my problem is that in the swagger UI (http://127.0.0.1:5000/ ?) when testing out the endpoint, arabic text in the response body is returned as excaped characters \\u0645\\u0635\\u0646\\u0648\\u0639 \\u0645\
Same problem when using postman
The problem does not occur when using sublime text request package or when simply entering the URL in the browser (I have a jsonify extension)
Here is a shortened version of my code
@app.route('/products')
def products():
# logic with database
return JSONEncoder().encode(products)
name_space = api.namespace('product', description='Product API')
@name_space.route("/")
class ProductClass(Resource):
def get(self):
return make_response(products())
When I call the endpoint products
it works fine, but when I call product
it does not.