Skip to content

4.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 26 Oct 19:29
· 3 commits to master since this release

First stable release of the 4.x line: Spring Boot 4.1, Jackson 3, RFC 9457 error responses and a rebuilt TypeScript client generator. Migration guide: https://commons-rest.rocketbase.io/migration-v4/

since 4.0.0-M5

  • upgraded to spring-boot 4.1.2, typescript-generator 4.2.1
  • openapi: still on the io.github.vpelikh springdoc fork (5.1.0 / swagger 4.0.6) - official springdoc 3.2.0 ships swagger-core 2.2.x and therefore jackson 2; swagger-core 3.0 (jackson 3) is on its release branch, the swap back to org.springdoc / io.swagger.core.v3 follows in 4.1 and is a pure coordinate change
  • @rocketbase/commons-rest-client dev tooling moved to vitest 5 - clears the tinypool / esbuild audit findings, runtime untouched
  • release workflow: tag is now created on the built commit (github.sha) instead of the default branch

4.x at a glance (vs 3.5.x)

  • requires spring-boot 4.x / spring framework 7 (java 17+ unchanged)
  • jackson 3: core + databind under tools.jackson.*, annotations stay at com.fasterxml.jackson.annotation; custom serializers move to ValueSerializer / ValueDeserializer
  • breaking error responses are problem details (RFC 9457, application/problem+json): message -> detail, new type / title / instance, fields stays as extension member - getMessage() bridge and @JsonAlias("message") ease the transition
  • nullability annotations switched to jspecify (org.jspecify.annotations.Nullable)
  • removed BaseRestResource / BaseController, QueryParamBuilder / QueryParamParser / UrlParts, EntityWithKeyValue / HasKeyValue / HasFirstAndLastName and the commons-rest-posthog module - see migration guide for replacements
  • BadRequestException stays first-class (old JAX-RS deprecation note dropped)
  • tsid: lowercase output, invalid ids raise TsidDecodeException (404) - opt-out via tsid.invalid.allowed=true; tsid-creator dependency removed (hypersistence-tsid only)
  • generator rebuilt on typescript-generator: zod schemas + @ZodSchema, react-query v5 hooks, enumValue support, custom-type-mappings / required-annotations properties, @NotEmpty + @NonNull variants mark fields required
  • breaking v5 infinite hooks with only a Pageable: useInfinite*(options) -> useInfinite*(filter, options)
  • regenerate every typescript client - folder layout unchanged, pre-M5 output does not compile
  • Nulls: notNull(Double), notNull(Collection), notEmpty(Collection/Map), two-level get(source, a, b)
  • ci: java matrix 17 / 21 / 25
  • new docs site: https://commons-rest.rocketbase.io