gpt4 book ai didi

android - 如何使用 swagger 从 wp rest api 生成 Retrofit 客户端库

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:36:48 32 4
gpt4 key购买 nike

我正在为我的 WordPress 网站创建安卓客户端。有没有一种方法可以使用 swagger 从 wp rest 客户端生成 retrofit 2 客户端库,或者是否有任何其他工具可以生成相同的 .

最佳答案

引自 here ,是的,它是 swagger 现有代码生成模块的一部分:

The latest Java API client supports different HTTP client including Retrofit. To use Retrofit, please create a config.json file as follows:

{
"library": "retrofit"
}

and pass config.json via -c in the command line

You can run java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar config-help -l java for more information on customizing the Java API client.

关于android - 如何使用 swagger 从 wp rest api 生成 Retrofit 客户端库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36864110/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com