Swagger/RAML(或任何类似的 REST API 规范)是否支持 REST 异步客户端回调?
Does Swagger/RAML (or any similar REST API spec) supports REST asynchronous client callbacks?
我想使用 REST 异步客户端回调,这意味着当响应准备好时,服务器会导致在客户端调用回调操作(请参阅 Jersey's 'Asynchronous Services and Clients' 了解我的意思)
我可以表达这个在Swagger/RAML/anything类似,并享受相关的server/client代码生成,文档生成等吗?你能指出相关的 examples/resources 吗?
OAS(以前的 Swagger)认为:
https://github.com/OAI/OpenAPI-Specification/issues/716
https://github.com/OAI/OpenAPI-Specification/issues/737
甚至合并 callback feature 并登陆 OAS 3.0.
但是我用的工具暂时好像不支持添加。
据我所知,这是 OAS 3.0 附带的。所以目前还没有支持该功能的工具
签出 Async API
引用自https://www.asyncapi.com/v1/guide/
AsyncAPI provides a specification that allows you to define Message-Driven APIs in a machine-readable format. It’s protocol-agnostic, so you can use it for APIs that work over MQTT, AMQP, WebSockets, STOMP, etc. The spec is very similar to OpenAPI/Swagger so, if you’re familiar with them, AsyncAPI should be easy for you.
回购:https://github.com/asyncapi/asyncapi
异步API支持
- 文档生成:https://www.asyncapi.com/v1/tooling/docgens.html
- 代码生成(Java、Node.js):https://www.asyncapi.com/v1/tooling/codegens.html
还有 Swagger 回调 功能 ( documentation for the callback feature. )
我想使用 REST 异步客户端回调,这意味着当响应准备好时,服务器会导致在客户端调用回调操作(请参阅 Jersey's 'Asynchronous Services and Clients' 了解我的意思)
我可以表达这个在Swagger/RAML/anything类似,并享受相关的server/client代码生成,文档生成等吗?你能指出相关的 examples/resources 吗?
OAS(以前的 Swagger)认为:
https://github.com/OAI/OpenAPI-Specification/issues/716
https://github.com/OAI/OpenAPI-Specification/issues/737
甚至合并 callback feature 并登陆 OAS 3.0.
但是我用的工具暂时好像不支持添加。
据我所知,这是 OAS 3.0 附带的。所以目前还没有支持该功能的工具
签出 Async API
引用自https://www.asyncapi.com/v1/guide/
AsyncAPI provides a specification that allows you to define Message-Driven APIs in a machine-readable format. It’s protocol-agnostic, so you can use it for APIs that work over MQTT, AMQP, WebSockets, STOMP, etc. The spec is very similar to OpenAPI/Swagger so, if you’re familiar with them, AsyncAPI should be easy for you.
回购:https://github.com/asyncapi/asyncapi
异步API支持
- 文档生成:https://www.asyncapi.com/v1/tooling/docgens.html
- 代码生成(Java、Node.js):https://www.asyncapi.com/v1/tooling/codegens.html
还有 Swagger 回调 功能 ( documentation for the callback feature. )