On my Flask-restplus swagger documentation I have defined an endpoint that gets me list of public ip address, I have learned that I can define a model
resource_fields = api.model('Resource', {
'name': fields.String,
})
but I have also learned that I can use parser:
parser = api.parser()
parser.add_argument('param', type=int, help='Some param', location='form')
parser.add_argument('in_files', type=FileStorage, location='files')
@api.route('/with-parser/', endpoint='with-parser')
class WithParserResource(restplus.Resource):
@api.expect(parser)
def get(self):
return {}
which one should I use, to pass JWT
token ?
as what I want to pass is a header
so in curl that would be curl -X GET -H "AUTHORIZATION: JWT some_xyz_token" http://url/api/doc