openapi icon indicating copy to clipboard operation
openapi copied to clipboard

A puppet used to encapsulate OpenAPI.

Open atorber opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

Recently, I learned wechaty openapi, which is a very exciting feature. When I saw it, I was thinking about how to use it.

As a serious SDK dependency, I suggest that we encapsulate the API call method into a puppet, such as puppet-http or puppet-api, so that we can fully use Wechaty instances in another stateless service to call all the above APIs instead of a separate SDK.

Like this, when I want to call the API request GET /contacts, I will use const contactList = await bot.Contact.findAll() .

atorber avatar May 13 '22 08:05 atorber

Thanks for proposing this idea!

I suggest that we encapsulate the API call method into a puppet

Indeed I have the same idea, and I definitely agree with you: we should have a Puppet for OpenAPI.

such as puppet-http or puppet-api

How about wechaty-puppet-openapi? It's very clear and straightforward.

The Puppet implementation can use the Swagger OpenAPI generator; most code can be generated automatically.

huan avatar May 17 '22 03:05 huan