{"id":13451776,"url":"https://github.com/confluentinc/schema-registry","last_synced_at":"2025-05-13T21:04:56.672Z","repository":{"id":24390796,"uuid":"27790789","full_name":"confluentinc/schema-registry","owner":"confluentinc","description":"Confluent Schema Registry for Kafka","archived":false,"fork":false,"pushed_at":"2025-05-12T17:15:12.000Z","size":166167,"stargazers_count":2293,"open_issues_count":354,"forks_count":1131,"subscribers_count":392,"default_branch":"master","last_synced_at":"2025-05-12T17:32:55.080Z","etag":null,"topics":["avro","avro-schema","confluent","json","json-schema","kafka","protobuf","protobuf-schema","rest-api","schema","schema-registry","schemas"],"latest_commit_sha":null,"homepage":"https://docs.confluent.io/current/schema-registry/docs/index.html","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/confluentinc.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-12-09T22:38:11.000Z","updated_at":"2025-05-12T16:21:04.000Z","dependencies_parsed_at":"2023-10-04T21:39:12.328Z","dependency_job_id":"f7e9b5d8-de39-4aa8-a793-c27507080e7c","html_url":"https://github.com/confluentinc/schema-registry","commit_stats":{"total_commits":3073,"total_committers":247,"mean_commits":"12.441295546558704","dds":0.7796941099902376,"last_synced_commit":"9e7ab57e7f1d5664bc08f42ad9678c5b68a769d8"},"previous_names":[],"tags_count":21336,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/confluentinc%2Fschema-registry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/confluentinc%2Fschema-registry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/confluentinc%2Fschema-registry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/confluentinc%2Fschema-registry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/confluentinc","download_url":"https://codeload.github.com/confluentinc/schema-registry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254028508,"owners_count":22002273,"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","confluent","json","json-schema","kafka","protobuf","protobuf-schema","rest-api","schema","schema-registry","schemas"],"created_at":"2024-07-31T07:01:02.129Z","updated_at":"2025-05-13T21:04:51.664Z","avatar_url":"https://github.com/confluentinc.png","language":"Java","readme":"Schema Registry\n================\n\nConfluent Schema Registry provides a serving layer for your metadata. It provides a RESTful interface for storing and retrieving your Avro®, JSON Schema, and Protobuf schemas. It stores a versioned history of all schemas based on a specified subject name strategy, provides multiple compatibility settings and allows evolution of schemas according to the configured compatibility settings and expanded support for these schema types. It provides serializers that plug into Apache Kafka® clients that handle schema storage and retrieval for Kafka messages that are sent in any of the supported formats.\n\nThis README includes the following sections:\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\u003c!-- generated with [DocToc](https://github.com/thlorenz/doctoc), see the link for install and instructions for use --\u003e\n\n- [Documentation](#documentation)\n- [Quickstart API Usage examples](#quickstart-api-usage-examples)\n- [Installation](#installation)\n- [Deployment](#deployment)\n- [Development](#development)\n- [OpenAPI Spec](#openapi-spec)\n- [Contribute](#contribute)\n- [License](#license)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\nDocumentation\n-------------\n\nHere are a few links to Schema Registry pages in the Confluent Documentation.\n\n- [Installing and Configuring Schema Registry](https://docs.confluent.io/current/schema-registry/installation/index.html)\n- [Schema Management overview](https://docs.confluent.io/current/schema-registry/index.html)\n- [Schema Registry Tutorial](https://docs.confluent.io/current/schema-registry/schema_registry_tutorial.html)\n- [Schema Registry API reference](https://docs.confluent.io/current/schema-registry/develop/api.html)\n- [Serializers, Deserializers for supported schema types](https://docs.confluent.io/current/schema-registry/serializer-formatter.html)\n- [Kafka Clients](https://docs.confluent.io/current/clients/index.html#kafka-clients)\n- [Schema Registry on Confluent Cloud](https://docs.confluent.io/current/quickstart/cloud-quickstart/schema-registry.html)\n\nQuickstart API Usage examples\n-----------------------------\n\nThe following assumes you have Kafka and an [instance of the Schema Registry](https://docs.confluent.io/current/schema-registry/installation/index.html)\nrunning using the default settings. These examples, and more, are also available at [API Usage examples](https://docs.confluent.io/current/schema-registry/using.html) on [docs.confluent.io](https://docs.confluent.io/current/).\n\n```bash\n# Register a new version of a schema under the subject \"Kafka-key\"\n$ curl -X POST -H \"Content-Type: application/vnd.schemaregistry.v1+json\" \\\n    --data '{\"schema\": \"{\\\"type\\\": \\\"string\\\"}\"}' \\\n    http://localhost:8081/subjects/Kafka-key/versions\n  {\"id\":1}\n\n# Register a new version of a schema under the subject \"Kafka-value\"\n$ curl -X POST -H \"Content-Type: application/vnd.schemaregistry.v1+json\" \\\n    --data '{\"schema\": \"{\\\"type\\\": \\\"string\\\"}\"}' \\\n     http://localhost:8081/subjects/Kafka-value/versions\n  {\"id\":1}\n\n# List all subjects\n$ curl -X GET http://localhost:8081/subjects\n  [\"Kafka-value\",\"Kafka-key\"]\n\n# List all schema versions registered under the subject \"Kafka-value\"\n$ curl -X GET http://localhost:8081/subjects/Kafka-value/versions\n  [1]\n\n# Fetch a schema by globally unique id 1\n$ curl -X GET http://localhost:8081/schemas/ids/1\n  {\"schema\":\"\\\"string\\\"\"}\n\n# Fetch version 1 of the schema registered under subject \"Kafka-value\"\n$ curl -X GET http://localhost:8081/subjects/Kafka-value/versions/1\n  {\"subject\":\"Kafka-value\",\"version\":1,\"id\":1,\"schema\":\"\\\"string\\\"\"}\n\n# Fetch the most recently registered schema under subject \"Kafka-value\"\n$ curl -X GET http://localhost:8081/subjects/Kafka-value/versions/latest\n  {\"subject\":\"Kafka-value\",\"version\":1,\"id\":1,\"schema\":\"\\\"string\\\"\"}\n\n# Delete version 3 of the schema registered under subject \"Kafka-value\"\n$ curl -X DELETE http://localhost:8081/subjects/Kafka-value/versions/3\n  3\n\n# Delete all versions of the schema registered under subject \"Kafka-value\"\n$ curl -X DELETE http://localhost:8081/subjects/Kafka-value\n  [1, 2, 3, 4, 5]\n\n# Check whether a schema has been registered under subject \"Kafka-key\"\n$ curl -X POST -H \"Content-Type: application/vnd.schemaregistry.v1+json\" \\\n    --data '{\"schema\": \"{\\\"type\\\": \\\"string\\\"}\"}' \\\n    http://localhost:8081/subjects/Kafka-key\n  {\"subject\":\"Kafka-key\",\"version\":1,\"id\":1,\"schema\":\"\\\"string\\\"\"}\n\n# Test compatibility of a schema with the latest schema under subject \"Kafka-value\"\n$ curl -X POST -H \"Content-Type: application/vnd.schemaregistry.v1+json\" \\\n    --data '{\"schema\": \"{\\\"type\\\": \\\"string\\\"}\"}' \\\n    http://localhost:8081/compatibility/subjects/Kafka-value/versions/latest\n  {\"is_compatible\":true}\n\n# Get top level config\n$ curl -X GET http://localhost:8081/config\n  {\"compatibilityLevel\":\"BACKWARD\"}\n\n# Update compatibility requirements globally\n$ curl -X PUT -H \"Content-Type: application/vnd.schemaregistry.v1+json\" \\\n    --data '{\"compatibility\": \"NONE\"}' \\\n    http://localhost:8081/config\n  {\"compatibility\":\"NONE\"}\n\n# Update compatibility requirements under the subject \"Kafka-value\"\n$ curl -X PUT -H \"Content-Type: application/vnd.schemaregistry.v1+json\" \\\n    --data '{\"compatibility\": \"BACKWARD\"}' \\\n    http://localhost:8081/config/Kafka-value\n  {\"compatibility\":\"BACKWARD\"}\n```\n\nInstallation\n------------\n\nYou can download prebuilt versions of the schema registry as part of the\n[Confluent Platform](http://confluent.io/downloads/). To install from source,\nfollow the instructions in the Development section.\n\nDeployment\n----------\n\nThe REST interface to schema registry includes a built-in Jetty server. The\nwrapper scripts ``bin/schema-registry-start`` and ``bin/schema-registry-stop``\nare the recommended method of starting and stopping the service.\n\nDevelopment\n-----------\n\nTo build a development version, you may need a development versions of\n[common](https://github.com/confluentinc/common) and\n[rest-utils](https://github.com/confluentinc/rest-utils).  After\ninstalling these, you can build the Schema Registry\nwith Maven.\n\nThis project uses the [Google Java code style](https://google.github.io/styleguide/javaguide.html)\nto keep code clean and consistent.\n\nTo build:\n\n```bash\nmvn compile\n```\n\nTo run the unit and integration tests:\n\n```bash\nmvn test\n```\n\nTo run an instance of Schema Registry against a local Kafka cluster (using the default configuration included with Kafka):\n\n```bash\nmvn exec:java -pl :kafka-schema-registry -Dexec.args=\"config/schema-registry.properties\"\n```\n\nTo create a packaged version, optionally skipping the tests:\n\n```bash\nmvn package [-DskipTests]\n```\n\nIt produces:\n\n- Schema registry in `package-schema-registry/target/kafka-schema-registry-package-$VERSION-package`\n- Serde tools for avro/json/protobuf in `package-kafka-serde-tools/target/kafka-serde-tools-package-$VERSION-package`\n\nEach of the produced contains a directory layout similar to the packaged binary versions.\n\nYou can also produce a standalone fat JAR of schema registry using the `standalone` profile:\n\n```bash\nmvn package -P standalone [-DskipTests]\n```\n\nThis generates `package-schema-registry/target/kafka-schema-registry-package-$VERSION-standalone.jar`, which includes all the dependencies as well.\n\nOpenAPI Spec\n------------\n\nOpenAPI (formerly known as Swagger) specifications are built automatically using `swagger-maven-plugin`\non `compile` phase.\n\n\nContribute\n----------\n\nThanks for helping us to make Schema Registry even better!\n\n- Source Code: https://github.com/confluentinc/schema-registry\n- Issue Tracker: https://github.com/confluentinc/schema-registry/issues\n\nLicense\n-------\n\nThe project is licensed under the [Confluent Community License](LICENSE-ConfluentCommunity), except for the `client-*` and `avro-*` libs,\nwhich are under the [Apache 2.0 license](LICENSE-Apache).\nSee LICENSE file in each subfolder for detailed license agreement.\n","funding_links":[],"categories":["Java","Kafka","Libraries","rest-api","Schema","进程间通信","Data Management","Operations","Schema Registry"],"sub_categories":["Infrastructure from code","Schema Registry","Schema Management","Implementations"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfluentinc%2Fschema-registry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconfluentinc%2Fschema-registry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfluentinc%2Fschema-registry/lists"}