diff --git a/sdk/schemaregistry/schema-registry-avro/CHANGELOG.md b/sdk/schemaregistry/schema-registry-avro/CHANGELOG.md index 4289a12c724d..f5ee28236e24 100644 --- a/sdk/schemaregistry/schema-registry-avro/CHANGELOG.md +++ b/sdk/schemaregistry/schema-registry-avro/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.0.0-beta.4 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.0-beta.3 (2021-10-05) ### Breaking Changes diff --git a/sdk/schemaregistry/schema-registry-avro/package.json b/sdk/schemaregistry/schema-registry-avro/package.json index 652219f3b5d0..db8eda28f06a 100644 --- a/sdk/schemaregistry/schema-registry-avro/package.json +++ b/sdk/schemaregistry/schema-registry-avro/package.json @@ -1,6 +1,6 @@ { "name": "@azure/schema-registry-avro", - "version": "1.0.0-beta.3", + "version": "1.0.0-beta.4", "description": "Schema Registry Avro Serializer Library with typescript type definitions for node.js and browser.", "sdk-type": "client", "main": "dist/index.js", diff --git a/sdk/schemaregistry/schema-registry-avro/samples/v1/javascript/package.json b/sdk/schemaregistry/schema-registry-avro/samples/v1/javascript/package.json index 33194b261075..992dd5421d08 100644 --- a/sdk/schemaregistry/schema-registry-avro/samples/v1/javascript/package.json +++ b/sdk/schemaregistry/schema-registry-avro/samples/v1/javascript/package.json @@ -25,7 +25,7 @@ "dependencies": { "@azure/schema-registry-avro": "next", "dotenv": "latest", - "@azure/identity": "2.0.0-beta.5", - "@azure/schema-registry": "1.0.0-beta.2" + "@azure/identity": "2.0.0-beta.6", + "@azure/schema-registry": "1.0.0-beta.3" } } diff --git a/sdk/schemaregistry/schema-registry-avro/samples/v1/javascript/schemaRegistryAvroSample.js b/sdk/schemaregistry/schema-registry-avro/samples/v1/javascript/schemaRegistryAvroSample.js index 5722310b5a1d..9a72dd58113c 100644 --- a/sdk/schemaregistry/schema-registry-avro/samples/v1/javascript/schemaRegistryAvroSample.js +++ b/sdk/schemaregistry/schema-registry-avro/samples/v1/javascript/schemaRegistryAvroSample.js @@ -15,7 +15,7 @@ dotenv.config(); // Set these environment variables or edit the following values const endpoint = process.env["SCHEMA_REGISTRY_ENDPOINT"] || ""; -const group = process.env["SCHEMA_REGISTRY_GROUP"] || "AzureSdkSampleGroup"; +const groupName = process.env["SCHEMA_REGISTRY_GROUP"] || "AzureSdkSampleGroup"; // Sample Avro Schema for user with first and last names const schemaObject = { @@ -39,9 +39,9 @@ const schema = JSON.stringify(schemaObject); // Description of the schema for registration const schemaDescription = { name: `${schemaObject.namespace}.${schemaObject.name}`, - group, - serializationType: "avro", - content: schema + groupName, + format: "avro", + schemaDefinition: schema }; async function main() { @@ -54,7 +54,7 @@ async function main() { await client.registerSchema(schemaDescription); // Create a new serializer backed by the client - const serializer = new SchemaRegistryAvroSerializer(client, group); + const serializer = new SchemaRegistryAvroSerializer(client, { groupName }); // serialize an object that matches the schema const value = { firstName: "Jane", lastName: "Doe" }; diff --git a/sdk/schemaregistry/schema-registry-avro/samples/v1/typescript/package.json b/sdk/schemaregistry/schema-registry-avro/samples/v1/typescript/package.json index 68e0b8118c99..61ff2f79b66d 100644 --- a/sdk/schemaregistry/schema-registry-avro/samples/v1/typescript/package.json +++ b/sdk/schemaregistry/schema-registry-avro/samples/v1/typescript/package.json @@ -29,11 +29,11 @@ "dependencies": { "@azure/schema-registry-avro": "next", "dotenv": "latest", - "@azure/identity": "2.0.0-beta.5", - "@azure/schema-registry": "1.0.0-beta.2" + "@azure/identity": "2.0.0-beta.6", + "@azure/schema-registry": "1.0.0-beta.3" }, "devDependencies": { - "typescript": "~4.2.0", + "typescript": "~4.4.0", "rimraf": "latest" } } diff --git a/sdk/schemaregistry/schema-registry-avro/samples/v1/typescript/src/schemaRegistryAvroSample.ts b/sdk/schemaregistry/schema-registry-avro/samples/v1/typescript/src/schemaRegistryAvroSample.ts index 6a0f9eeb49a3..5fd0bee5c071 100644 --- a/sdk/schemaregistry/schema-registry-avro/samples/v1/typescript/src/schemaRegistryAvroSample.ts +++ b/sdk/schemaregistry/schema-registry-avro/samples/v1/typescript/src/schemaRegistryAvroSample.ts @@ -15,7 +15,7 @@ dotenv.config(); // Set these environment variables or edit the following values const endpoint = process.env["SCHEMA_REGISTRY_ENDPOINT"] || ""; -const group = process.env["SCHEMA_REGISTRY_GROUP"] || "AzureSdkSampleGroup"; +const groupName = process.env["SCHEMA_REGISTRY_GROUP"] || "AzureSdkSampleGroup"; // Sample Avro Schema for user with first and last names const schemaObject = { @@ -45,9 +45,9 @@ const schema = JSON.stringify(schemaObject); // Description of the schema for registration const schemaDescription: SchemaDescription = { name: `${schemaObject.namespace}.${schemaObject.name}`, - group, - serializationType: "avro", - content: schema + groupName, + format: "avro", + schemaDefinition: schema }; export async function main() { @@ -60,7 +60,7 @@ export async function main() { await client.registerSchema(schemaDescription); // Create a new serializer backed by the client - const serializer = new SchemaRegistryAvroSerializer(client, group); + const serializer = new SchemaRegistryAvroSerializer(client, { groupName }); // serialize an object that matches the schema const value: User = { firstName: "Jane", lastName: "Doe" }; @@ -69,7 +69,7 @@ export async function main() { console.log(buffer); // deserialize the result back to an object - const deserializedValue = await serializer.deserialize(buffer); + const deserializedValue = (await serializer.deserialize(buffer)) as User; console.log("Deserialized:"); console.log(`${deserializedValue.firstName} ${deserializedValue.lastName}`); }