-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Make RFC compliance default #25098
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
base: master
Are you sure you want to change the base?
Make RFC compliance default #25098
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -237,6 +237,7 @@ class Configuration: | |
| :param client_side_validation: Enable client-side validation. Default True. | ||
| :param socket_options: Options to pass down to the underlying urllib3 socket. | ||
| :param datetime_format: Datetime format string for serialization. | ||
| If None, datetime.isoformat() is used, which is RFC 3339 compliant. | ||
| :param date_format: Date format string for serialization. | ||
|
|
||
| {{#hasAuthMethods}} | ||
|
|
@@ -373,7 +374,7 @@ conf = {{{packageName}}}.Configuration( | |
| safe_chars_for_path_param: str='', | ||
| client_side_validation: bool=True, | ||
| socket_options: Optional[Any]=None, | ||
| datetime_format: str="{{{datetimeFormat}}}", | ||
| datetime_format: Optional[str]={{#datetimeFormat}}"{{{.}}}"{{/datetimeFormat}}{{^datetimeFormat}}None{{/datetimeFormat}}, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The default Prompt for AI agents |
||
| date_format: str="{{{dateFormat}}}", | ||
| *, | ||
| debug: Optional[bool] = None, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -181,6 +181,7 @@ class Configuration: | |
| :param client_side_validation: Enable client-side validation. Default True. | ||
| :param socket_options: Options to pass down to the underlying urllib3 socket. | ||
| :param datetime_format: Datetime format string for serialization. | ||
| If None, datetime.isoformat() is used, which is RFC 3339 compliant. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Prompt for AI agents |
||
| :param date_format: Date format string for serialization. | ||
|
|
||
| :Example: | ||
|
|
@@ -233,7 +234,7 @@ def __init__( | |
| safe_chars_for_path_param: str='', | ||
| client_side_validation: bool=True, | ||
| socket_options: Optional[Any]=None, | ||
| datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z", | ||
| datetime_format: Optional[str]=None, | ||
| date_format: str="%Y-%m-%d", | ||
| *, | ||
| debug: Optional[bool] = None, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -573,7 +573,9 @@ def _test_query_datetime_date_string_serialize( | |
| _query_params.append( | ||
| ( | ||
| 'datetime_query', | ||
| datetime_query.strftime( | ||
| datetime_query.isoformat() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Naive Prompt for AI agents |
||
| if self.api_client.configuration.datetime_format is None | ||
| else datetime_query.strftime( | ||
| self.api_client.configuration.datetime_format | ||
| ) | ||
| ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -181,6 +181,7 @@ class Configuration: | |
| :param client_side_validation: Enable client-side validation. Default True. | ||
| :param socket_options: Options to pass down to the underlying urllib3 socket. | ||
| :param datetime_format: Datetime format string for serialization. | ||
| If None, datetime.isoformat() is used, which is RFC 3339 compliant. | ||
| :param date_format: Date format string for serialization. | ||
|
|
||
| :Example: | ||
|
|
@@ -233,7 +234,7 @@ def __init__( | |
| safe_chars_for_path_param: str='', | ||
| client_side_validation: bool=True, | ||
| socket_options: Optional[Any]=None, | ||
| datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z", | ||
| datetime_format: Optional[str]=None, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The new default does not guarantee RFC 3339 for naive Prompt for AI agents |
||
| date_format: str="%Y-%m-%d", | ||
| *, | ||
| debug: Optional[bool] = None, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -181,6 +181,7 @@ class Configuration: | |
| :param client_side_validation: Enable client-side validation. Default True. | ||
| :param socket_options: Options to pass down to the underlying urllib3 socket. | ||
| :param datetime_format: Datetime format string for serialization. | ||
| If None, datetime.isoformat() is used, which is RFC 3339 compliant. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Naive Prompt for AI agents |
||
| :param date_format: Date format string for serialization. | ||
|
|
||
| :Example: | ||
|
|
@@ -290,7 +291,7 @@ def __init__( | |
| safe_chars_for_path_param: str='', | ||
| client_side_validation: bool=True, | ||
| socket_options: Optional[Any]=None, | ||
| datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z", | ||
| datetime_format: Optional[str]=None, | ||
| date_format: str="%Y-%m-%d", | ||
| *, | ||
| debug: Optional[bool] = None, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -181,6 +181,7 @@ class Configuration: | |
| :param client_side_validation: Enable client-side validation. Default True. | ||
| :param socket_options: Options to pass down to the underlying urllib3 socket. | ||
| :param datetime_format: Datetime format string for serialization. | ||
| If None, datetime.isoformat() is used, which is RFC 3339 compliant. | ||
| :param date_format: Date format string for serialization. | ||
|
|
||
| :Example: | ||
|
|
@@ -290,7 +291,7 @@ def __init__( | |
| safe_chars_for_path_param: str='', | ||
| client_side_validation: bool=True, | ||
| socket_options: Optional[Any]=None, | ||
| datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z", | ||
| datetime_format: Optional[str]=None, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Naive Prompt for AI agents |
||
| date_format: str="%Y-%m-%d", | ||
| *, | ||
| debug: Optional[bool] = None, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -181,6 +181,7 @@ class Configuration: | |
| :param client_side_validation: Enable client-side validation. Default True. | ||
| :param socket_options: Options to pass down to the underlying urllib3 socket. | ||
| :param datetime_format: Datetime format string for serialization. | ||
| If None, datetime.isoformat() is used, which is RFC 3339 compliant. | ||
| :param date_format: Date format string for serialization. | ||
|
|
||
| :Example: | ||
|
|
@@ -290,7 +291,7 @@ def __init__( | |
| safe_chars_for_path_param: str='', | ||
| client_side_validation: bool=True, | ||
| socket_options: Optional[Any]=None, | ||
| datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z", | ||
| datetime_format: Optional[str]=None, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The Prompt for AI agents |
||
| date_format: str="%Y-%m-%d", | ||
| *, | ||
| debug: Optional[bool] = None, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -181,6 +181,7 @@ class Configuration: | |
| :param client_side_validation: Enable client-side validation. Default True. | ||
| :param socket_options: Options to pass down to the underlying urllib3 socket. | ||
| :param datetime_format: Datetime format string for serialization. | ||
| If None, datetime.isoformat() is used, which is RFC 3339 compliant. | ||
| :param date_format: Date format string for serialization. | ||
|
|
||
| :Example: | ||
|
|
@@ -290,7 +291,7 @@ def __init__( | |
| safe_chars_for_path_param: str='', | ||
| client_side_validation: bool=True, | ||
| socket_options: Optional[Any]=None, | ||
| datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z", | ||
| datetime_format: Optional[str]=None, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The new default does not produce RFC 3339 for naive datetimes: Prompt for AI agents |
||
| date_format: str="%Y-%m-%d", | ||
| *, | ||
| debug: Optional[bool] = None, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -187,6 +187,7 @@ class Configuration: | |
| :param client_side_validation: Enable client-side validation. Default True. | ||
| :param socket_options: Options to pass down to the underlying urllib3 socket. | ||
| :param datetime_format: Datetime format string for serialization. | ||
| If None, datetime.isoformat() is used, which is RFC 3339 compliant. | ||
| :param date_format: Date format string for serialization. | ||
|
|
||
| :Example: | ||
|
|
@@ -298,7 +299,7 @@ def __init__( | |
| safe_chars_for_path_param: str='', | ||
| client_side_validation: bool=True, | ||
| socket_options: Optional[Any]=None, | ||
| datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z", | ||
| datetime_format: Optional[str]=None, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The new default accepts naive datetimes, but Prompt for AI agents |
||
| date_format: str="%Y-%m-%d", | ||
| *, | ||
| debug: Optional[bool] = None, | ||
|
|
||
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.
P2: Naive datetime arguments reach this branch and
isoformat()omits their offset, so the default still emits a non-RFC 3339 value. Require timezone-aware datetimes before serialization.Prompt for AI agents