[FEATURE REQUEST] Support Parameter formats
- Dominant language
- No language data
- Stars
- 79
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Description
@raveclassic commented on [Fri Nov 15 2019](https://github.com/asyncapi/asyncapi/issues/294)
**Is your feature request related to a problem? Please describe.**
Currently `ws` channel bindings allow you to define some query/header parameters: https://github.com/asyncapi/bindings/tree/master/websockets#channel-binding-object
However this solution lacks flexibility and power in comparison to [swagger-2](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#parameter-object) or [openapi-3](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#parameter-object) parameters. Especially in case of non-primitive parameters - there's no way to define how such parameters should be serialized. Swagger-2 spec has a `collectionFormat` and `openapi-3` - `style`/`explode` for that.
**Can't it be tackled using specification extensions?**
IMO this should be part of the core spec.
**Describe the solution you'd like**
The best would be to replicate `openapi-3` approach to describe parameters using `in`/`style`/`explode` (etc.) properties.
**Describe alternatives you've considered**
Not sure there're some which would allow the same level of flexibility and consistency.
**Additional context**
I'm writing a codegen tool based on `swagger-2`/`openapi-3`/`asyncapi-2` specs which automatically handles connections that's why I need a solution to fully handle parameters.
Contributor guide
Research direction
Start with the WebSockets Channel Binding Object specification and compare its query/header parameter definitions with the linked OpenAPI 3 Parameter Object reference. Clarify the supported parameter serialization properties and their scope with maintainers, then update the binding specification and examples so non-primitive parameters can be described consistently.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100