{"id":33916514,"url":"https://github.com/ydah/transducer","last_synced_at":"2026-01-13T22:05:26.296Z","repository":{"id":328168856,"uuid":"1114476678","full_name":"ydah/transducer","owner":"ydah","description":"Generate Markdown documentation from OpenAPI specifications.","archived":false,"fork":false,"pushed_at":"2025-12-11T12:52:22.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-12T14:51:13.696Z","etag":null,"topics":["documentation","openapi","openapi3","transducer"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/ydah.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2025-12-11T12:31:38.000Z","updated_at":"2025-12-11T23:22:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ydah/transducer","commit_stats":null,"previous_names":["ydah/transducer"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ydah/transducer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Ftransducer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Ftransducer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Ftransducer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Ftransducer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ydah","download_url":"https://codeload.github.com/ydah/transducer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ydah%2Ftransducer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["documentation","openapi","openapi3","transducer"],"created_at":"2025-12-12T07:22:34.008Z","updated_at":"2026-01-13T22:05:26.291Z","avatar_url":"https://github.com/ydah.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Transducer\n\nGenerate Markdown documentation from OpenAPI specifications.\n\nTransducer is a Ruby gem that reads OpenAPI YAML specifications (versions 3.0.x and 3.1.x) and generates well-formatted, readable Markdown documentation.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'transducer'\n```\n\nAnd then execute:\n\n```bash\n$ bundle install\n```\n\nOr install it yourself as:\n\n```bash\n$ gem install transducer\n```\n\n## Usage\n\n### Command Line\n\nGenerate Markdown documentation from an OpenAPI specification:\n\n```bash\n$ transducer generate input.yaml -o output.md\n```\n\nOptions:\n- `-o, --output`: Output file path (default: `docs/openapi.md`)\n- `-t, --template`: Custom ERB template file path\n\n#### Using Custom Templates\n\nYou can customize the output format using ERB templates:\n\n```bash\n$ transducer generate input.yaml --template=custom.md.erb --output=api.md\n```\n\nTemplate variables available:\n- `data`: Parsed OpenAPI specification hash\n- `formatter`: Formatter instance for formatting endpoints, parameters, schemas, etc.\n\nExample custom template:\n\n```erb\n# \u003c%= data['info']['title'] %\u003e\n\n\u003c% data['paths']\u0026.each do |path, methods| %\u003e\n  \u003c% methods.each do |method, details| %\u003e\n### \u003c%= method.upcase %\u003e \u003c%= path %\u003e\n\u003c%= formatter.format_endpoint(path, method, details) %\u003e\n  \u003c% end %\u003e\n\u003c% end %\u003e\n```\n\nDisplay version information:\n\n```bash\n$ transducer version\n```\n\nDisplay help:\n\n```bash\n$ transducer help\n$ transducer help generate\n```\n\n### Programmatic Usage\n\nYou can also use Transducer programmatically in your Ruby code:\n\n```ruby\nrequire 'transducer'\n\n# Parse OpenAPI specification\nparser = Transducer::Parser.new('path/to/openapi.yaml')\ndata = parser.parse\n\n# Generate Markdown with default template\ngenerator = Transducer::Generator.new(data)\nmarkdown = generator.generate\n\n# Or use a custom template\ngenerator = Transducer::Generator.new(data, template_path: 'custom.md.erb')\nmarkdown = generator.generate\n\n# Write to file\ngenerator.to_file('output.md')\n```\n\n## Output Format\n\nThe generated Markdown documentation includes:\n\n- API Title and Description: From the `info` section\n- Version and Base URL: API version and server URL\n- Table of Contents: Automatically generated with links to all sections\n- Endpoints: All API endpoints with:\n  - HTTP method and path\n  - Description\n  - Parameters (path, query, header)\n  - Request body schema and examples\n  - Response codes with schemas and examples\n- Schemas: Component schemas with:\n  - Type information\n  - Property descriptions\n  - Required fields\n  - Examples\n\n### Example Output\n\n```markdown\n# Simple API\n\nA simple API for testing\n\n| | |\n|---|---|\n| Version | 1.0.0 |\n| Base URL | https://api.example.com/v1 |\n\n## Table of Contents\n\n- [Endpoints](#endpoints)\n  - [GET /users](#get-users)\n  - [POST /users](#post-users)\n- [Schemas](#schemas)\n  - [User](#user)\n\n## Endpoints\n\n### GET /users\n\nReturns a list of all users\n\n**Parameters**:\n\n| Name | Location | Type | Required | Description |\n|------|----------|------|----------|-------------|\n| limit | query | integer | No | Maximum number of users to return |\n\n**Responses**:\n\n#### 200 OK\n\nSuccessful response\n...\n```\n\n## Supported OpenAPI Versions\n\n- OpenAPI 3.0.x\n- OpenAPI 3.1.x\n\nOpenAPI 2.0 (Swagger) is not currently supported.\n\n## Development\n\nAfter checking out the repo, run `bundle install` to install dependencies.\n\nRun tests:\n\n```bash\n$ bundle exec rspec\n```\n\nRun RuboCop:\n\n```bash\n$ bundle exec rubocop\n```\n\nRun all checks (tests + RuboCop):\n\n```bash\n$ bundle exec rake\n```\n\nTo install this gem onto your local machine:\n\n```bash\n$ bundle exec rake install\n```\n\nTo release a new version:\n\n1. Update the version number in `lib/transducer/version.rb`\n2. Update `CHANGELOG.md`\n3. Run `bundle exec rake release`\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ydah/transducer.\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydah%2Ftransducer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fydah%2Ftransducer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fydah%2Ftransducer/lists"}