-
Notifications
You must be signed in to change notification settings - Fork 62
vendor request conversion #1048
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8c13a75
vendor request conversion and regenerate
iscai-msft 1cfd32e
regenerate more
iscai-msft aee23d9
regenerate with vendor file
iscai-msft fe69505
have LLC LRO tests convert requests
iscai-msft aca3635
vendor format_url_section
iscai-msft c3f6005
fix relative path import for request builders with operation groups
iscai-msft 2e9f7b2
fix request builder imports for ones embedded in mixins
iscai-msft 2b8b347
get rid of unnecessary import in config
iscai-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| {{ code_model.options['license_header'] }} | ||
|
|
||
| {{ imports }} | ||
|
|
||
| {% if code_model.need_request_converter %} | ||
| def _convert_request(request, files=None): | ||
| data = request.content if not files else None | ||
| request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) | ||
| if files: | ||
| request.set_formdata_body(files) | ||
| return request | ||
| {% endif %} | ||
| {% if code_model.need_format_url %} | ||
|
|
||
| def _format_url_section(template, **kwargs): | ||
| components = template.split("/") | ||
| while components: | ||
| try: | ||
| return template.format(**kwargs) | ||
| except KeyError as key: | ||
| formatted_components = template.split("/") | ||
| components = [ | ||
| c for c in formatted_components if "{{{}}}".format(key.args[0]) not in c | ||
| ] | ||
| template = "/".join(components) | ||
| {% endif %} |
12 changes: 7 additions & 5 deletions
12
.../custompollerpager/operations/__init__.py → ...ed/azure/key/credential/sample/_vendor.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,15 @@ | ||
| # coding=utf-8 | ||
| # -------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from ._paging_operations import PagingOperations | ||
| from azure.core.pipeline.transport import HttpRequest | ||
|
|
||
| __all__ = [ | ||
| 'PagingOperations', | ||
| ] | ||
| def _convert_request(request, files=None): | ||
| data = request.content if not files else None | ||
| request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) | ||
| if files: | ||
| request.set_formdata_body(files) | ||
| return request | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 7 additions & 5 deletions
12
...tompollerpager/aio/operations/__init__.py → ...c/generated/azure/basic/sample/_vendor.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,15 @@ | ||
| # coding=utf-8 | ||
| # -------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from ._paging_operations import PagingOperations | ||
| from azure.core.pipeline.transport import HttpRequest | ||
|
|
||
| __all__ = [ | ||
| 'PagingOperations', | ||
| ] | ||
| def _convert_request(request, files=None): | ||
| data = request.content if not files else None | ||
| request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) | ||
| if files: | ||
| request.set_formdata_body(files) | ||
| return request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some weird diffs going on here. Basically, I realized I had a duplicate out-of-date
CustomPollerPagerin my version tolerant folder, so I deleted it, which for some reason has caused these weird diffs