Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Commit

Permalink
Post release automated changes for schemaregistry releases (Azure#18051)
Browse files Browse the repository at this point in the history
Post release automated changes for azure-schema-registry-avro
  • Loading branch information
azure-sdk authored Oct 6, 2021
1 parent 3f2fee6 commit b577126
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 17 deletions.
10 changes: 10 additions & 0 deletions sdk/schemaregistry/schema-registry-avro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion sdk/schemaregistry/schema-registry-avro/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dotenv.config();

// Set these environment variables or edit the following values
const endpoint = process.env["SCHEMA_REGISTRY_ENDPOINT"] || "<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 = {
Expand All @@ -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() {
Expand All @@ -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" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dotenv.config();

// Set these environment variables or edit the following values
const endpoint = process.env["SCHEMA_REGISTRY_ENDPOINT"] || "<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 = {
Expand Down Expand Up @@ -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() {
Expand All @@ -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" };
Expand All @@ -69,7 +69,7 @@ export async function main() {
console.log(buffer);

// deserialize the result back to an object
const deserializedValue = await serializer.deserialize<User>(buffer);
const deserializedValue = (await serializer.deserialize(buffer)) as User;
console.log("Deserialized:");
console.log(`${deserializedValue.firstName} ${deserializedValue.lastName}`);
}
Expand Down

0 comments on commit b577126

Please sign in to comment.