简体   繁体   English

如何生成 Woocommerce REST Api 的 Swagger json 文件?

[英]How can i generate a Swagger json file of Woocommerce REST Api?

I have a .NET (C#) desktop application and I need to connect this with an existing Woocommerce website.我有一个 .NET (C#) 桌面应用程序,我需要将它与现有的 Woocommerce 网站连接起来。 I am familiar with Swagger.我对 Swagger 很熟悉。 Swagger generates the class definitions along with HttpClient execution code of the remote endpoints, so I wanted to consume the Woocommerce rest api endpoints through a swagger json file. Swagger 生成类定义以及远程端点的 HttpClient 执行代码,因此我想通过 swagger json 文件使用 Woocommerce rest api 端点。 But unfortunately Woocommerce doesn't support Swagger file yet (this is what I understood by seeing their documentation).但不幸的是,Woocommerce 还不支持 Swagger 文件(这是我通过查看他们的文档所理解的)。 I have tried to use我试过用

http://mywcommercesite.com/wp-json/wc/v1 http://mywcommercesite.com/wp-json/wc/v1

but no luck as it is not a Swagger file.但没有运气,因为它不是 Swagger 文件。

So, my question is, should I try to generate the swagger file by myself manually, or is there anything which will generate the swagger file for me after feeding it the above type of URL.所以,我的问题是,我应该尝试自己手动生成 swagger 文件,还是在提供上述类型的 URL 后可以为我生成 swagger 文件。 Thanks in advance.提前致谢。

您可以安装此插件,该插件将为所有 WP API https://wordpress.org/plugins/wp-api-swaggerui/生成 swagger UI /

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 .net core/swagger - 生成 swagger.json 文件时如何绕过控制器文件? - .net core/swagger - How can I around a controller file when generating the swagger.json file? 如何从Azure API App解决方案生成swagger元数据文件? - How do I generate swagger meta data file from Azure API App solution? 我可以指定 Web-Api 方法需要 Swashbuckle/Swagger 生成的页面/json 中的文件吗 - Can I specify that Web-Api method expects a file in Swashbuckle/Swagger generated page/json 如何从 Visual Studio 中的 Swagger 文件更新 REST API 客户端 - How to update REST API Client from a Swagger file in Visual Studio 如何通过 REST API 发送文件? - How can I send a File over a REST API? Generating C# Rest API Client from swagger.json - Generating C# Rest API Client from swagger.json .net 6.0:如何在 .net 6.0 中生成 Swagger.json 文件? - .net 6.0 : How to generate Swagger.json file on build in .net 6.0? 如何使用Rest API C#更新JSON文件中的令牌 - How do I update tokens in a JSON file using Rest API C# 如何让我的 API 生成我想要的多层 JSON 脚手架? - How can I get my API to generate my desired multi-tiered JSON scaffolding? 如何生成 .pfx 文件? - How can I generate a .pfx file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM