Path parameters don't support arrays and maps as input
- Dominant language
- C#
- Stars
- 3.8k
- Forks
- 333
- Avg merge
- 16h 29m
- Merged PRs (30d)
- 116
Description
This OpenAPI fragment
```yaml
/v2/properties/{properties}:
get:
operationId: v2_getSelectedProperties
parameters:
- name: properties
in: path
required: true
schema:
type: array
items:
type: string
```
generated the following indexer
```csharp
public WithPropertiesItemRequestBuilder this[string position] { get {
var urlTplParams = new Dictionary(PathParameters);
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("properties", position);
return new WithPropertiesItemRequestBuilder(urlTplParams, RequestAdapter);
} }
```
The type of the indexer parameter should be string[] and not string.
Contributor guide
Research direction
Start by reproducing the OpenAPI fragment and inspecting the generated C# indexer shown in the issue. Trace how path parameter schemas are mapped to generated indexer parameter types, then verify that array and map inputs are represented correctly and add regression coverage if the generator's existing tests provide a suitable location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, openapi
- Domain
- api, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100