Open maisarissi opened 2 years ago
AutoREST should also provide support for arbitrary query parameters. i.e.,
$QueryParameter = @{"sortBy" = "createdDate"}
Get-User -QueryParameter @($QueryParameter)
If the support for the header is not declared in the API description then runtime API calling tools will never know that it is possible. e.g. Copilots. Therefore, we should always have supported headers described. Allowing arbitrary headers is workaround that will prevent us from getting complete API descriptons.
The current AutoREST design requires the supported headers to be explicitly declared in the OpenAPI document as header parameters - https://swagger.io/docs/specification/describing-parameters/#header-parameters.
Some APIs such as https://docs.microsoft.com/en-us/graph/api/plannertaskdetails-update?view=graph-rest-1.0&tabs=http#request-headers require the caller to set a request header. Currently, there is no option for one to set request headers to the generated PS cmdlets when making a call.