Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SchemaRegistry] Fix core build #14968

Merged
merged 5 commits into from
Sep 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions sdk/schemaregistry/Azure.Data.SchemaRegistry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The simpliest way is to use the [Azure portal][azure_portal] and navigate to you

Once you have the Azure resource credentials and the Event Hubs namespace hostname, you can create the [SchemaRegistryClient][schema_registry_client]. You'll also need the [Azure.Identity][azure_identity] package to create the credential.

```C# Snippet:CreateSchemaRegistryClient
```C# Snippet:SchemaRegistryCreateSchemaRegistryClient
string endpoint = "<event_hubs_namespace_hostname>";
var credentials = new ClientSecretCredential(
"<tenant_id>",
Expand Down Expand Up @@ -77,7 +77,7 @@ The following shows examples of what is available through the SchemaRegistryClie

Register a schema to be stored in the Azure Schema Registry.

```C# Snippet:RegisterSchema
```C# Snippet:SchemaRegistryRegisterSchema
string schemaName = "<schema_name>";
string groupName = "<schema_group_name>";
SerializationType schemaType = SerializationType.Avro;
Expand All @@ -100,7 +100,7 @@ Response<SchemaProperties> schemaProperties = client.RegisterSchema(groupName, s

Retrieve a previously registered schema ID from the Azure Schema Registry.

```C# Snippet:RetrieveSchemaId
```C# Snippet:SchemaRegistryRetrieveSchemaId
string schemaName = "<schema_name>";
string groupName = "<schema_group_name>";
SerializationType schemaType = SerializationType.Avro;
Expand All @@ -124,7 +124,7 @@ string schemaId = schemaProperties.Value.Id;

Retrieve a previously registered schema's content from the Azure Schema Registry.

```C# Snippet:RetrieveSchema
```C# Snippet:SchemaRegistryRetrieveSchema
string schemaId = "<schema_id>";

Response<SchemaProperties> schemaProperties = client.GetSchema(schemaId);
Expand All @@ -151,9 +151,9 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con

<!-- LINKS -->
[nuget]: https://www.nuget.org/
[event_hubs_namespace]: https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-about
[azure_powershell]: https://docs.microsoft.com/en-us/powershell/azure/
[create_event_hubs_namespace]: https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-quickstart-powershell#create-an-event-hubs-namespace
[event_hubs_namespace]: https://docs.microsoft.com/azure/event-hubs/event-hubs-about
[azure_powershell]: https://docs.microsoft.com/powershell/azure/
[create_event_hubs_namespace]: https://docs.microsoft.com/azure/event-hubs/event-hubs-quickstart-powershell#create-an-event-hubs-namespace
[quickstart_guide]: https://github.com/Azure/azure-sdk-for-net/blob/master/doc/mgmt_preview_quickstart.md
[schema_registry_client]: src/SchemaRegistryClient.cs
[azure_portal]: https://ms.portal.azure.com/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class Sample01_ReadmeSnippets : SamplesBase<SchemaRegistryClientTestEnvir
[Test]
public void CreateSchemaRegistryClient()
{
#region Snippet:CreateSchemaRegistryClient
#region Snippet:SchemaRegistryCreateSchemaRegistryClient
string endpoint = "<event_hubs_namespace_hostname>";
var credentials = new ClientSecretCredential(
"<tenant_id>",
Expand All @@ -30,7 +30,7 @@ public void RegisterSchema()
{
var client = new SchemaRegistryClient(TestEnvironment.SchemaRegistryUri, TestEnvironment.Credential);

#region Snippet:RegisterSchema
#region Snippet:SchemaRegistryRegisterSchema
string schemaName = "<schema_name>";
string groupName = "<schema_group_name>";
SerializationType schemaType = SerializationType.Avro;
Expand All @@ -56,7 +56,7 @@ public void RetrieveSchemaId()
{
var client = new SchemaRegistryClient(TestEnvironment.SchemaRegistryUri, TestEnvironment.Credential);

#region Snippet:RetrieveSchemaId
#region Snippet:SchemaRegistryRetrieveSchemaId
string schemaName = "<schema_name>";
string groupName = "<schema_group_name>";
SerializationType schemaType = SerializationType.Avro;
Expand All @@ -83,7 +83,7 @@ public void RetrieveSchema()
{
var client = new SchemaRegistryClient(TestEnvironment.SchemaRegistryUri, TestEnvironment.Credential);

#region Snippet:RetrieveSchema
#region Snippet:SchemaRegistryRetrieveSchema
string schemaId = "<schema_id>";

Response<SchemaProperties> schemaProperties = client.GetSchema(schemaId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ private SchemaRegistryClient CreateClient() =>

private const string SchemaContent = "{\"type\" : \"record\",\"namespace\" : \"TestSchema\",\"name\" : \"Employee\",\"fields\" : [{ \"name\" : \"Name\" , \"type\" : \"string\" },{ \"name\" : \"Age\", \"type\" : \"int\" }]}";

[Ignore("The recording keeping the entire schema content string literally (including surround quotes and backslashes) causing playback to fail.")]
[Test]
public async Task CanRegisterSchema()
{
Expand All @@ -40,7 +39,6 @@ public async Task CanRegisterSchema()
Assert.AreEqual(SchemaContent, schemaProperties.Value.Content);
}

[Ignore("The recording keeping the entire schema content string literally (including surround quotes and backslashes) causing playback to fail.")]
[Test]
public async Task CanGetSchemaId()
{
Expand All @@ -57,7 +55,6 @@ public async Task CanGetSchemaId()
Assert.AreEqual(SchemaContent, schemaProperties.Value.Content);
}

[Ignore("The recording keeping the entire schema content string literally (including surround quotes and backslashes) causing playback to fail.")]
[Test]
public async Task CanGetSchema()
{
Expand Down

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

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

Loading