错误使用endpoint-framework-tools生成OpenAPI文档(不清楚的文档) [英] Error Generating OpenAPI doc using the endpoint-framework-tools (unclear documentation)

本文介绍了错误使用endpoint-framework-tools生成OpenAPI文档(不清楚的文档)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(简介)

我正在使用谷歌文档在谷歌云端点上接受一些教程。我已经设法运行我的第一个API,但是使用endpoint-framework-tools生成OpenAPI文档时遇到了错误



(问题/问题)

长话短说,我在尝试生成我的谷歌云端点项目的OpenAPI文档时遇到了不清晰的错误。
官方Google文档(here)声明下面的方法来生成文件:

  endpoints-framework-tools-2.0.0-beta.11 / bin / endpoints -framework-tools\ 
get-openapi-doc \
--hostname = YOUR-PROJECT-ID.appspot.com \
--war = target / echo-1.0- SNAPSHOT \
com.example.echo.Echo

它们没有指定什么是 com.eample.echo.Echo。
尝试通过用我的包路径替换com.example来运行命令我收到下面的混淆错误。

 错误:co.mydomain.eliokhattar.myapplication.backend.MyEndpoint 

用其他软件包取代上述软件包仍然会出现同样的错误。



任何人都可以建议或提供一个关于如何使用这个endpoints-framework-tool的清晰教程?

解决方案

我已经发现了这个问题,它是这与我在调用端点框架时没有提及-classpath参数有关。
下面的命令工作正常。

  endpoints-framework-tools-2.0.0-beta.11 / bin / endpoints-framework-tools \ 
get-openapi-doc \
--hostname = iccloudendpoint.appspot.com \
--war = / Users / eliokhattar / endpints-test / IcExteranlTutorialDemo / icSysBackend / src / main / webapp \
--classpath = / Users / eliokhattar / endpints-test / IcExteranlTutorialDemo / icSysBackend / build / classes / main / co.mydomain.eliokhattar.myapplication.backend.MyEndpoint

另一方面,我现在有一个不相关的错误。


(Intro)
I am undergoing some tutorials on google cloud endpoint using the google documentation. I have managed to run my first API but i am having an error generating an OpenAPI document using the endpoint-framework-tools

(Question/Issue)
Long story short, I am having an "unclear" error while trying to generate the OpenAPI document of my google cloud endpoint project. Official google docs (here) states the below method to generate the file:

  endpoints-framework-tools-2.0.0-beta.11/bin/endpoints-framework-tools\
 get-openapi-doc \
  --hostname=YOUR-PROJECT-ID.appspot.com \
  --war=target/echo-1.0-SNAPSHOT \
  com.example.echo.Echo

They do not specify what is "com.eample.echo.Echo". Trying to run the command by replacing com.example by my package path I am receiving the below confusing error.

Error:  co.mydomain.eliokhattar.myapplication.backend.MyEndpoint

replacing the above package by any other package still gives the same error.

Can any one advise or provide a clear tutorial on how to use this endpoints-framework-tool?

解决方案

I have figured out the issue, and it was related to the fact that i was not mentionning the -classpath parameter when invoking endpoint framework. The below command worked fine.

endpoints-framework-tools-2.0.0-beta.11/bin/endpoints-framework-tools \
 get-openapi-doc \
 --hostname=iccloudendpoint.appspot.com \
 --war=/Users/eliokhattar/endpints-test/IcExteranlTutorialDemo/icSysBackend/src/main/webapp \
 --classpath=/Users/eliokhattar/endpints-test/IcExteranlTutorialDemo/icSysBackend/build/classes/main/ co.mydomain.eliokhattar.myapplication.backend.MyEndpoint

On the other hand i am having a different unrelated error now.

这篇关于错误使用endpoint-framework-tools生成OpenAPI文档(不清楚的文档)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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