如何验证OpenAPI规格并生成C#REST API客户端?

发布于 2025-02-06 20:07:48 字数 451 浏览 2 评论 0原文

我正在尝试使用在Atlassian 站点用于JIRA云。

我尝试使用Swagger Codegen,OpenAPI-Generator和NSWAG Studio。没有编译自动生成的REST API客户端。我试图为.NET 4.X和.NET 6生成,但无效。

请让我知道如何验证OpenAPI规格是否引起问题。如果这引起了问题,是否可以选择修复该OpenAPI规格并生成REST API客户端?我不想对自动生成的代码进行任何更改。

谢谢

I am trying to generate a Rest API Client using the OpenAPI spec published on the Atlassian site for the Jira cloud.

I have tried using the Swagger Codegen, Openapi-generator, and NSwag Studio. None of the auto-generated Rest API Client compiled. I have tried to generate for .Net 4.X and .Net 6 but nothing working.

Please let me know how to validate whether the OpenAPI spec is causing an issue. If that's causing the issue, is there an option to fix that OpenAPI spec and generate the Rest API Client? I prefer not to make any changes to the auto-generated code.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凌乱心跳 2025-02-13 20:07:48

我可以使用OpenAPI Generator 6.0.0生成C#客户端,然后毫无问题地对其进行编译:(

openapi-generator-cli generate -g csharp-netcore -i https://developer.atlassian.com/cloud/jira/platform/swagger.v3.json -o /tmp/jira-csharp/

可以通过 npm npm install -G @openapitools/OpenApi-generator-cli

I can generate a C# client using OpenAPI Generator 6.0.0 and compile it without issue:

openapi-generator-cli generate -g csharp-netcore -i https://developer.atlassian.com/cloud/jira/platform/swagger.v3.json -o /tmp/jira-csharp/

(openapi-generator-cli can be installed via npm: npm install -g @openapitools/openapi-generator-cli
)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文