autorest icon indicating copy to clipboard operation
autorest copied to clipboard

Parameter 'ScriptQuery' in 'header' has content.<mediaType> which is not supported right now. Use schema instead.

Open mdaneri opened this issue 1 year ago • 4 comments

The problem is that the JSON is correct

"summary": "Return list of Scripts",
               "parameters": [{
                       "name": "ScriptQuery",
                       "in": "header",
                       "content": {
                           "application/json": {
                               "schema": {
                                   "$ref": "#/components/schemas/ScriptQuery"
                               }
                           }
                       }
                   }
               ]

I don't know why is reporting this issue

mdaneri avatar Sep 08 '23 23:09 mdaneri

Seems to be an issue of autorest.

dolauli avatar Sep 12 '23 03:09 dolauli

Autorest doesn’t support header, query parameters that are json(or other seeialization format) it only support the style options in openapi3

timotheeguerin avatar Sep 18 '23 15:09 timotheeguerin

Thanks for the reply It's a fundamental feature. When will it be implemented?

mdaneri avatar Sep 24 '23 19:09 mdaneri

Hi @mdaneri, this feature is not on our roadmap at the moment, autorest supports only a subset of OpenAPI3 and this is the first time we got a request for this.

As a workaround you can represent the parameter as a string and let the user serialize it.

timotheeguerin avatar Sep 25 '23 15:09 timotheeguerin