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
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
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
After (v2.8.6) - wrong output
Additional context
It seems to be working fine for java.time.LocalTime
The text was updated successfully, but these errors were encountered:
fleboulch
changed the title
Cannot add custom description and example for duration since v2.8.6
Cannot add custom description and example for java.time.duration since v2.8.6
Apr 10, 2025
fleboulch
changed the title
Cannot add custom description and example for java.time.duration since v2.8.6
Cannot add custom description and example for java.time.Duration since v2.8.6
Apr 10, 2025
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
Steps to reproduce the behavior:
java.time.Duration
property in a response or request obejct with a description and an example (cf the example snippet below)Example snippet
Expected behavior
Screenshots
Before (v2.8.5) - valid output

After (v2.8.6) - wrong output

Additional context
It seems to be working fine for
java.time.LocalTime
The text was updated successfully, but these errors were encountered: