Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to specify serialization format for model type path/query parameters ? #2476

Open
qiaozha opened this issue Sep 25, 2023 · 0 comments
Open
Labels
design:needed A design request has been raised that needs a proposal triaged:core
Milestone

Comments

@qiaozha
Copy link
Member

qiaozha commented Sep 25, 2023

In OpenAPI3, it has specify that both path/query parameters/headers can be primitive types, arrays and objects. https://swagger.io/docs/specification/describing-parameters

But I am not sure how to serialize the object path/query parameter as the collectionFormat is not enough for us.

For example, objects can be serialized as:

form – /points?color=R,100,G,200,B,150 or /points?R=100&G=200&B=150, depending on the explode keyword, 
deepObject – /points?color[R]=100&color[G]=200&color[B]=150

Also, there's label and matrix style of path parameter for object and more serialization details can be found here, not sure how to specify those.

See original customer issue from Azure/autorest.typescript#2033

Items to take into account:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design:needed A design request has been raised that needs a proposal triaged:core
Projects
None yet
Development

No branches or pull requests

2 participants