Skip to content

Commit

Permalink
Rename autorest.csharp branch feature/v3 to main (Azure#45788)
Browse files Browse the repository at this point in the history
  • Loading branch information
hallipr authored Sep 9, 2024
1 parent ce4f4af commit 0d8a8fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Update the CHANGELOG.md file which exists in `Azure.<group>.<service>/CHANGELOG.

Adding convenience APIs is not required for Azure SDK data plane generated libraries, but doing so can provide customers with a better experience when they develop code using your library. You should consider adding convenience APIs to the generated client to make it easier to use for the most common customer scenarios, or based on customer feedback. Any convenience APIs you add should be approved with the Azure SDK architecture board.

You can add convienice APIs by adding a customization layer on top of the generated code. Please see the [autorest.csharp README#customizing-the-generated-code](https://github.com/Azure/autorest.csharp/blob/feature/v3/readme.md#customizing-the-generated-code) for the details of adding the customization layer. This is the preferred method for adding convenience APIs to your generated client.
You can add convienice APIs by adding a customization layer on top of the generated code. Please see the [autorest.csharp README#customizing-the-generated-code](https://github.com/Azure/autorest.csharp/blob/main/readme.md#customizing-the-generated-code) for the details of adding the customization layer. This is the preferred method for adding convenience APIs to your generated client.


If you generate SDK from Open API specification (swagger), and other modifications are needed to the generated API, you can consider making them directly to the Open API specification, which will have the benefit of making the changes to the library in all languages you generate the library in. As a last resort, you can add modifications with swagger transforms in the `autorest.md` file. Details for various transforms can be found in [Customizing the generated code](https://github.com/Azure/autorest.csharp#customizing-the-generated-code).
Expand Down
4 changes: 2 additions & 2 deletions sdk/core/Azure.Core/src/DynamicData/DynamicData.Converters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public override TimeSpan Read(
string? value = reader.GetString() ??
throw new JsonException($"Failed to read 'string' value at JSON position {reader.Position}.");

// From: https://github.com/Azure/autorest.csharp/blob/feature/v3/src/assets/Generator.Shared/TypeFormatters.cs#L137
// From: https://github.com/Azure/autorest.csharp/blob/main/src/assets/Generator.Shared/TypeFormatters.cs#L137
return TimeSpan.ParseExact(value, "c", CultureInfo.InvariantCulture);
}

Expand All @@ -136,7 +136,7 @@ public override void Write(
TimeSpan timeValue,
JsonSerializerOptions options)
{
// From: https://github.com/Azure/autorest.csharp/blob/feature/v3/src/assets/Generator.Shared/TypeFormatters.cs#L37
// From: https://github.com/Azure/autorest.csharp/blob/main/src/assets/Generator.Shared/TypeFormatters.cs#L37
string value = timeValue.ToString("c", CultureInfo.InvariantCulture);
writer.WriteStringValue(value);
}
Expand Down

0 comments on commit 0d8a8fd

Please sign in to comment.