• 请不要在回答技术问题时复制粘贴 AI 生成的内容
marginleft
V2EX  ›  程序员

求一个 rest 风格 API 设计工具

  •  
  •   marginleft ·
    100apps · Oct 3, 2015 · 10389 views
    This topic created in 4076 days ago, the information mentioned may be changed or developed.

    前端和后端用 rest 风格 API 通信,同时开工。我们自己手写了一些死数据假 API ,前端调用,后端实现。有没有现成的 API 设计工具?可以方便配置生成接口,这样前端用这个假接口开发,后端按照这个死数据去实现,最好接口测试也自动生成。

    12 replies  •  2019-06-12 12:57:55 +08:00
    sparanoid
    sparanoid
    Oct 3, 2015 via iPhone❤️1
    2
    TomDu
    TomDu
    Oct 3, 2015
    3
    OData?
    onlyxuyang
    onlyxuyang
    Oct 3, 2015 via Android
    4
    @sparanoid 这个看起来很厉害的样子 有时间研究研究
    realityone
    realityone
    Oct 3, 2015 via iPhone
    6
    apiray
    hantsy
    hantsy
    Oct 3, 2015
    7
    @marginleft 基本上不可行。 SOAP 使用 Contract First 方式比较多,结果导致很多人不愿意用。这也是被 REST 替代的原因之一。

    Swagger 可以生成在线 REST API 测试( 2.0 方式也支持从 Contract First 方式先设计),我们一般都是如此,先后端开发,所以 API 都可以通过 Swagger UI 在线测试,你可以将 Swagger 中呈现的数据格式作为约定,供前端使用。

    敏捷的方式也不可能说数据格式完全在早期开始定下不变的。
    hantsy
    hantsy
    Oct 3, 2015
    8
    我的例子都是通过 Swagger UI 来可视化 REST API ,也就是 Code First 方式。
    https://github.com/hantsy/angularjs-springmvc-sample
    https://github.com/hantsy/angularjs-springmvc-sample-boot
    hydyy
    hydyy
    Oct 3, 2015
    9
    rap
    xujialiang
    xujialiang
    Oct 3, 2015
    10
    http://jsonapi.xujialiang.net 我自己实现的。。。。就是为了生成假数据用.在后台还未开发接口时,我自己先行写服务。
    fhefh
    fhefh
    Oct 3, 2015
    11
    mark ~~~ 3QS
    balabalaguguji
    balabalaguguji
    Jun 12, 2019
    12
    有专门写 api 文档的工具,easydoc.xyz
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   910 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 21:40 · PVG 05:40 · LAX 13:40 · JFK 16:40
    ♥ Do have faith in what you're doing.