Skip to content

[Storage] Control endpoint function generation, generate pageable operation without list prefix #939

@vincenttran-msft

Description

@vincenttran-msft

Hi all, we are very very close and rounding the corner here, but here are our two asks that were generated as a result of the APIView review.

Control endpoint function generation

It appears that currently, because this is defined in the typespec:

@server(
  "{url}",
  "The host name of the blob storage account, e.g. accountName.blob.core.windows.net",
  {
    @doc("The host name of the blob storage account, e.g. accountName.blob.core.windows.net")
    url: url,
  }
)

Then we consequently get this generated on all our clients:

/// Returns the Url associated with this client.
    pub fn endpoint(&self) -> &Url {
        &self.endpoint
    }

Either way, we just want granular control as we possibly we like to not call this endpoint.

Generate pageable operation without list prefix

In this typespec PR: Azure/azure-rest-api-specs#42771

After doing the necessary work to make it a pageable operation (i.e. @list etc,), it now properly is a pageable operation, but now automatically prefixes the name with list:

pub async fn find_blobs_by_tags() -> pub fn list_find_blobs_by_tags()
(GitHub PR)
Is there anyway we could control this behavior?

Thanks 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    CodeGenIssues that relate to code generationblocking-releaseBlocks release

    Type

    No type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions