这几行代码的意思是:

  1. 定义了一个名为"bearerAuth"的安全方案,使用了HTTP协议,授权方案是"bearer",并指定了"bearerFormat"为"JWT"。
  2. 将安全方案"bearerAuth"添加到API规范的安全选项中。
  3. 将一个名为"_field2parameter"的方法的实现替换为openapi_util.patched_field2parameter方法的实现。
  4. 将FlaskParser的DEFAULT_UNKNOWN_BY_LOCATION字典中的"json"位置的默认未知值设为None。
apispeccomponentssecurity_scheme bearerAuth type http scheme bearer bearerFormat JWT apispecoptionssecurity = bearerAuth apima_pluginConverter_field2parameter = openapi_utilpatched_f

原文地址: https://www.cveoy.top/t/topic/iaeC 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录