首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何修复上的OpenAPI文档生成?

如何修复上的OpenAPI文档生成?
EN

Stack Overflow用户
提问于 2018-11-24 04:32:11
回答 1查看 118关注 0票数 1

我正在学习本教程:“在App标准上开始使用Cloud框架”。https://cloud.google.com/endpoints/docs/frameworks/python/get-started-frameworks-python

在步骤2中的“生成OpenAPI文档”部分中,在用我的项目ID替换'MY_PROJECT_ID‘之后运行命令时:

代码语言:javascript
复制
python lib/endpoints/endpointscfg.py get_openapi_spec main.EchoApi --hostname [MY_PROJECT_ID].appspot.com

我得到以下错误:

代码语言:javascript
复制
Traceback (most recent call last):
  File "lib/endpoints/endpointscfg.py", line 31, in <module>
    main(sys.argv)
  File "/home/samuel_lessing/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/_endpointscfg_impl.py", line 617, in main
    args.callback(args)
  File "/home/samuel_lessing/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/_endpointscfg_impl.py", line 465, in _GenOpenApiSpecCallback
    x_google_api_name=args.x_google_api_name)
  File "/home/samuel_lessing/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/_endpointscfg_impl.py", line 308, in _GenOpenApiSpec
    x_google_api_name=x_google_api_name)
  File "/home/samuel_lessing/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/_endpointscfg_impl.py", line 216, in GenApiConfig
    services, hostname=hostname, **additional_kwargs))
  File "/home/samuel_lessing/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/openapi_generator.py", line 1064, in pretty_print_config_to_json
    descriptor = self.get_openapi_dict(services, hostname, x_google_api_name=x_google_api_name)
  File "/home/samuel_lessing/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/openapi_generator.py", line 1050, in get_openapi_dict
    return self.__api_openapi_descriptor(services, hostname=hostname, x_google_api_name=x_google_api_name)
  File "/home/samuel_lessing/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/openapi_generator.py", line 951, in __api_openapi_descriptor
    security_definitions)
  File "/home/samuel_lessing/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/openapi_generator.py", line 756, in __method_descriptor
    api_key_required=api_key_required)
  File "/home/samuel_lessing/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/openapi_generator.py", line 791, in __security_descriptor
    'audiences must be a dict when third-party issuers '
endpoints.api_exceptions.ApiConfigurationError: audiences must be a dict when third-party issuers (auth0, firebase, etc) are in use.

有人知道怎么解决这个问题吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-11-26 22:37:02

感谢您使用云终结点框架。

这是框架版本4.7.0中引入的一个bug。我已经打开了https://github.com/cloudendpoints/endpoints-python/issues/184来跟踪它,并将尝试尽快修复它。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53455146

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档