Skip to content

Conversation

@yoshiori
Copy link
Member

@yoshiori yoshiori commented Sep 3, 2025

This PR removes the Scala dependency from the project by replacing mbknor-jackson-jsonschema_2.12 with victools/jsonschema-generator, a modern, actively maintained JSON Schema
generator.

Background

Old Library (mbknor-jackson-jsonschema):

  • Last meaningful activity: 2020 (4+ years ago)
  • Status: No longer maintained by original author, migrated to HubSpot fork
  • Scala dependency: Required Scala 2.12 runtime
  • JSON Schema version: Draft 4 (2013 specification)

New Library (victools/jsonschema-generator):

  • Latest release: v4.38.0 (March 24, 2025)
  • Activity: Actively maintained with regular releases and community engagement
  • Language: Pure Java (no Scala dependency)
  • JSON Schema version: Draft 7 compliance

OpenAI API Compatibility

The new implementation uses JSON Schema Draft 7, which is officially supported by OpenAI:

Swapped out an inactive library for a more actively maintained one. Also, updated it to use Draft 7, which is what the official implementation uses.
See: https://github.com/openai/openai-node/blob/1a3850112451e81840840c960bf6925753d4fac3/src/lib/jsonschema.ts#L51
@yoshiori yoshiori requested review from Konboi and Copilot September 3, 2025 07:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates from the deprecated Scala-based JSON schema generator to a modern Java library, removing the Scala dependency and updating to JSON Schema Draft 7 for better OpenAI compatibility.

Key changes:

  • Replace mbknor-jackson-jsonschema with victools/jsonschema-generator for active maintenance and Draft 7 support
  • Remove Scala dependency by switching to pure Java implementation
  • Update Gradle wrapper version to 8.11.1

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
ChatFunctionParametersSerializer.java Replace deprecated JSON schema generator with victools implementation
service/build.gradle Update dependencies to use new JSON schema libraries
gradle/wrapper/gradle-wrapper.properties Upgrade Gradle wrapper version
gradle/libs.versions.toml Add new library versions and remove old Scala dependency

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@Konboi Konboi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI failed due to LAUNCHABLE_TOKEN issue.
Let's check it after merge to the main

@Konboi Konboi merged commit c35d216 into launchableinc:main Sep 3, 2025
1 of 2 checks passed
@github-actions github-actions bot mentioned this pull request Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants