Skip to content

feat: include YearMonth in SimpleTypeModule.forPrimitiveAndAdditionalTypes()#585

Merged
CarstenWickner merged 1 commit into
victools:mainfrom
SAY-5:say5-include-yearmonth-562
May 21, 2026
Merged

feat: include YearMonth in SimpleTypeModule.forPrimitiveAndAdditionalTypes()#585
CarstenWickner merged 1 commit into
victools:mainfrom
SAY-5:say5-include-yearmonth-562

Conversation

@SAY-5

@SAY-5 SAY-5 commented May 21, 2026

Copy link
Copy Markdown
Contributor

Resolves #562.

SimpleTypeModule.forPrimitiveAndAdditionalTypes() mapped LocalDate, LocalDateTime, ZonedDateTime, OffsetDateTime, Instant, LocalTime, OffsetTime, Duration, Period, ZoneId, etc. but not java.time.YearMonth. Jackson's JavaTimeModule serializes YearMonth as a string (e.g. "2025-10"), so the generated schema reported object instead of string.

YearMonth is added alongside ZoneId via withStringType, since RFC3339 does not define a year-month standard format. Parameterized test entry added to SchemaGeneratorSimpleTypesTest.

@sonarqubecloud

Copy link
Copy Markdown

@CarstenWickner

Copy link
Copy Markdown
Member

Thank you for the contribution @SAY-5 😃

@CarstenWickner CarstenWickner enabled auto-merge (squash) May 21, 2026 09:15
@CarstenWickner CarstenWickner merged commit 0ac5010 into victools:main May 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add java.util.YearMonth to SimpleTypeModule.forPrimitiveAndAdditionalTypes()

2 participants