Skip to content

Conversation

@kristapratico
Copy link
Contributor

Resolves #19802

  • Renamed translated_before and translated_after kwargs to created_before and created_after, respectively,
    for list_all_document_statuses. Reasoning is that documents which failed to translate will show up in the query and saying "translated_xx" is not totally correct in this case. Also aligns with .NET naming.
  • Renamed order_by sorting query option createdDateTimeUtc to created_on for list_all_translation_statuses and
    list_all_document_statuses. So people can map this sorting query option to the property on the result model.
  • Updated tests and enabled the mixed filters tests to test when statuses == "Succeeded" since service fixed this bug recently.

def convert_order_by(order_by):
# type: (Optional[List[str]]) -> Optional[List[str]]
if order_by:
order_by = [order.replace("created_on", "createdDateTimeUtc") for order in order_by]
Copy link
Member

Choose a reason for hiding this comment

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

would this work if the user passes any comb of upper case and lower case for created_on like i.e. Created_on?
not sure if this is a scenario, but asking in case it is important in Python

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm this wouldn't be proper snake case so I wouldn't consider it a scenario. I think I'll let the service validate here, they do send back an error if the query param is not supported.

@kristapratico kristapratico merged commit dde54e1 into Azure:main Jul 21, 2021
@kristapratico kristapratico deleted the align-filters branch July 21, 2021 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[translation] align on filtering naming/design

3 participants