diff --git a/schemars/src/json_schema_impls/chrono.rs b/schemars/src/json_schema_impls/chrono.rs index 3a1731b5..29819ad6 100644 --- a/schemars/src/json_schema_impls/chrono.rs +++ b/schemars/src/json_schema_impls/chrono.rs @@ -64,5 +64,5 @@ macro_rules! formatted_string_impl { formatted_string_impl!(NaiveDate, "date"); formatted_string_impl!(NaiveDateTime, "partial-date-time"); -formatted_string_impl!(NaiveTime, "partial-date-time"); +formatted_string_impl!(NaiveTime, "time"); formatted_string_impl!(DateTime, "date-time", JsonSchema for DateTime); diff --git a/schemars/tests/expected/chrono-types.json b/schemars/tests/expected/chrono-types.json index e3e788f7..9f35de11 100644 --- a/schemars/tests/expected/chrono-types.json +++ b/schemars/tests/expected/chrono-types.json @@ -36,7 +36,7 @@ }, "naive_time": { "type": "string", - "format": "partial-date-time" + "format": "time" } } } \ No newline at end of file