Skip to content

unsettable query params #445

Closed
Closed
@ctaggart

Description

@ctaggart

The x-ms-paths support query routing with query params. This affects several new data-plane generated services.

In azure_svc_blobstorage, service::get_account_info should not have restype: &str, comp: &str params.

pub async fn get_account_info(
operation_config: &crate::OperationConfig,
restype: &str,
comp: &str,
x_ms_version: &str,
) -> std::result::Result<(), get_account_info::Error> {
let http_client = operation_config.http_client();
let url_str = &format!("{}/?restype=account&comp=properties", operation_config.base_path(),);
let mut url = url::Url::parse(url_str).map_err(get_account_info::Error::ParseUrlError)?;
let mut req_builder = http::request::Builder::new();
req_builder = req_builder.method(http::Method::GET);
if let Some(token_credential) = operation_config.token_credential() {
let token_response = token_credential
.get_token(operation_config.token_credential_resource())
.await
.map_err(get_account_info::Error::GetTokenError)?;
req_builder = req_builder.header(http::header::AUTHORIZATION, format!("Bearer {}", token_response.token.secret()));
}
url.query_pairs_mut().append_pair("restype", restype);
url.query_pairs_mut().append_pair("comp", comp);
req_builder = req_builder.header("x-ms-version", x_ms_version);

specification\storage\data-plane\Microsoft.BlobStorage\preview\2020-10-02\blob.json

    "/?restype=account&comp=properties": {
      "get": {
        "tags": [
          "service"
        ],
        "operationId": "Service_GetAccountInfo",

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue points to a problem in the data-plane of the library.CodeGenIssues that relate to code generation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions