问题描述
我正在尝试使用swagger-ui和connexion登录。
为此,我要登录并获取令牌。我将此令牌替换为标题。我正在授权(好像swagger-ui
好像成功了),但是当我尝试发出请求时,出现错误
AttributeError: 'nonetype' object has no attribute 'get'.
查看源代码-此方法在这里-https://github.com/zalando/connexion/blob/master/connexion/security/security_handler_factory.py#L339
显然,这是由于auth_funcs = []
尽管请求本身中有一个标题。如果您通过postman
进行测试,那么一切都很好。
openapi.yml
paths:
/articles/catalog/article/<article_id>/note/add:
post:
security:
- bearerAuth: []
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)