如何在Google Cloud Endpoints上修复OpenAPI文档生成? [英] How do I fix OpenAPI document generation on Google Cloud Endpoints?

查看:73
本文介绍了如何在Google Cloud Endpoints上修复OpenAPI文档生成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究以下教程:"App Engine Standard上的Cloud Endpoints框架入门". https://cloud.google.com/endpoints/docs/frameworks/python/get-started-frameworks-python

I am working through the tutorial: 'Getting Started with Cloud Endpoints Frameworks on App Engine Standard'. https://cloud.google.com/endpoints/docs/frameworks/python/get-started-frameworks-python

在将命令"MY_PROJECT_ID"替换为我的项目ID后,在运行命令时,生成OpenAPI文档"部分的第二步:

On step two of the 'Generating the OpenAPI document' section when running the command after having replaced 'MY_PROJECT_ID' with my project ID:

python lib/endpoints/endpointscfg.py get_openapi_spec main.EchoApi --hostname [MY_PROJECT_ID].appspot.com

我收到以下错误:

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.

有人知道如何解决这个问题吗?

Does anyone know how to address this?

推荐答案

感谢使用Cloud Endpoints Frameworks.

thanks for using Cloud Endpoints Frameworks.

这是Frameworks版本4.7.0中引入的错误.我已经打开 https://github.com/cloudendpoints/endpoints-python/issues/184 进行跟踪,并将尝试尽快进行修复.

This is a bug that was introduced in Frameworks version 4.7.0. I've opened https://github.com/cloudendpoints/endpoints-python/issues/184 to track it and will try to have a fix out soon.

这篇关于如何在Google Cloud Endpoints上修复OpenAPI文档生成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆