Closed
Description
Describe the bug
I cannot anymore override description and example for java.time.Duration
since v2.8.6.
It's related to the native support of LocalTime, Duration, ... (#2938).
To Reproduce
version
java version: 21
springboot version: 3.4.4
Springdoc OpenAPI version: org.springdoc:springdoc-openapi-starter-common:2.8.6
springdoc.api-docs.version: openapi_3_0
Steps to reproduce the behavior:
- Use v2.8.5 and introduce a
java.time.Duration
property in a response or request obejct with a description and an example (cf the example snippet below) - Generate the yaml file
- Bump to v2.8.6
- Regenerate the yaml file
- Observe the diffs
Example snippet
@Schema(
description = "Frequency to trigger a run (ISO 8601 duration format). If this field is filled, fixedTimesFrequency is null",
example = "PT2H"
)
Duration frequency,
Expected behavior
- I should be able to have a custom description and example
Screenshots
Before (v2.8.5) - valid output
Additional context
It seems to be working fine for java.time.LocalTime
Metadata
Metadata
Assignees
Labels
No labels