TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

OpenAPI Generator now supports OCaml client generator

2 点作者 wing328hk将近 6 年前
We&#x27;ve added the OCaml client generator to the OpenAPI Generator project (https:&#x2F;&#x2F;github.com&#x2F;OpenAPITools&#x2F;openapi-generator). To generate an OCaml client given an OpenAPI&#x2F;Swagger specification file, please follow 3 simple steps below:<p>1. Download the Java JAR (https:&#x2F;&#x2F;oss.sonatype.org&#x2F;content&#x2F;repositories&#x2F;snapshots&#x2F;org&#x2F;openapitools&#x2F;openapi-generator-cli&#x2F;4.1.0-SNAPSHOT&#x2F;openapi-generator-cli-4.1.0-20190729.024538-72.jar)<p>2. Rename the JAR as &quot;openapi-generator-cli.jar&quot;<p>3. Run the following command to generate a Java API client for the Petstore API (https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;OpenAPITools&#x2F;openapi-generator&#x2F;master&#x2F;modules&#x2F;openapi-generator&#x2F;src&#x2F;test&#x2F;resources&#x2F;2_0&#x2F;petstore.yaml):<p>Mac&#x2F;Linux:<p>&gt; java -jar openapi-generator-cli.jar generate -g ocaml -i https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;OpenAPITools&#x2F;openapi-generator&#x2F;master&#x2F;modules&#x2F;openapi-generator&#x2F;src&#x2F;test&#x2F;resources&#x2F;2_0&#x2F;petstore.yaml -o &#x2F;var&#x2F;tmp&#x2F;ocaml&#x2F;<p>Windows:<p>&gt; java -jar openapi-generator-cli.jar generate -g ocaml -i https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;OpenAPITools&#x2F;openapi-generator&#x2F;master&#x2F;modules&#x2F;openapi-generator&#x2F;src&#x2F;test&#x2F;resources&#x2F;2_0&#x2F;petstore.yaml -o C:\tmp\ocaml<p>If you&#x27;ve any feedback or question, please let us know via https:&#x2F;&#x2F;github.com&#x2F;OpenAPITools&#x2F;openapi-generator&#x2F;issues&#x2F;new.<p>Thanks Christophe Gensoul (https:&#x2F;&#x2F;twitter.com&#x2F;cgensoul) for contributing the new generator (https:&#x2F;&#x2F;github.com&#x2F;OpenAPITools&#x2F;openapi-generator&#x2F;pull&#x2F;3446).

1 comment

wing328hk将近 6 年前
Correction for Step 3: I mean &quot;generate an OCaml API client for the Petstore API&quot;