You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feat: (Rust) Added chrono (date/date-time) support for Rust Generator [resolves#19319] (#23451)
* Functional Change
* Updated tests to now use chrono
* Added no chrono test case
* Docs update
* Review change from `chrono::NaiveDateTime` to `chrono::DateTime<chrono::FixedOffset> ``
* Review change from `chrono::NaiveDateTime` to `chrono::DateTime<chrono::FixedOffset>`
* Doc update
Copy file name to clipboardExpand all lines: docs/generators/rust.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
34
34
|supportTokenSource|If set, add support for google-cloud-token. This option is for 'reqwest' and 'reqwest-trait' library only and requires the 'supportAsync' option||false|
35
35
|topLevelApiClient|Creates a top level `Api` trait and `ApiClient` struct that contain all Apis. This option is for 'reqwest-trait' library only||false|
36
36
|useBonBuilder|Use the bon crate for building parameter types. This option is for the 'reqwest-trait' library only||false|
37
+
|useChrono|If set, use chrono to represent date time objects (`chrono::NaiveDate` for `date` and `chrono::DateTime<chrono::FixedOffset>>` for `date-time`)||true|
37
38
|useSerdePathToError|If set, use the serde_path_to_error library to enhance serde error messages. This option is for 'reqwest' and 'reqwest-trait' library only||false|
38
39
|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.||false|
39
40
|withAWSV4Signature|whether to include AWS v4 signature support||false|
cliOptions.add(newCliOption(SUPPORT_TOKEN_SOURCE, "If set, add support for google-cloud-token. This option is for 'reqwest' and 'reqwest-trait' library only and requires the 'supportAsync' option", SchemaTypeUtil.BOOLEAN_TYPE)
218
226
.defaultValue(Boolean.FALSE.toString()));
227
+
cliOptions.add(newCliOption(USE_CHRONO, "If set, use chrono to represent date time objects (`chrono::NaiveDate` for `date` and `chrono::DateTime<chrono::FixedOffset>>` for `date-time`)", SchemaTypeUtil.BOOLEAN_TYPE)
228
+
.defaultValue(Boolean.TRUE.toString()));
219
229
cliOptions.add(newCliOption(SUPPORT_MULTIPLE_RESPONSES, "If set, return type wraps an enum of all possible 2xx schemas. This option is for 'reqwest' and 'reqwest-trait' library only", SchemaTypeUtil.BOOLEAN_TYPE)
0 commit comments