GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Regression with java.time.Duration, LocalTime and OffsetTime (since 3.1.1) · Issue #3442 · springdoc/springdoc-openapi Closed DescriptionDescribe the bugSince 3.1.1 (#3351:
Adding To ReproduceVersions:
Sample code: // Request body / response model public record Request( @Schema(description = "Frequency", example = "PT2H") Duration frequency, @Schema(description = "Times (UTC)", example = """ ["00:00", "06:00"] """) List<LocalTime> fixedTimesFrequency) {} // Query parameters @ParameterObject public record DailyRequest( @Schema(description = "Time window to look back on, as an ISO-8601 duration", example = "P7D", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull Duration range) {} @RestController class DemoController { @PostMapping("/foo") void create(@RequestBody Request request) {} @GetMapping("/daily") void daily(DailyRequest request) {} } Actual behaviorDiff of the generated spec between 3.1.0 and 3.2.0: Model properties: frequency:
type: string
description: "Frequency"
- example: PT2H
+ format: duration
fixedTimesFrequency:
type: array
items:
type: string
- example: "[\"00:00\",\"06:00\"]"
+ format: time-local The same happens on response models (e.g. a
- name: range
in: query
required: true
schema:
type: string
description: "Time window to look back on, as an ISO-8601 duration"
- example: P7D
+ format: duration
+ example: 604800.000000000
example: P7D
Expected behaviorThe frequency: type: string format: duration example: PT2H schema: type: string format: duration example: P7D Additional context
Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |