microsoft / microsoft/typespec
[Bug]: @query format does not accept deepObject
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
### Describe the bug
According to [this page](https://typespec.io/docs/getting-started/typespec-for-openapi-dev#openapi-v3) in the documentation the `format` parameter of `@query` decorator is mapped to the `style` field of OpenAPI parameters.
However, according to [this page](https://typespec.io/docs/libraries/http/reference/data-types#TypeSpec.Http.QueryOptions) `deepObject` is not a valid value (which kinda makes sense, since it's OpenAPI specific)
I coudln't find any other way to set `style` on an OpenAPI parameter.
### Reproduction
```tsp
model QueryParams {
@query(#{format: "deepObject"})
filter: Record;
}
```
### Checklist
- [X] Follow our [Code of Conduct](https://github.com/microsoft/typespec/blob/main/CODE_OF_CONDUCT.md)
- [X] Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/Microsoft/typespec/discussions).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
Contributor guide
Assessment
This issue has not been assessed yet.