add string duration -> timedelta #35

Merged
fredsonnenwald merged 1 commits from add-duration into main 2025-08-19 02:05:08 +00:00
fredsonnenwald commented 2025-08-08 11:44:43 +00:00 (Migrated from github.com)
BaseModel.model_json_schema()

with a timedelta field generates JSON with

    format: 'duration',
    type: 'string'

which when fed back into

SchemaConverter.build()

raises

ValueError: Unsupported string format: duration

This PR adds duration -> timedelta.

```python BaseModel.model_json_schema() ``` with a `timedelta` field generates JSON with ``` format: 'duration', type: 'string' ``` which when fed back into ```python SchemaConverter.build() ``` raises ``` ValueError: Unsupported string format: duration ``` This PR adds `duration` -> `timedelta`.
codecov-commenter commented 2025-08-19 02:03:29 +00:00 (Migrated from github.com)

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

:warning: Please install the !['codecov app svg image'](https://github.com/codecov/engineering-team/assets/152432831/e90313f4-9d3a-4b63-8b54-cfe14e7ec20d) to ensure uploads and comments are reliably processed by Codecov. ## [Codecov](https://app.codecov.io/gh/HideyoshiNakazone/jambo/pull/35?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vitor+Hideyoshi) Report :white_check_mark: All modified and coverable lines are covered by tests. :loudspeaker: Thoughts on this report? [Let us know!](https://github.com/codecov/feedback/issues/255)
HideyoshiNakazone (Migrated from github.com) approved these changes 2025-08-19 02:04:55 +00:00
Sign in to join this conversation.