Skip to content

Vanilla, sync-over-async response type conversion bug #3067

@XiaofeiCao

Description

@XiaofeiCao

When:

  1. Vanilla
  2. Content-Type: text/powershell
  3. response is binary
  4. async-stack

XXWithResponse method implementation be:

// async method
public Mono<Response<Flux<ByteBuffer>>> putWithBinaryJsonRequestAndBinaryTextResponseWithResponseAsync(String runbookName,
        Flux<ByteBuffer> binaryContent, long contentLength, Context context) {
  // ignore implementation
}

//sync method
public Response<BinaryData> putWithBinaryJsonRequestAndBinaryTextResponseWithResponse(String runbookName,
    Flux<ByteBuffer> binaryContent, long contentLength, Context context) {
    return putWithBinaryJsonRequestAndBinaryTextResponseWithResponseAsync(runbookName, binaryContent, contentLength,
        context).block();
}

There's response type conversion bug(Response<Flux<ByteBuffer>> -> Response<BinaryData>).

Not urgent, as current vanilla generated SDKs(storage, etc) are on sync-stack already, and I haven't seen such case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions