Skip to content

Commit

Permalink
[Schema Registry] Post release automation (#18052)
Browse files Browse the repository at this point in the history
* [Schema Registry] Post release automation

* bump SR dep ver

* update changelog
  • Loading branch information
deyaaeldeen authored Oct 6, 2021
1 parent a97f5e4 commit 906cecf
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 14 deletions.
2 changes: 1 addition & 1 deletion sdk/schemaregistry/schema-registry-avro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 10 additions & 0 deletions sdk/schemaregistry/schema-registry/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/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"] || "<endpoint>";
const fullyQualifiedNamespace =
process.env["SCHEMA_REGISTRY_ENDPOINT"] || "<fullyQualifiedNamespace>";
const group = process.env["SCHEMA_REGISTRY_GROUP"] || "AzureSdkSampleGroup";

// Sample Avro Schema for user with first and last names
Expand All @@ -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);
Expand All @@ -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}`);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@azure/identity": "2.0.0-beta.6"
},
"devDependencies": {
"typescript": "~4.2.0",
"typescript": "~4.4.0",
"rimraf": "latest"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"] || "<endpoint>";
const fullyQualifiedNamespace =
process.env["SCHEMA_REGISTRY_ENDPOINT"] || "<fullyQualifiedNamespace>";
const group = process.env["SCHEMA_REGISTRY_GROUP"] || "AzureSdkSampleGroup";

// Sample Avro Schema for user with first and last names
Expand All @@ -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);
Expand All @@ -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}`);
}
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 906cecf

Please sign in to comment.