{"id":25453166,"url":"https://github.com/nlopes/avro-schema-registry","last_synced_at":"2025-10-17T02:59:17.264Z","repository":{"id":36147325,"uuid":"164600535","full_name":"nlopes/avro-schema-registry","owner":"nlopes","description":"Avro Schema Registry (mostly) compatible with salsify/avro-schema-registry","archived":false,"fork":false,"pushed_at":"2024-10-21T15:16:04.000Z","size":1259,"stargazers_count":17,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-22T01:51:22.893Z","etag":null,"topics":["avro","avro-schema","avro-schema-registry","registry","rust-lang"],"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/nlopes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2019-01-08T08:24:58.000Z","updated_at":"2024-10-21T15:16:02.000Z","dependencies_parsed_at":"2023-10-10T19:05:55.852Z","dependency_job_id":"fd7df3e5-43a0-4931-9691-b5f41023c03e","html_url":"https://github.com/nlopes/avro-schema-registry","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlopes%2Favro-schema-registry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlopes%2Favro-schema-registry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlopes%2Favro-schema-registry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlopes%2Favro-schema-registry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nlopes","download_url":"https://codeload.github.com/nlopes/avro-schema-registry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239384733,"owners_count":19629509,"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":["avro","avro-schema","avro-schema-registry","registry","rust-lang"],"created_at":"2025-02-17T23:49:29.664Z","updated_at":"2025-10-17T02:59:12.225Z","avatar_url":"https://github.com/nlopes.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Avro Schema Registry\n\n[![Rust](https://github.com/nlopes/avro-schema-registry/actions/workflows/ci.yml/badge.svg)](https://github.com/nlopes/avro-schema-registry/actions/workflows/ci.yml)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nlopes/avro-schema-registry/blob/master/LICENSE)\n\n**DO NOT USE IN PRODUCTION**\n\nThis is an implementation of the Confluent Schema Registry API (mostly) compatible with\nthe Rails implementation by\n[salsify/avro-schema-registry](https://github.com/salsify/avro-schema-registry).\n\nI kept the database schema used by `salsify` and my main goal was to replace the Rails\nservice with this one. There's nothing wrong with theirs, I just happen to enjoy Rust more\nthan Ruby. All thanks should go to `salsify` for their initial design and ideas on using\nPostgreSQL instead of Kafka as a backend.\n\nNote: the backend used is PostgreSQL (schema compatible with salsify/avro-schema-registry\nPostgreSQL schema). The Confluent Schema Registry uses Kafka as a backend therefore we\ndon't provide exactly the same semantics (but close enough).\n\n## Fingerprint\n\nIn [salsify/avro-schema-registry](https://github.com/salsify/avro-schema-registry) two\nfingerprints are present (v1 and v2). In this implementation, we only make use of v2 and\ndo NOT support v1.\n\nIf you are still using fingerprints with v1, please make sure you migrate first, before\nusing this service as your API.\n\n## Endpoints\n\n| Endpoint | Method | Maturity |\n|---|---|---|\n| `/compatibility/subjects/{subject}/versions/{version}` | POST | Ready (NONE, BACKWARD, FORWARD, FULL); Unimplemented (TRANSITIVE) |\n| `/config` | GET | Ready |\n| `/config` | PUT | Ready |\n| `/config/{subject}` | GET | Ready |\n| `/config/{subject}` | PUT | Ready |\n| `/schemas/ids/{id}`| GET | Ready |\n| `/subjects` | GET | Ready |\n| `/subjects/{subject}` | DELETE | Ready |\n| `/subjects/{subject}` | POST | Ready |\n| `/subjects/{subject}/versions` | GET | Ready |\n| `/subjects/{subject}/versions` | POST | Ready |\n| `/subjects/{subject}/versions/latest` | DELETE | Ready |\n| `/subjects/{subject}/versions/latest` | GET | Ready |\n| `/subjects/{subject}/versions/{version}` | DELETE | Ready |\n| `/subjects/{subject}/versions/{version}` | GET | Ready |\n| `/subjects/{subject}/versions/latest/schema` | GET | Ready |\n| `/subjects/{subject}/versions/{version}/schema` | GET | Ready |\n\n## Extra Endpoints\n\n| Endpoint | Method | Maturity |\n|---|---|---|\n| `/_/health_check` | GET | Incomplete |\n| `/_/metrics` | GET | Ready |\n\n\n## Build\n\n```\ncargo build --release\n```\n\n## Run\n\nThis assumes you have a running PostgreSQL instance (versions 9.5 and above) and\nyou've run the diesel setup (with its migrations).\n\n1) Setup env (everything is controlled through environment variables)\n```\nexport SENTRY_URL=\"http://sentry-url/id\" \\ # optional\n    DEFAULT_HOST=127.0.0.1:8080 \\ # optional (default is 127.0.0.1:8080)\n    DATABASE_URL=postgres://postgres:@localhost:5432/diesel_testing \\\n    SCHEMA_REGISTRY_PASSWORD=silly_password\n```\n\n2) Run application\n```\n# If you haven't set PORT, it listens on the default 8080\ncargo run # or the binary after running `cargo build`\n```\n\n3) Make a request\n```\n# If you assume the credentials above:\ncurl -v -H 'Authorization: Basic OnNpbGx5X3Bhc3N3b3Jk' -H 'Accept: application/json' http://127.0.0.1:8080/config\n```\n\n## Tests\n\n### Unit\n\n```\ncargo test middleware\n```\n\n### Integration\n\n1) Setup testing environment variables\n```\nexport RUST_TEST_THREADS=1 \\\n    DATABASE_URL=postgres://postgres:@localhost:5432/diesel_testing \\\n    SCHEMA_REGISTRY_PASSWORD=silly_password\n```\n\n2) Run test suite\n```\ncargo test speculate\n```\n\n## Important\n\nWe don't ever return `Error code 50003 -- Error while forwarding the request to the\nmaster`. This is because this error is specific to Kafka.\n\n## Contributing\n\nYou are more than welcome to contribute to this project. Fork and make a Pull Request, or\ncreate an Issue if you see any problem.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlopes%2Favro-schema-registry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnlopes%2Favro-schema-registry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlopes%2Favro-schema-registry/lists"}