{"id":14986697,"url":"https://github.com/wechaty/openapi","last_synced_at":"2025-04-11T20:32:37.500Z","repository":{"id":47027210,"uuid":"334825942","full_name":"wechaty/openapi","owner":"wechaty","description":"Wechaty REST API Server with OpenAPI Specification (aka. Swagger)","archived":false,"fork":false,"pushed_at":"2022-01-28T20:30:21.000Z","size":844,"stargazers_count":22,"open_issues_count":13,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-31T07:51:35.325Z","etag":null,"topics":["grpc-gateway","openapi-specification","restful-api","swagger-docs","wechaty-puppet"],"latest_commit_sha":null,"homepage":"https://wechaty.js.org/docs/openapi/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wechaty.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-01T04:06:26.000Z","updated_at":"2024-05-17T16:51:37.000Z","dependencies_parsed_at":"2022-08-31T14:21:06.760Z","dependency_job_id":null,"html_url":"https://github.com/wechaty/openapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechaty%2Fopenapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechaty%2Fopenapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechaty%2Fopenapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wechaty%2Fopenapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wechaty","download_url":"https://codeload.github.com/wechaty/openapi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223479565,"owners_count":17151931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grpc-gateway","openapi-specification","restful-api","swagger-docs","wechaty-puppet"],"created_at":"2024-09-24T14:13:22.363Z","updated_at":"2024-11-07T08:03:26.257Z","avatar_url":"https://github.com/wechaty.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"docs/images/wechaty-openapi-logo.svg\" width=\"400\" /\u003e\n\u003cbr /\u003e\n\u003ch1\u003eWechaty Puppet OpenAPI Specification (OAS)\u003c/h1\u003e\n\u003cp\u003e\nWechaty REST API Server with OpenAPI Specification (Swagger)\n\u003c/p\u003e\n\u003ca href=\"https://github.com/wechaty/openapi/issues\n\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/wechaty/openapi?style=for-the-badge\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/wechaty/openapi/network/members\"\u003e\u003cimg src=\"https://img.shields.io/github/forks/wechaty/openapi?style=for-the-badge\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/wechaty/openapi/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/wechaty/openapi?style=for-the-badge\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/wechaty/openapi/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/wechaty/openapi?style=for-the-badge\" /\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003c/div\u003e\n\n\u003cdetails open=\"open\"\u003e\n\u003csummary\u003eTable of Contents\u003c/summary\u003e\n\u003col\u003e\n\u003cli\u003e\u003ca href=\"#About\"\u003eAbout\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#Motivation\"\u003eMotivation\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#Screenshots\"\u003eScreenshots\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#Features\"\u003eFeatures\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#Install\"\u003eInstall\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\n\u003ca href=\"#Usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"#1-Standalone-Server\"\u003eStandalone Server\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#2-Express-Router\"\u003eExpress Router\u003c/a\u003e\u003c/li\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cli\u003e\u003ca href=\"#Architecture\"\u003eArchitecture\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#Resources\"\u003eResources\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#Contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#Author\"\u003eAuthor\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"#Copyright--License\"\u003eCopyright \u0026 License\u003c/a\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\n## About\n\n**OpenAPI Specification** (formerly Swagger Specification) is an API description format for REST APIs. An OpenAPI file allows you to describe your entire API, including:\n\n- Available endpoints (`/users`) and operations on each endpoint (`GET /users`, `POST /users`)\n- Operation parameters Input and output for each operation\n- Authentication methods\n- Contact information, license, terms of use, and other information.\n\nAPI specifications can be written in YAML or JSON. The format is easy to learn and readable to both humans and machines. The complete OpenAPI Specification can be found on GitHub: [OpenAPI 3.0 Specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md)\n\n**NOTE:**\n\n\u003e This repo is working in the process.\n\u003e We hope we can finish an alpha version in April,\n\u003e and be ready to Beta in May!\n\n\u003e Issues \u0026 PRs are welcome, thank you very much for your attention.\n\n## Motivation\n\nWe have [OpenAPI](https://github.com/wechaty/openapi) for [Wechaty Puppet](https://github.com/wechaty/wechaty-puppet), and we want a RESTful API as well, so we built [OpenAPI Specification](https://www.openapis.org/) (OAS, former [Swagger](https://swagger.io/)) on top of gRPC, with the power of [gRPC OAS Gateway](https://github.com/grpc-ecosystem/grpc-gateway).\n\n## Screenshots\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"docs/images/swagger.jpg\" /\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003e [View Wechaty OpenAPI Specification on SwaggerHub](https://app.swaggerhub.com/apis/zixia/WechatyPuppet/)\n\n## Features\n\n1. A **Standalone HTTP Server** `wechaty-openapi-server`\n2. An **Express Router** for easy mounting to any existing **Express HTTP Server**.\n\n## Install\n\n```sh\nnpm install wechaty-openapi\n```\n\n## Usage\n\n#### 1. Standalone Server\n\n```sh\nexport WECHATY_PUPPET_SERVICE_TOKEN=__YOUR_TOKEN__\nwechaty-openapi-server \\\n  --mountpoint /api\n  --port 8080\n```\n\nThen visit \u003chttp://localhost:8080/api\u003e\n\n#### 2. Express Router\n\n\u003e TBW\n\n## Architecture\n\nThanks to the ecosystem of gRPC, we can generate OpenAPI Specification from our gRPC proto definitions automatically.\n\nWe are using [gRPC to JSON proxy generator following the gRPC HTTP spec](https://github.com/grpc-ecosystem/grpc-gateway) as the OpenAPI Specification generator ([protoc-gen-openapiv2](https://github.com/grpc-ecosystem/grpc-gateway/tree/master/protoc-gen-openapiv2)), and using [Like grpc-gateway, but written in node and dynamic](https://github.com/konsumer/grpc-dynamic-gateway) project to serve an HTTP RESTful API to gRPC proxy.\n\n\u003cdiv align=\"center\"\u003e\u003ca link=\"https://github.com/wechaty/openapi\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/wechaty/openapi/master/docs/images/grpc-gateway-architecture.svg\" width=\"400\" /\u003e\u003c/a\u003e\u003c/div\u003e\n\n\u003e Image credit: [gRPC Gateway](https://grpc-ecosystem.github.io/grpc-gateway/)\n\nLearn more about the RESTful API service for Wechaty from [Wechaty OpenAPI](https://github.com/wechaty/openapi).\n\nSee also: [AIP-4222 - Routing headers](https://google.aip.dev/client-libraries/4222)\n\n## Resources\n\nRead blogs with the `openapi` tag at https://wechaty.js.org/tags.html#openapi.\n\nCheck out [RESOURCES.md](RESOURCES.md) file for learning resources.\n\n## Contributing\n\nContributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\nSee [CONTRIBUTING.md](http://github.com/wechaty/openapi/blob/master/CONTRIBUTING.md) for more details.\n\n## Releases\n\nSince its creation in 2016, a number of Wechaty versions have been released. For more information about the release history and the current stable version, you can read the [Wechaty release notes](https://github.com/Wechaty/wechaty/releases) on Github.\n\n## Maintainer\n\nWechaty is maintained by [Huan](https://github.com/huan), [Rui](https://github.com/lijiarui), and a community of Open Source Contributors. We are always looking for people to join the Wechaty community to maintain the Wechaty codebase and documentation. You necessarily don't have to be a programmer to contribute to Wechaty. To get started contributing, you can read the [CONTRIBUTING.md](http://github.com/wechaty/openapi/blob/master/CONTRIBUTING.md).\n\n## Getting help\n\nWechaty has a community of very helpful contributors on different platforms you can join to get help from. Before joining any of the communities, we recommend that you read our Code of conduct]o that you adhere to our community guidelines. A full list of the different Wechaty communities can be accessed from the [Wechaty community](https://wechaty.js.org/docs/community/) section of this documentation.\n\n## Copyright \u0026 License\n\nWechaty is an [Open Source Project](https://opensource.com/resources/what-open-source). It is released under [Apache-2.0 license](https://github.com/wechaty/wechaty/blob/master/LICENSE) and the corresponding documentation is released under the [Creative Commons license](https://creativecommons.org/licenses/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwechaty%2Fopenapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwechaty%2Fopenapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwechaty%2Fopenapi/lists"}