{"id":19924389,"url":"https://github.com/adriangs1996/morty","last_synced_at":"2026-04-13T09:31:24.379Z","repository":{"id":260760698,"uuid":"882267254","full_name":"adriangs1996/morty","owner":"adriangs1996","description":"A framework for creating API endpoints based on dry.rb fully compatible with rails","archived":false,"fork":false,"pushed_at":"2025-04-20T08:38:07.000Z","size":3017,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T10:17:50.793Z","etag":null,"topics":["api","dependency-injection","dsl","grape-api","rails","rails-api","ruby"],"latest_commit_sha":null,"homepage":"https://adriangs1996.github.io/morty/","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/adriangs1996.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2024-11-02T11:03:31.000Z","updated_at":"2025-04-20T08:38:11.000Z","dependencies_parsed_at":"2025-03-09T12:22:52.864Z","dependency_job_id":"62c6571e-42f4-4e51-b125-88e4724a6c7f","html_url":"https://github.com/adriangs1996/morty","commit_stats":null,"previous_names":["adriangs1996/morty"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adriangs1996/morty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriangs1996%2Fmorty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriangs1996%2Fmorty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriangs1996%2Fmorty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriangs1996%2Fmorty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adriangs1996","download_url":"https://codeload.github.com/adriangs1996/morty/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriangs1996%2Fmorty/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31746291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["api","dependency-injection","dsl","grape-api","rails","rails-api","ruby"],"created_at":"2024-11-12T22:17:16.504Z","updated_at":"2026-04-13T09:31:24.373Z","avatar_url":"https://github.com/adriangs1996.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mortymer\n\n```markdown\n███╗   ███╗ ██████╗ ██████╗ ████████╗██╗   ██╗███╗   ███╗███████╗██████╗ \n████╗ ████║██╔═══██╗██╔══██╗╚══██╔══╝╚██╗ ██╔╝████╗ ████║██╔════╝██╔══██╗\n██╔████╔██║██║   ██║██████╔╝   ██║    ╚████╔╝ ██╔████╔██║█████╗  ██████╔╝\n██║╚██╔╝██║██║   ██║██╔══██╗   ██║     ╚██╔╝  ██║╚██╔╝██║██╔══╝  ██╔══██╗\n██║ ╚═╝ ██║╚██████╔╝██║  ██║   ██║      ██║   ██║ ╚═╝ ██║███████╗██║  ██║\n```\n\nMortymer is a Ruby gem that simplifies API endpoint management and documentation for Ruby on Rails applications. It provides a clean DSL for defining API endpoints with input/output contracts and automatically generates OpenAPI documentation. It provides a really convenient way to handle\ndependency Injection in Ruby, with an explicit approach but a really easy setup. No complex container initialization or registration (although \nit is supported). Fully compatible with ruby constructors. \n\n[![Gem Version](https://badge.fury.io/rb/morty.svg)](https://badge.fury.io/rb/morty)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## !IMPORTANT\n\nThis gem is going under rapid development and as new features are added it might brake\ncompatibility from one version to another. I plan to give a stable release with version\n0.1.0 and from there, follow semantic versioning.\n\n## Features\n\n- 🚀 Simple DSL for defining API endpoints\n- 📝 Automatic OpenAPI documentation generation\n- ✨ Input/Output contract validation\n- 🎯 Dependency injection support\n- 🛣️ Seamless Rails integration\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'mortymer'\n```\n\nAnd then execute:\n\n```bash\nbundle install\n```\n\n## Usage\n\n### Basic Example\n\n```ruby\nclass UserProfileEndpoint \u003c ApplicationController\n  include Mortymer::ApiMetadata\n\n  # Define an endpoint with input/output contracts\n  get input: UserProfileInput, output: UserProfileOutput, path: '/api/v1/users/:id/profile'\n  def call(input)\n    user = User.find(input.id)\n    UserProfileOutput.new(\n      id: user.id,\n      name: user.name,\n      email: user.email\n    )\n  end\nend\n```\n\n### Input/Output Contracts\n\n```ruby\nclass UserProfileInput \u003c Mortymer::Model\n  attribute :id, Types::Integer\n  attribute :include_details, Types::Bool.optional.default(false)\nend\n\nclass UserProfileOutput \u003c Mortymer::Model\n  attribute :id, Types::Integer\n  attribute :name, Types::String\n  attribute :email, Types::String\nend\n```\n\n### Dependency Injection\n\n```ruby\nclass UserService\n  include Mortymer::DependenciesDsl\n\n  # Inject dependencies\n  inject UserRepository\n  inject EmailService, as: :mailer\n\n  def process_user(id)\n    user = @user_repository.find_user(id)\n    @email_service.send_email(user.email, \"Welcome!\")\n  end\nend\n```\n\n### Rails Integration\n\nIn your `config/routes.rb`:\n\n```ruby\nRails.application.routes.draw do\n  Mortymer::Rails::Routes.new(self).mount_controllers\nend\n```\n\n## OpenAPI Documentation\n\nMortymer automatically generates OpenAPI documentation for your API endpoints. The documentation includes:\n\n- Endpoint paths and HTTP methods\n- Request/response schemas\n- Input validation rules\n- Error responses\n\nTo generate the OpenAPI documentation:\n\n```ruby\ngenerator = Mortymer::OpenapiGenerator.new(\n  prefix: \"/api\",\n  title: \"My API\",\n  version: \"v1\"\n)\ngenerator.generate\n```\n\n## Contributing\n\nWe love your input! We want to make contributing to Mortymer as easy and transparent as possible, whether it's:\n\n- Reporting a bug\n- Discussing the current state of the code\n- Submitting a fix\n- Proposing new features\n- Becoming a maintainer\n\n### Development Process\n\n1. Fork the repo and create your branch from `master`\n2. If you've added code, please, add some tests to contribute to gem health\n3. If you've changed APIs, update the documentation accordingly\n4. Ensure the test suite passes\n5. Make sure your code lints\n6. Issue that pull request!\n\n### Running Tests\n\n```bash\nbundle install\nbundle exec rspec\n```\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n\n## Code of Conduct\n\nThis project follows the [Contributor Covenant](https://www.contributor-covenant.org/version/2/0/code_of_conduct/) Code of Conduct.\n\n## Support\n\nIf you have any questions or need help with Mortymer:\n\n- Open an [issue](https://github.com/yourusername/mortymer/issues)\n- Join our [Discord community](#) (coming soon)\n\n## Credits\n\nMortymer is maintained by [Adrian Gonzalez] and was inspired by the need for a simple,\nyet powerful API management solution in the Ruby ecosystem, that integrates well\nwith existing frameworks. We deserve a FastAPI experience within the ruby side.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadriangs1996%2Fmorty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadriangs1996%2Fmorty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadriangs1996%2Fmorty/lists"}