Skip to content

Conversation

@iscai-msft
Copy link
Contributor

@iscai-msft iscai-msft commented Nov 9, 2020

fixes #812

@iscai-msft iscai-msft requested review from 00Kai0 and lmazuel November 9, 2020 15:58
kwargs.pop('content_type', None)

def get_long_running_output(pipeline_response):
response_headers = {}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked out these missing response headers, and I think we were incorrectly generating them in the first place. Basically what happened was that we were setting the 202 response as the final deserialization, when it should've been the 200 response

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked all of the response headers where we no longer generate, and this is the case, @lmazuel what're your thoughts? I don't think this is a breaking change since it's really a bug fix, and all of the response headers we exposes before were empty

if len(response_types) > 1:
responses_with_bodies = [r for r in self.responses if r.has_body]
response = None
if len(responses_with_bodies) > 1:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep condition # response schemas

…into lro_200

* 'autorestv3' of https://github.com/Azure/autorest.python:
  add tests for empty first page (#824)
  access error model from operation group's model property (#819)
@iscai-msft iscai-msft merged commit 123bfaa into autorestv3 Nov 11, 2020
@iscai-msft iscai-msft deleted the lro_200 branch November 11, 2020 17:36
iscai-msft added a commit that referenced this pull request Nov 11, 2020
…into directive_generate_item_paged

* 'autorestv3' of https://github.com/Azure/autorest.python:
  Update package.json
  Update ChangeLog.md
  include generation and tests for no operations (#802)
  fix lro response setting (#813)
  add tests for empty first page (#824)
  access error model from operation group's model property (#819)
iscai-msft added a commit that referenced this pull request Nov 13, 2020
…into paging_separate_operations

* 'autorestv3' of https://github.com/Azure/autorest.python:
  Update package.json
  Update ChangeLog.md
  add support for custom pollers and pagers (#821)
  Update package.json
  Update ChangeLog.md
  include generation and tests for no operations (#802)
  fix lro response setting (#813)
  add tests for empty first page (#824)
  access error model from operation group's model property (#819)
iscai-msft added a commit that referenced this pull request Nov 23, 2020
…into multiapi_diff_signatures

* 'autorestv3' of https://github.com/Azure/autorest.python: (25 commits)
  Update package.json
  Update ChangeLog.md
  add support for custom pollers and pagers (#821)
  Update package.json
  Update ChangeLog.md
  include generation and tests for no operations (#802)
  fix lro response setting (#813)
  add tests for empty first page (#824)
  access error model from operation group's model property (#819)
  Update package.json
  Update ChangeLog.md
  set discriminator value if readonly (#815)
  regen to get testserver updates (#814)
  allow services with no operations to generate (#801)
  Update package.json
  Update ChangeLog.md
  set default value for properties if x-ms-client-default set (#798)
  Update package.json
  Update ChangeLog.md
  add support for --python.debugger (#790)
  ...
iscai-msft added a commit that referenced this pull request Nov 23, 2020
…into add_typing_imports

* 'autorestv3' of https://github.com/Azure/autorest.python:
  Update package.json
  Update ChangeLog.md
  add support for custom pollers and pagers (#821)
  Update package.json
  Update ChangeLog.md
  include generation and tests for no operations (#802)
  fix lro response setting (#813)
  add tests for empty first page (#824)
  access error model from operation group's model property (#819)
  Update package.json
  Update ChangeLog.md
  set discriminator value if readonly (#815)
  regen to get testserver updates (#814)
  allow services with no operations to generate (#801)
  Update package.json
  Update ChangeLog.md
  set default value for properties if x-ms-client-default set (#798)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codegen Error in generating iothub track2

3 participants