简体   繁体   中英

How to auto-generate documents of rpc interface of nameko microservice?

I see some examples about nameko RESTful microservice + swagger which can generate amazing interface document. However, in my case, I only use RPC rather than HTTP. Is there any swagger-like library for documenting RPC interface?

Unfortunately currently there isn't swagger like tool for documenting Nameko's RPC interface.

As Nameko's RPC implementation is AMQP based, you will most likely control both Client and Server side in which case regular Python documentation tools like sphinx-doc are available for you.

If you'd like to expose API to external clients and share service definition with them you could take a look at Nameko's GRPC implementation https://github.com/nameko/nameko-grpc (and examples: https://github.com/nameko/nameko-examples-grpc ).

gRPC is based on Protocol Buffers service definitions which are effectively documenting you API interface and can be used to generate client libraries.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM