From 67d8b99a236851c82ae2befe6928a8979d655621 Mon Sep 17 00:00:00 2001 From: Deyaaeldeen Almahallawi Date: Tue, 5 Oct 2021 21:04:10 +0000 Subject: [PATCH 1/3] [Schema Registry] Post release automation --- sdk/schemaregistry/schema-registry/package.json | 2 +- .../samples/v1/javascript/schemaRegistrySample.js | 11 ++++++----- .../samples/v1/typescript/package.json | 2 +- .../samples/v1/typescript/src/schemaRegistrySample.ts | 11 ++++++----- .../generated/generatedSchemaRegistryClientContext.ts | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/sdk/schemaregistry/schema-registry/package.json b/sdk/schemaregistry/schema-registry/package.json index 295710cbcb0d..db8fc3be92f8 100644 --- a/sdk/schemaregistry/schema-registry/package.json +++ b/sdk/schemaregistry/schema-registry/package.json @@ -1,6 +1,6 @@ { "name": "@azure/schema-registry", - "version": "1.0.0-beta.3", + "version": "1.0.0-beta.4", "description": "Schema Registry Library with typescript type definitions for node.js and browser.", "sdk-type": "client", "main": "dist/index.js", diff --git a/sdk/schemaregistry/schema-registry/samples/v1/javascript/schemaRegistrySample.js b/sdk/schemaregistry/schema-registry/samples/v1/javascript/schemaRegistrySample.js index 209c4522cd95..946e7307c229 100644 --- a/sdk/schemaregistry/schema-registry/samples/v1/javascript/schemaRegistrySample.js +++ b/sdk/schemaregistry/schema-registry/samples/v1/javascript/schemaRegistrySample.js @@ -13,7 +13,8 @@ const dotenv = require("dotenv"); dotenv.config(); // Set these environment variables or edit the following values -const endpoint = process.env["SCHEMA_REGISTRY_ENDPOINT"] || ""; +const fullyQualifiedNamespace = + process.env["SCHEMA_REGISTRY_ENDPOINT"] || ""; const group = process.env["SCHEMA_REGISTRY_GROUP"] || "AzureSdkSampleGroup"; // Sample Avro Schema for user with first and last names @@ -38,12 +39,12 @@ const schemaDescription = { name: `${schemaObject.namespace}.${schemaObject.name}`, groupName: group, format: "avro", - definition: JSON.stringify(schemaObject) + schemaDefinition: JSON.stringify(schemaObject) }; async function main() { // Create a new client - const client = new SchemaRegistryClient(endpoint, new DefaultAzureCredential()); + const client = new SchemaRegistryClient(fullyQualifiedNamespace, new DefaultAzureCredential()); // Register a schema and get back its ID. const registered = await client.registerSchema(schemaDescription); @@ -56,10 +57,10 @@ async function main() { console.log(`Got schema ID=${found.id}`); } - // Get content of existing schema by its ID + // Get definition of existing schema by its ID const foundSchema = await client.getSchema(registered.id); if (foundSchema) { - console.log(`Got schema content=${foundSchema.definition}`); + console.log(`Got schema definition=${foundSchema.schemaDefinition}`); } } diff --git a/sdk/schemaregistry/schema-registry/samples/v1/typescript/package.json b/sdk/schemaregistry/schema-registry/samples/v1/typescript/package.json index 13c0096f7a1d..f09910bdb8d9 100644 --- a/sdk/schemaregistry/schema-registry/samples/v1/typescript/package.json +++ b/sdk/schemaregistry/schema-registry/samples/v1/typescript/package.json @@ -32,7 +32,7 @@ "@azure/identity": "2.0.0-beta.6" }, "devDependencies": { - "typescript": "~4.2.0", + "typescript": "~4.4.0", "rimraf": "latest" } } diff --git a/sdk/schemaregistry/schema-registry/samples/v1/typescript/src/schemaRegistrySample.ts b/sdk/schemaregistry/schema-registry/samples/v1/typescript/src/schemaRegistrySample.ts index b24a54bd5247..c0bfe8f7aacb 100644 --- a/sdk/schemaregistry/schema-registry/samples/v1/typescript/src/schemaRegistrySample.ts +++ b/sdk/schemaregistry/schema-registry/samples/v1/typescript/src/schemaRegistrySample.ts @@ -13,7 +13,8 @@ import * as dotenv from "dotenv"; dotenv.config(); // Set these environment variables or edit the following values -const endpoint = process.env["SCHEMA_REGISTRY_ENDPOINT"] || ""; +const fullyQualifiedNamespace = + process.env["SCHEMA_REGISTRY_ENDPOINT"] || ""; const group = process.env["SCHEMA_REGISTRY_GROUP"] || "AzureSdkSampleGroup"; // Sample Avro Schema for user with first and last names @@ -38,12 +39,12 @@ const schemaDescription: SchemaDescription = { name: `${schemaObject.namespace}.${schemaObject.name}`, groupName: group, format: "avro", - definition: JSON.stringify(schemaObject) + schemaDefinition: JSON.stringify(schemaObject) }; export async function main() { // Create a new client - const client = new SchemaRegistryClient(endpoint, new DefaultAzureCredential()); + const client = new SchemaRegistryClient(fullyQualifiedNamespace, new DefaultAzureCredential()); // Register a schema and get back its ID. const registered = await client.registerSchema(schemaDescription); @@ -56,10 +57,10 @@ export async function main() { console.log(`Got schema ID=${found.id}`); } - // Get content of existing schema by its ID + // Get definition of existing schema by its ID const foundSchema = await client.getSchema(registered.id); if (foundSchema) { - console.log(`Got schema content=${foundSchema.definition}`); + console.log(`Got schema definition=${foundSchema.schemaDefinition}`); } } diff --git a/sdk/schemaregistry/schema-registry/src/generated/generatedSchemaRegistryClientContext.ts b/sdk/schemaregistry/schema-registry/src/generated/generatedSchemaRegistryClientContext.ts index f0747099282d..60589bfa20a0 100644 --- a/sdk/schemaregistry/schema-registry/src/generated/generatedSchemaRegistryClientContext.ts +++ b/sdk/schemaregistry/schema-registry/src/generated/generatedSchemaRegistryClientContext.ts @@ -35,7 +35,7 @@ export class GeneratedSchemaRegistryClientContext extends coreClient.ServiceClie requestContentType: "application/json; charset=utf-8" }; - const packageDetails = `azsdk-js-schema-registry/1.0.0-beta.3`; + const packageDetails = `azsdk-js-schema-registry/1.0.0-beta.4`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` From ce68e28ba3d55574032a03c7d8d1747c36d65318 Mon Sep 17 00:00:00 2001 From: Deyaaeldeen Almahallawi Date: Tue, 5 Oct 2021 22:00:17 +0000 Subject: [PATCH 2/3] bump SR dep ver --- sdk/schemaregistry/schema-registry-avro/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/schemaregistry/schema-registry-avro/package.json b/sdk/schemaregistry/schema-registry-avro/package.json index db8eda28f06a..336f8999627e 100644 --- a/sdk/schemaregistry/schema-registry-avro/package.json +++ b/sdk/schemaregistry/schema-registry-avro/package.json @@ -72,7 +72,7 @@ } }, "dependencies": { - "@azure/schema-registry": "1.0.0-beta.3", + "@azure/schema-registry": "1.0.0-beta.4", "avsc": "^5.5.1", "buffer": "^6.0.0", "tslib": "^2.2.0" From 41f81b72f4123bc4ba4c7b51597811f8be27fa39 Mon Sep 17 00:00:00 2001 From: Deyaaeldeen Almahallawi Date: Tue, 5 Oct 2021 22:31:10 +0000 Subject: [PATCH 3/3] update changelog --- sdk/schemaregistry/schema-registry/CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sdk/schemaregistry/schema-registry/CHANGELOG.md b/sdk/schemaregistry/schema-registry/CHANGELOG.md index 05394fc6b6f5..aad9590f308d 100644 --- a/sdk/schemaregistry/schema-registry/CHANGELOG.md +++ b/sdk/schemaregistry/schema-registry/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