{"id":50639137,"url":"https://github.com/nu11ptr/connect2axum","last_synced_at":"2026-06-07T06:31:33.552Z","repository":{"id":355950938,"uuid":"1230380245","full_name":"nu11ptr/connect2axum","owner":"nu11ptr","description":"Generate REST/OpenAPI endpoint wrappers over ConnectRPC endpoints","archived":false,"fork":false,"pushed_at":"2026-05-06T01:56:20.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-06T02:22:56.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nu11ptr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-06T00:11:18.000Z","updated_at":"2026-05-06T01:56:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nu11ptr/connect2axum","commit_stats":null,"previous_names":["nu11ptr/connect2axum"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/nu11ptr/connect2axum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fconnect2axum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fconnect2axum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fconnect2axum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fconnect2axum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nu11ptr","download_url":"https://codeload.github.com/nu11ptr/connect2axum/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nu11ptr%2Fconnect2axum/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34011812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-06-07T06:31:32.848Z","updated_at":"2026-06-07T06:31:33.544Z","avatar_url":"https://github.com/nu11ptr.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# connect2axum [![Crate](https://img.shields.io/crates/v/connect2axum)](https://crates.io/crates/connect2axum) [![Docs](https://docs.rs/connect2axum/badge.svg)](https://docs.rs/connect2axum) [![Build](https://github.com/nu11ptr/connect2axum/workflows/CI/badge.svg)](https://github.com/nu11ptr/connect2axum/actions) [![License](https://img.shields.io/crates/l/connect2axum)](https://github.com/nu11ptr/connect2axum/blob/main/LICENSE)\n\nGenerate REST and/or WebSocket endpoint wrappers over ConnectRPC services.\nAdditionally, generate OpenAPI docs for REST endpoints and AsyncAPI docs for\nWebSocket endpoints.\n\n## Install\n\n```sh\ncargo install --locked connect2axum-codegen\n```\n\nThis installs:\n\n- `protoc-gen-connect2rest`\n- `protoc-gen-connect2ws`\n- `protoc-gen-connect2openapi`\n- `protoc-gen-connect2asyncapi`\n\n## Plugin Options\n\nOptions are passed as comma-separated `name=value` pairs in `buf.gen.yaml`.\n\n```yaml\nplugins:\n  - local: protoc-gen-connect2rest\n    out: src/generated/connect2axum\n    opt:\n      - buffa_module=crate::proto\n      - connect_module=crate::connect\n  - local: protoc-gen-connect2ws\n    out: src/generated/connect2axum\n    opt:\n      - buffa_module=crate::proto\n      - connect_module=crate::connect\n  - local: protoc-gen-connect2openapi\n    out: src/generated/openapi\n    strategy: all\n    opt:\n      - config=connect2openapi.yaml\n  - local: protoc-gen-connect2asyncapi\n    out: src/generated/asyncapi\n    strategy: all\n    opt:\n      - config=connect2asyncapi.yaml\n```\n\n### Active Options\n\n| Option | Default | Used By | Purpose |\n| --- | --- | --- | --- |\n| `buffa_module` | `crate::proto` | REST, WS | Rust module root where Buffa generated messages are available. |\n| `connect_module` | `crate::connect` | REST, WS | Rust module root where Connect Rust generated service traits are available. |\n| `runtime_module` | `::connect2axum` | REST, WS | Rust path to the runtime helper crate/module. |\n| `streaming_content_type` | `application/x-ndjson` | REST | REST streaming response content type. |\n| `suppress_pkg_prefix` | `true` | OpenAPI, AsyncAPI | Omit protobuf package prefixes from document component names and references. |\n| `value_suffix` | `__` | REST, WS | Suffix for generated local bindings to avoid collisions with request fields. |\n| `type_suffix` | `__` | REST | Suffix for generated DTO type names. |\n| `body_message_suffix` | `Body` | REST | Suffix for generated body DTOs. |\n| `query_message_suffix` | `Query` | REST | Suffix for generated query DTOs. |\n\n### OpenAPI Generator\n\n`protoc-gen-connect2openapi` wraps grpc-gateway's\n`protoc-gen-openapiv3`, then patches the generated document for connect2axum\nREST behavior. It supports `output`, `config`, `openapiv3_bin`,\n`openapiv3_opt`, `streaming_content_type`, and `suppress_pkg_prefix` plugin\noptions.\n\nSee [docs/openapi-generator.md](docs/openapi-generator.md) for config format\nand backend details.\n\n### AsyncAPI Generator\n\n`protoc-gen-connect2asyncapi` emits AsyncAPI v3.1 JSON for the JSON WebSocket\nroutes generated by `protoc-gen-connect2ws`. It supports `output`, `config`,\n`server_url`, `default_content_type`, and `suppress_pkg_prefix` plugin options.\n\nSee [docs/asyncapi-generator.md](docs/asyncapi-generator.md) for document shape\nand config details.\n\n### WebSocket Notes\n\n`protoc-gen-connect2ws` only generates JSON WebSocket routes for streaming RPCs.\nUnary RPCs stay REST/Connect-only. Client and bidirectional request streams end\nwith an empty text frame so the socket can remain open for any response frames.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnu11ptr%2Fconnect2axum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnu11ptr%2Fconnect2axum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnu11ptr%2Fconnect2axum/lists"}