File tree Expand file tree Collapse file tree 11 files changed +34
-57
lines changed
sdk/schemaregistry/schema-registry/samples/v1-beta Expand file tree Collapse file tree 11 files changed +34
-57
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP
4949
5050[ getschemabyversion ] : https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/schemaregistry/schema-registry/samples/v1-beta/javascript/getSchemaByVersion.js
5151[ schemaregistrysample ] : https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/schemaregistry/schema-registry/samples/v1-beta/javascript/schemaRegistrySample.js
52- [ apiref ] : https://learn.microsoft.com/javascript/api/@azure/schema-registry
52+ [ apiref ] : https://learn.microsoft.com/javascript/api/@azure/schema-registry?view=azure-node-preview
5353[ freesub ] : https://azure.microsoft.com/free/
5454[ createinstance_azureschemaregistryresource ] : https://aka.ms/schemaregistry
5555[ package ] : https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/schemaregistry/schema-registry/README.md
Original file line number Diff line number Diff line change 77
88const { DefaultAzureCredential } = require ( "@azure/identity" ) ;
99const { SchemaRegistryClient, KnownSchemaFormats } = require ( "@azure/schema-registry" ) ;
10-
11- // Load the .env file if it exists
12- require ( "dotenv" ) . config ( ) ;
10+ require ( "dotenv/config" ) ;
1311
1412// Set these environment variables or edit the following values
1513const fullyQualifiedNamespace =
@@ -50,7 +48,7 @@ async function main() {
5048 // Register a schema and get back its ID and version.
5149 const { id, version } = await client . registerSchema ( schemaDescription ) ;
5250 console . log (
53- `Registered schema with the following properties:\n- ID=${ id } \n- Version: ${ version } `
51+ `Registered schema with the following properties:\n- ID=${ id } \n- Version: ${ version } ` ,
5452 ) ;
5553
5654 // Get definition of existing schema by its version
Original file line number Diff line number Diff line change 2525 "dependencies" : {
2626 "@azure/schema-registry" : " next" ,
2727 "dotenv" : " latest" ,
28- "@azure/identity" : " ^4.2.1"
28+ "@azure/identity" : " ^4.11.1"
29+ },
30+ "devDependencies" : {
31+ "cross-env" : " latest"
2932 }
3033}
Original file line number Diff line number Diff line change @@ -2,12 +2,3 @@ SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE=<Fully qualified namespace for an
22SCHEMAREGISTRY_JSON_FULLY_QUALIFIED_NAMESPACE = <Fully qualified namespace for a JSON schema group>
33SCHEMAREGISTRY_CUSTOM_FULLY_QUALIFIED_NAMESPACE = <Fully qualified namespace for a custom schema group>
44SCHEMA_REGISTRY_GROUP = <Group name for schemas in registry>
5-
6- # Used to authenticate using Azure AD as a service principal for role-based authentication
7- # in the tokenAuth sample.
8- #
9- # See the documentation for `EnvironmentCredential` at the following link:
10- # https://learn.microsoft.com/javascript/api/@azure/identity/environmentcredential
11- AZURE_TENANT_ID = <AD tenant id or name>
12- AZURE_CLIENT_ID = <ID of the user/service principal to authenticate as>
13- AZURE_CLIENT_SECRET = <client secret used to authenticate to Azure AD>
Original file line number Diff line number Diff line change 77
88const { DefaultAzureCredential } = require ( "@azure/identity" ) ;
99const { SchemaRegistryClient, KnownSchemaFormats } = require ( "@azure/schema-registry" ) ;
10-
11- // Load the .env file if it exists
12- require ( "dotenv" ) . config ( ) ;
10+ require ( "dotenv/config" ) ;
1311
1412// Set these environment variables or edit the following values
1513const fullyQualifiedNamespace =
@@ -50,7 +48,7 @@ async function main() {
5048 // Register a schema and get back its ID.
5149 const { id, version } = await client . registerSchema ( schemaDescription ) ;
5250 console . log (
53- `Registered schema with the following properties:\n- ID=${ id } \n- Version: ${ version } `
51+ `Registered schema with the following properties:\n- ID=${ id } \n- Version: ${ version } ` ,
5452 ) ;
5553
5654 // Get definition of existing schema by its ID
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP
6161
6262[ getschemabyversion ] : https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/schemaregistry/schema-registry/samples/v1-beta/typescript/src/getSchemaByVersion.ts
6363[ schemaregistrysample ] : https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/schemaregistry/schema-registry/samples/v1-beta/typescript/src/schemaRegistrySample.ts
64- [ apiref ] : https://learn.microsoft.com/javascript/api/@azure/schema-registry
64+ [ apiref ] : https://learn.microsoft.com/javascript/api/@azure/schema-registry?view=azure-node-preview
6565[ freesub ] : https://azure.microsoft.com/free/
6666[ createinstance_azureschemaregistryresource ] : https://aka.ms/schemaregistry
6767[ package ] : https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/schemaregistry/schema-registry/README.md
Original file line number Diff line number Diff line change 2929 "dependencies" : {
3030 "@azure/schema-registry" : " next" ,
3131 "dotenv" : " latest" ,
32- "@azure/identity" : " ^4.2 .1"
32+ "@azure/identity" : " ^4.11 .1"
3333 },
3434 "devDependencies" : {
3535 "@types/node" : " ^20.0.0" ,
36- "typescript" : " ~5.8.2" ,
37- "rimraf" : " latest"
36+ "cross-env" : " latest" ,
37+ "rimraf" : " latest" ,
38+ "typescript" : " ~5.9.3"
3839 }
3940}
Original file line number Diff line number Diff line change @@ -2,12 +2,3 @@ SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE=<Fully qualified namespace for an
22SCHEMAREGISTRY_JSON_FULLY_QUALIFIED_NAMESPACE = <Fully qualified namespace for a JSON schema group>
33SCHEMAREGISTRY_CUSTOM_FULLY_QUALIFIED_NAMESPACE = <Fully qualified namespace for a custom schema group>
44SCHEMA_REGISTRY_GROUP = <Group name for schemas in registry>
5-
6- # Used to authenticate using Azure AD as a service principal for role-based authentication
7- # in the tokenAuth sample.
8- #
9- # See the documentation for `EnvironmentCredential` at the following link:
10- # https://learn.microsoft.com/javascript/api/@azure/identity/environmentcredential
11- AZURE_TENANT_ID = <AD tenant id or name>
12- AZURE_CLIENT_ID = <ID of the user/service principal to authenticate as>
13- AZURE_CLIENT_SECRET = <client secret used to authenticate to Azure AD>
Original file line number Diff line number Diff line change 66 */
77
88import { DefaultAzureCredential } from "@azure/identity" ;
9- import {
10- SchemaRegistryClient ,
11- SchemaDescription ,
12- KnownSchemaFormats ,
13- } from "@azure/schema-registry" ;
14-
15- // Load the .env file if it exists
9+ import type { SchemaDescription } from "@azure/schema-registry" ;
10+ import { SchemaRegistryClient , KnownSchemaFormats } from "@azure/schema-registry" ;
1611import "dotenv/config" ;
12+
1713// Set these environment variables or edit the following values
1814const fullyQualifiedNamespace =
1915 process . env [ "SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE" ] || "<fullyQualifiedNamespace>" ;
@@ -53,7 +49,7 @@ export async function main(): Promise<void> {
5349 // Register a schema and get back its ID and version.
5450 const { id, version } = await client . registerSchema ( schemaDescription ) ;
5551 console . log (
56- `Registered schema with the following properties:\n- ID=${ id } \n- Version: ${ version } `
52+ `Registered schema with the following properties:\n- ID=${ id } \n- Version: ${ version } ` ,
5753 ) ;
5854
5955 // Get definition of existing schema by its version
Original file line number Diff line number Diff line change 66 */
77
88import { DefaultAzureCredential } from "@azure/identity" ;
9- import {
10- SchemaRegistryClient ,
11- SchemaDescription ,
12- KnownSchemaFormats ,
13- } from "@azure/schema-registry" ;
14-
15- // Load the .env file if it exists
9+ import type { SchemaDescription } from "@azure/schema-registry" ;
10+ import { SchemaRegistryClient , KnownSchemaFormats } from "@azure/schema-registry" ;
1611import "dotenv/config" ;
12+
1713// Set these environment variables or edit the following values
1814const fullyQualifiedNamespace =
1915 process . env [ "SCHEMAREGISTRY_AVRO_FULLY_QUALIFIED_NAMESPACE" ] || "<fullyQualifiedNamespace>" ;
@@ -53,7 +49,7 @@ export async function main(): Promise<void> {
5349 // Register a schema and get back its ID.
5450 const { id, version } = await client . registerSchema ( schemaDescription ) ;
5551 console . log (
56- `Registered schema with the following properties:\n- ID=${ id } \n- Version: ${ version } `
52+ `Registered schema with the following properties:\n- ID=${ id } \n- Version: ${ version } ` ,
5753 ) ;
5854
5955 // Get definition of existing schema by its ID
You can’t perform that action at this time.
0 commit comments