Skip to content
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

Order of query_params in REST transport is unstable #729

Closed
busunkim96 opened this issue Jan 11, 2021 · 0 comments · Fixed by #742
Closed

Order of query_params in REST transport is unstable #729

busunkim96 opened this issue Jan 11, 2021 · 0 comments · Fixed by #742
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@busunkim96
Copy link
Contributor

See https://github.com/googleapis/python-compute/pull/3/files for an example.

query_params = {
{%- for field in method.query_params %}
'{{ field|camel_case }}': request.{{ field }},
{%- endfor %}

I believe the sort_lines filter will stabilize the order.

{% filter sort_lines -%}
{% for service in api.services.values()|sort(attribute='name')
if service.meta.address.subpackage == api.subpackage_view -%}
from .services.{{ service.name|snake_case }} import {{ service.client_name }}
{% endfor -%}
{% endfilter -%}

@busunkim96 busunkim96 added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant