Skip to content

[Azure Guidelines] Support encoding from StringIndex model to int. #4925

Open

Description

Describe the issue or request
The latest directive from azure is to support this: https://github.com/microsoft/api-guidelines/blob/685e493d38f8a3875c22336dcd177f4b54dcfb23/azure/Guidelines.md#returning-string-offsets--lengths-substrings

We've implemented the model in the pr here, but the idea from the API Review team is that the SDK's would automatically select the string encoding the language supports and ignore the other two, thereby exposing this field as an int instead of a model.

Azure/azure-sdk-for-net#43913

Within the code:

// Currently
taggerOutput.Offset.Utf16 // int
taggerOutput.Offset //  {"utf8": 10, "utf16":10, "codePoint:10"} - StringIndex model

// Desired
taggerOutput.Offset // int -- While still supporting the serialization of the StringIndex model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    customizationAutoRest C# language generator customization option.v3Version 3 of AutoRest C# generator.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions