-
Notifications
You must be signed in to change notification settings - Fork 25
Schema Registry API #446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Schema Registry API #446
Conversation
1bea053 to
353a5b9
Compare
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
CI Feedback 🧐(Feedback updated until commit 353a5b9)A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
…lient-NodeJS into w1am/registry-api
User description
PR Type
Enhancement, Tests
Description
Implement comprehensive Schema Registry API client support with 12 core operations for schema and version management
Add schema compatibility checking functionality with detailed error reporting
Generate complete gRPC service definitions and protocol buffer message types for schema registry operations
Implement bidirectional enum mappers and utility functions for gRPC to TypeScript domain type conversions
Add 12 integration test suites covering all schema registry operations (create, read, update, delete, list, lookup, register versions, check compatibility)
Support schema filtering by name prefix, tags, and version IDs with optional schema definition inclusion
Enable schema group management with auto-registration, validation, and compatibility mode settings
Support multiple schema data formats (JSON, Protobuf, Avro, Bytes) and 8 compatibility modes
Export schema registry module to public client API
Diagram Walkthrough
File Walkthrough
17 files
validation_pb.js
Generated protobuf validation message definitionspackages/db-client/generated/kurrentdb/protocols/v2/registry/validation_pb.js
SchemaCompatibilityError,SchemaCompatibilityResult,CheckSchemaCompatibilityRequest, andCheckSchemaCompatibilityResponsewire format
SchemaCompatibilityErrorKindwith 8 error types forschema compatibility validation
conversions
service_grpc_pb.js
Generated gRPC schema registry service clientpackages/db-client/generated/kurrentdb/protocols/v2/registry/service_grpc_pb.js
SchemaRegistryServicewith 24 RPCmethods
request/response message types
compatibility checking
SchemaRegistryServiceClientconstructor for clientinstantiation
shared_pb.js
Generated shared protobuf types and enumspackages/db-client/generated/kurrentdb/protocols/v2/registry/shared_pb.js
ErrorDetails,SchemaDataFormat, andCompatibilityModeenumsErrorDetailsmessage withcodeandmessagefieldsUnspecified) and 8 compatibility modes
service_pb.js
Generated service protocol aggregation filepackages/db-client/generated/kurrentdb/protocols/v2/registry/service_pb.js
proto objects from groups, schemas, and validation modules
definitions
errors_pb.js
Generated registry error definitionspackages/db-client/generated/kurrentdb/protocols/v2/registry/errors_pb.js
RegistryErrorenum withREGISTRY_ERROR_UNSPECIFIEDvalueschemas_grpc_pb.js
Generated schemas gRPC placeholderpackages/db-client/generated/kurrentdb/protocols/v2/registry/schemas_grpc_pb.js
schemas proto
validation_grpc_pb.js
Generated validation gRPC placeholderpackages/db-client/generated/kurrentdb/protocols/v2/registry/validation_grpc_pb.js
validation proto
errors_grpc_pb.js
Generated errors gRPC placeholderpackages/db-client/generated/kurrentdb/protocols/v2/registry/errors_grpc_pb.js
errors proto
groups_grpc_pb.js
Generated groups gRPC placeholderpackages/db-client/generated/kurrentdb/protocols/v2/registry/groups_grpc_pb.js
groups proto
shared_grpc_pb.js
Generated shared gRPC placeholderpackages/db-client/generated/kurrentdb/protocols/v2/registry/shared_grpc_pb.js
shared proto
service_grpc_pb.d.ts
Schema Registry gRPC Service Type Definitionspackages/db-client/generated/kurrentdb/protocols/v2/registry/service_grpc_pb.d.ts
methods
client stubs
register versions)
schemas_pb.d.ts
Schema Registry Protocol Buffer Message Typespackages/db-client/generated/kurrentdb/protocols/v2/registry/schemas_pb.d.ts
messages
management
SchemaDetails,SchemaVersion,RegisteredSchemamessage typesBulkRegisterSchemasRequest/Responseformats)
groups_pb.d.ts
Schema Registry Group Management Protocol Bufferspackages/db-client/generated/kurrentdb/protocols/v2/registry/groups_pb.d.ts
SchemaGroupandSchemaGroupDetailsmessage types withconfiguration
and data format enforcement
metadata
validation_pb.d.ts
Schema Registry Validation and Compatibility Protocol Bufferspackages/db-client/generated/kurrentdb/protocols/v2/registry/validation_pb.d.ts
compatibility checking
CheckSchemaCompatibilityRequest/Responsewith success/failurevariants
SchemaCompatibilityErrorwith detailed error information(kind, property path, type changes)
shared_pb.d.ts
Generated Shared Protocol Buffer Typespackages/db-client/generated/kurrentdb/protocols/v2/registry/shared_pb.d.ts
ErrorDetailsclass and schema data format/compatibility modeenums
service_pb.d.ts
Generated Service Protocol Buffer Typespackages/db-client/generated/kurrentdb/protocols/v2/registry/service_pb.d.ts
validation
errors_pb.d.ts
Generated Error Protocol Buffer Typespackages/db-client/generated/kurrentdb/protocols/v2/registry/errors_pb.d.ts
RegistryErrorenum with unspecified default value24 files
mappers.ts
Schema registry gRPC to domain type mapperspackages/db-client/src/schemaRegistry/utils/mappers.ts
SchemaDataFormat,CompatibilityMode, andSchemaCompatibilityErrorKindTypeScript domain types
serialization, and schema definition byte handling
objects
index.ts
Schema registry utilities barrel exportpackages/db-client/src/schemaRegistry/utils/index.ts
index.ts
Export schema registry modulepackages/db-client/src/index.ts
schemaRegistrymodule to public APItypes.ts
Schema Registry Type Definitions and Interfacespackages/db-client/src/schemaRegistry/types.ts
registry operations
compatibility modes
registry API operations
checkSchemaCompatibility.ts
Schema Compatibility Checking Implementationpackages/db-client/src/schemaRegistry/checkSchemaCompatibility.ts
checkSchemaCompatibilitymethod on theClientprototypeversion ID
failure (errors list)
createSchema.ts
Schema Creation Implementationpackages/db-client/src/schemaRegistry/createSchema.ts
createSchemamethod to register new schemas in the registrytags)
provided
updateSchema.ts
Schema Metadata Update Implementationpackages/db-client/src/schemaRegistry/updateSchema.ts
updateSchemamethod to modify schema metadataupdates
deleteSchema.ts
Schema Deletion Implementationpackages/db-client/src/schemaRegistry/deleteSchema.ts
deleteSchemamethod to remove schemas and all versionsgetSchema.ts
Schema Metadata Retrieval Implementationpackages/db-client/src/schemaRegistry/getSchema.ts
getSchemamethod to retrieve schema metadata by nametimestamps
SchemainterfacelistSchemas.ts
Schema Listing with Filtering Implementationpackages/db-client/src/schemaRegistry/listSchemas.ts
listSchemasmethod with optional filtering by name prefixand tags
lookupSchemaName.ts
Schema Name Lookup by Version IDpackages/db-client/src/schemaRegistry/lookupSchemaName.ts
lookupSchemaNamemethod to find schema name by version IDregisterSchemaVersion.ts
Schema Version Registration Implementationpackages/db-client/src/schemaRegistry/registerSchemaVersion.ts
registerSchemaVersionmethod to add new versions toexisting schemas
deleteSchemaVersions.ts
Schema Version Deletion Implementationpackages/db-client/src/schemaRegistry/deleteSchemaVersions.ts
deleteSchemaVersionsmethod to remove specific schemaversions
getSchemaVersion.ts
Schema Version Retrieval Implementationpackages/db-client/src/schemaRegistry/getSchemaVersion.ts
getSchemaVersionmethod to retrieve schema version by nameand optional version number
SchemaVersioninterfacegetSchemaVersionById.ts
Schema Version Retrieval by ID Implementationpackages/db-client/src/schemaRegistry/getSchemaVersionById.ts
getSchemaVersionByIdmethod to retrieve schema version byunique ID
listSchemaVersions.ts
Schema Versions Listing Implementationpackages/db-client/src/schemaRegistry/listSchemaVersions.ts
listSchemaVersionsmethod to retrieve all versions of aschema
SchemaVersionobjectslistRegisteredSchemas.ts
Registered Schemas Listing Implementationpackages/db-client/src/schemaRegistry/listRegisteredSchemas.ts
listRegisteredSchemasmethod to list schemas with latestversion info
index.ts
Schema Registry Module Exportspackages/db-client/src/schemaRegistry/index.ts
management, and compatibility
shared.proto
Shared Protocol Buffer Definitionspackages/db-client/protos/kurrentdb/protocols/v2/registry/shared.proto
compatibility modes
ErrorDetailsmessage for error informationschemas.proto
Schema Management Protocol Buffer Definitionspackages/db-client/protos/kurrentdb/protocols/v2/registry/schemas.proto
schemas
representation
validation.proto
Schema Validation Protocol Buffer Definitionspackages/db-client/protos/kurrentdb/protocols/v2/registry/validation.proto
SchemaCompatibilityErrorwith detailed error informationgroups.proto
Schema Group Management Protocol Buffer Definitionspackages/db-client/protos/kurrentdb/protocols/v2/registry/groups.proto
and data format
service.proto
Schema Registry gRPC Service Definitionpackages/db-client/protos/kurrentdb/protocols/v2/registry/service.proto
compatibility sections
errors.proto
Schema Registry Error Codes Definitionpackages/db-client/protos/kurrentdb/protocols/v2/registry/errors.proto
13 files
listRegisteredSchemas.test.ts
Integration Tests for List Registered Schemaspackages/test/src/schemaRegistry/listRegisteredSchemas.test.ts
listRegisteredSchemasclient methodmode, timestamps)
createSchema.test.ts
Schema Creation Integration Testspackages/test/src/schemaRegistry/createSchema.test.ts
updateSchema.test.ts
Schema Update Integration Testspackages/test/src/schemaRegistry/updateSchema.test.ts
deleteSchema.test.ts
Schema Deletion Integration Testspackages/test/src/schemaRegistry/deleteSchema.test.ts
getSchema.test.ts
Schema Retrieval Integration Testspackages/test/src/schemaRegistry/getSchema.test.ts
listSchemas.test.ts
Schema Listing Integration Testspackages/test/src/schemaRegistry/listSchemas.test.ts
lookupSchemaName.test.ts
Schema Name Lookup Integration Testspackages/test/src/schemaRegistry/lookupSchemaName.test.ts
versions
registerSchemaVersion.test.ts
Schema Version Registration Integration Testspackages/test/src/schemaRegistry/registerSchemaVersion.test.ts
deleteSchemaVersions.test.ts
Schema Version Deletion Integration Testspackages/test/src/schemaRegistry/deleteSchemaVersions.test.ts
getSchemaVersion.test.ts
Schema Version Retrieval Integration Testspackages/test/src/schemaRegistry/getSchemaVersion.test.ts
getSchemaVersionById.test.ts
Schema Version Retrieval by ID Integration Testspackages/test/src/schemaRegistry/getSchemaVersionById.test.ts
listSchemaVersions.test.ts
Schema Versions Listing Integration Testspackages/test/src/schemaRegistry/listSchemaVersions.test.ts
checkSchemaCompatibility.test.ts
Schema Compatibility Checking Integration Testspackages/test/src/schemaRegistry/checkSchemaCompatibility.test.ts
compatibility modes
schemas/versions
2 files