{"id":17086424,"url":"https://github.com/dasch/sinatra-avro","last_synced_at":"2026-05-05T03:31:35.431Z","repository":{"id":27950938,"uuid":"31443645","full_name":"dasch/sinatra-avro","owner":"dasch","description":"A Sinatra plugin that allows encoding requests and responses using Avro","archived":false,"fork":false,"pushed_at":"2015-06-15T10:56:30.000Z","size":180,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-24T18:11:04.956Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dasch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-27T23:24:20.000Z","updated_at":"2015-03-09T17:41:10.000Z","dependencies_parsed_at":"2022-09-04T09:10:48.843Z","dependency_job_id":null,"html_url":"https://github.com/dasch/sinatra-avro","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasch%2Fsinatra-avro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasch%2Fsinatra-avro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasch%2Fsinatra-avro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasch%2Fsinatra-avro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dasch","download_url":"https://codeload.github.com/dasch/sinatra-avro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245115408,"owners_count":20563158,"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":[],"created_at":"2024-10-14T13:28:36.599Z","updated_at":"2026-05-05T03:31:30.413Z","avatar_url":"https://github.com/dasch.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sinatra::Avro\n\nA Sinatra plugin that allows encoding requests and responses using Apache Avro.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'sinatra-avro'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install sinatra-avro\n\n## Usage\n\nAdd an Avro schema to e.g. `schemas/person.avsc`:\n\n```json\n{\n  \"name\": \"person\",\n  \"type\": \"record\",\n  \"fields\": [\n    { \"name\": \"name\", \"type\": \"string\" },\n    { \"name\": \"age\", \"type\": \"long\" }\n  ]\n}\n```\n\nYou can now respond with Avro encoded data:\n\n```ruby\nget '/' do\n  # Will use the schema defined by `./schemas/person.avsc`.\n  avro({ \"name\" =\u003e \"Jane\", \"age\" =\u003e 42 }, schema_name: \"person\")\nend\n```\n\nYou can configure which directory to look up schema files from using\n\n```ruby\nset :avro_schema_dir, \"some/other/dir\"\n```\n\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/sinatra-avro/fork )\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 a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdasch%2Fsinatra-avro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdasch%2Fsinatra-avro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdasch%2Fsinatra-avro/lists"}