Azure / Azure/azure-rest-api-specs

[BUG] Invalid string format of char in Azure.Search searchservice.json

Open
#37,250 1 comment 0 reactions 0 assignees View on GitHub
bug customer-reported data-plane question Search Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

### API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/search/data-plane/Azure.Search/stable/2025-09-01/searchservice.json

### API Spec version

multiple

### Describe the bug

Invalid `"format"` of `"char"` defined at:

- https://github.com/Azure/azure-rest-api-specs/blob/e1ec9fd735d340e4fbffb0b1f791b2c0c88f2af1/specification/search/data-plane/Azure.Search/stable/2025-09-01/searchservice.json#L3878
- https://github.com/Azure/azure-rest-api-specs/blob/e1ec9fd735d340e4fbffb0b1f791b2c0c88f2af1/specification/search/data-plane/Azure.Search/stable/2025-09-01/searchservice.json#L3884

This is not a valid string format according to:
https://swagger.io/docs/specification/v3_0/data-models/data-types/#strings-formats

This resulted in errors generating from this spec using [autorest.powershell](https://github.com/Azure/autorest.powershell)

### Expected behavior

These properties remain as type `"string"` but with attributes of:
- `"minLength": 1`
- `"maxLength": 1`

to restrict to single-character length string.

### Actual behavior

These properties are defined with a format of `"char"` resulting in:

> error | UnknownJsonType/LLCS2000 | Schema 'PathHierarchyTokenizerV2Delimiter' is declared with invalid type 'char'

when generating PowerShell Module using:
`autorest --powershell --input-file:search/data-plane/Azure.Search/stable/2025-09-01/searchservice.json`

### Reproduction Steps

- [Install autorest.powershell](https://github.com/Azure/autorest.powershell/blob/main/docs/readme.md) if don't have already.
- From root directory of local clone of `azure-rest-api-specs` repository
- `autorest --powershell --input-file:specification/search/data-plane/Azure.Search/stable/2025-09-01/searchservice.json`

### Environment

- Windows 11 Enterprise

Contributor guide

Open the contributing guide

Research direction

Open specification/search/data-plane/Azure.Search/stable/2025-09-01/searchservice.json and inspect the two PathHierarchyTokenizerV2Delimiter definitions around lines 3878 and 3884. Run the documented autorest --powershell command before and after the change. Done means both properties remain strings constrained with minLength and maxLength of 1, and PowerShell generation no longer reports UnknownJsonType/LLCS2000.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.