[英]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.