良好的代码生成和文档编制工具 [英] Good rest code generation and documentation tool

查看:120
本文介绍了良好的代码生成和文档编制工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在考虑使用一种文档工具来构建Web服务的后端,以便与OAuth和多个修订版本一起在多个客户端中使用.我已经知道了养蜂场,但做了一些研究后发现我发现了其他相当不错的解决方案具有可观的承诺.

I have been considering a documentation tool for building a backend for a web service to be used in multiple clients along with OAuth and possibility of multiple revisions. I already knew about apiary but doing a little research I found other considerably good solutions with lucrative promises.

RAML似乎有望带来良好的代码生成和api可重用性.但是它似乎无法创建模拟服务器.而且我不明白为什么不能使用apiblueprint为REST API生成客户端库和服务器端框架.

RAML seems to be promising good code generation and api reusability. But it doesn't seem to be capable of creating a mock server. And I can't understand why apiblueprint can't be used to generate client side libs and server side skeletons for REST API.

对我们来说,最好的用例是在api的文档上,可以自动生成用于消费该服务的客户端iOS/Android/wp/js库,以及可以提供编写代码框架的节点express/restify应用.以及api测试和负载测试.

The best use case for us will be upon documentation of the api, client iOS/Android/wp/js library for consuming the service can be auto generated along with an node express/restify app which provides skeleton to write code. Along with api tests and load tests.

哪种方法最适合RAML/Swagger/Apiary?

Which solution out of RAML/Swagger/Apiary fits the best for this?

推荐答案

请查看 Swagger Codegen (免费,开放源代码),它可以使用不同的语言生成服务器存根和API客户端.

Please check out Swagger Codegen (free, open-source), which can generate both server stubs and API clients in different languages.

许多公司/项目正在生产中使用它: https ://github.com/swagger-api/swagger-codegen#companiesprojects-using-swagger-codegen

Many companies/projects are using it in production: https://github.com/swagger-api/swagger-codegen#companiesprojects-using-swagger-codegen

支持的语言/框架:

API客户端:ActionScript,Bash,C#(.net 2.0、4.0或更高版本),C ++(cpprest,Qt5,Tizen),Clojure,Dart,Elixir,Go,Groovy,Haskell,Java (Jersey1.x,Jersey2.x,OkHttp,Retrofit1.x,Retrofit2.x,Feign),Node.js(带有Google Closure编译器注释的ES5,ES6,AngularJS)Objective-C,Perl,PHP,Python,Ruby,Scala ,Swift(2.x,3.x),Typescript(Angular1.x,Angular2.x,Fetch,jQuery,Node)

API clients: ActionScript, Bash, C# (.net 2.0, 4.0 or later), C++ (cpprest, Qt5, Tizen), Clojure, Dart, Elixir, Go, Groovy, Haskell, Java (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign), Node.js (ES5, ES6, AngularJS with Google Closure Compiler annotations) Objective-C, Perl, PHP, Python, Ruby, Scala, Swift (2.x, 3.x), Typescript (Angular1.x, Angular2.x, Fetch, jQuery, Node)

服务器存根:C#(ASP.NET Core,NancyFx),Erlang,Go,Haskell,Java(MSF4J,Spring,Undertow,JAX-RS:CDI,CXF,Inflector,RestEasy), PHP(流明,Slim,Silex,Zend Expressive),Python(Flask),NodeJS,Ruby(Sinatra,Rails5),Scala(Finch,Scalatra)

Server stubs: C# (ASP.NET Core, NancyFx), Erlang, Go, Haskell, Java (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, RestEasy), PHP (Lumen, Slim, Silex, Zend Expressive), Python (Flask), NodeJS, Ruby (Sinatra, Rails5), Scala (Finch, Scalatra)

API文档生成器:HTML,Confluence Wiki

API documentation generators: HTML, Confluence Wiki

免责声明:我是开源项目的主要贡献者之一.

Disclaimer: I'm one of the top contributors to the open-source project.

更新:2018年5月,大约50位Swagger Codegen的主要贡献者和模板创建者决定派遣Swagger Codegen来维护名为问与答了解更多信息

UPDATE: On May 2018, about 50 top contributors and template creators of Swagger Codegen decided to fork Swagger Codegen to maintain a community-driven version called OpenAPI Generator. Please refer to the Q&A for more information.

这篇关于良好的代码生成和文档编制工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆