-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Labels
customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
I am trying to generate a python SDK from openapi swagger files and some of my APIs are marked with "x-ms-long-running-operation". For most of the cases this works fine, and the generated code works, but one of the APIs has a response type of "file":
"responses": {
"200": {
"description": "...",
"schema": {
"type": "file"
}
},
...In this case, the code is generated incorrectly and calling it results in the following error:
deserialized = response.iter_bytes()
^^^^^^^^
NameError: name 'response' is not definedLooking at the generated code, it seems there is a slight naming problem in the generated deserialization callback:
def get_long_running_output(pipeline_response):
deserialized = response.iter_bytes()
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
return deserializedI believe in the above code, response should be pipeline_response, and when I manually change this after the generation the code works and method returns the correct value.
Metadata
Metadata
Assignees
Labels
customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that