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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: Generate F# Giraffe server stub using OpenAPI Generator in 3 steps

2 点作者 wing328hk大约 6 年前
Hi all,<p>We&#x27;ve just added an F# Giraffe server stub generator (beta) to the OpenAPI Generator project (<a href="https:&#x2F;&#x2F;github.com&#x2F;OpenAPITools&#x2F;openapi-generator" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;OpenAPITools&#x2F;openapi-generator</a>) and would appreciate if you can try it out and let us know if you&#x27;ve any feedback or question for us (<a href="http:&#x2F;&#x2F;github.com&#x2F;OpenAPITools&#x2F;openapi-generator&#x2F;issues&#x2F;new" rel="nofollow">http:&#x2F;&#x2F;github.com&#x2F;OpenAPITools&#x2F;openapi-generator&#x2F;issues&#x2F;new</a>). To try it out, just follow 3 steps:<p>1. Download the Java JAR (<a href="https:&#x2F;&#x2F;oss.sonatype.org&#x2F;content&#x2F;repositories&#x2F;snapshots&#x2F;org&#x2F;openapitools&#x2F;openapi-generator-cli&#x2F;4.0.0-SNAPSHOT&#x2F;openapi-generator-cli-4.0.0-20190506.150008-621.jar" rel="nofollow">https:&#x2F;&#x2F;oss.sonatype.org&#x2F;content&#x2F;repositories&#x2F;snapshots&#x2F;org&#x2F;...</a>)<p>2. Rename the JAR as &quot;openapi-generator-cli.jar&quot;<p>3. Run the following command to generate a F# Giraffe server stub for Petstore API (<a href="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" rel="nofollow">https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;OpenAPITools&#x2F;openapi-gener...</a>):<p>Mac&#x2F;Linux: - java -jar openapi-generator-cli.jar generate -g fsharp-giraffe-server -i <a href="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" rel="nofollow">https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;OpenAPITools&#x2F;openapi-gener...</a> -o &#x2F;var&#x2F;tmp&#x2F;fsharp-giraffe-petstore&#x2F;<p>Windows: - java -jar openapi-generator-cli.jar generate -g fsharp-giraffe-server -i <a href="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" rel="nofollow">https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;OpenAPITools&#x2F;openapi-gener...</a> -o C:\temp\fsharp-giraffe-petstore<p>I hope you will find the new generator useful.<p>A special thanks to Nick Fisher (founder of <a href="https:&#x2F;&#x2F;Lexico.IO" rel="nofollow">https:&#x2F;&#x2F;Lexico.IO</a>) who contributes the generator.<p>Thanks, William

暂无评论

暂无评论