Azure / Azure/typespec-azure

[arm-common-types]: Add a model for string encoding

Open
#2,679 2 comments 0 reactions 0 assignees View on GitHub
design:needed lib:azure-core
Dominant language
TypeScript
Stars
27
Forks
90
Avg merge
1d 22h
Merged PRs (30d)
156

Description

### Service Team Contacts (Dev)

jovinson

### Choose which kind of change this is

Add common-type

### Describe the change, Provide the desired TypeSpec or json-schema for the change as appropriate.

There's [newer guidance](https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#returning-string-offsets--lengths-substrings) for data plane APIs on returning substring offsets or lengths within a text. Our service has [implemented a type](https://github.com/Azure/azure-rest-api-specs/blob/9016a56fdc5c9dc140796c1acc38e4373755c500/specification/healthdataaiservices/HealthDataAIServices.DeidServices/models_tagger.tsp#L31) that encapsulates the three encoding-specific values, but this seems like a good candidate for a common type since any other team handling text offsets will need to recreate the same type.

### Link to documentation if available

_No response_

### Additional notes or questions

_No response_

### Checklist

- [x] Follow our [Code of Conduct](https://github.com/azure/typespec-azure/blob/main/CODE_OF_CONDUCT.md)
- [x] Change is approved by Arm API Review
- [x] Please update issue title and choose the change type.

Contributor guide

Open the contributing guide

Research direction

Start with the linked specification/healthdataaiservices/HealthDataAIServices.DeidServices/models_tagger.tsp model to understand the three encoding-specific values, then inspect the repository's common-type conventions. Done means adding a reusable common model that represents those values for text offsets and confirming it matches the stated API guidance.

Written by the indexing model from the issue text.

Assessment

Domain
backend-api-design
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.