Skip to content

[OpenAI Module] Remove unused json-path dependency in spring-ai-openai #2342

@foenye

Description

@foenye

In the spring-ai-openai-1.0.0-M6 module's POM (models/spring-ai-openai/pom.xml), there's a declared dependency:

    <dependency>
      <groupId>io.rest-assured</groupId>
      <artifactId>json-path</artifactId>
      <version>5.5.0</version>
      <scope>compile</scope>
    </dependency>

However, after searching through the project source code, I found no actual usage of classes from this dependency. This appears to be an unused dependency that brings in unnecessary transitive dependencies (including Groovy), resulting in:

  1. 6MB size increase in final package
  2. Potential dependency conflicts through transitive dependencies
  3. Increased attack surface for security vulnerabilities

Suggested Action:

  • Remove this unused dependency from the POM
  • Verify through dependency analysis tools (e.g., mvn dependency:analyze)

Impact:
This cleanup would help:
✅ Reduce final artifact size
✅ Simplify dependency tree
✅ Improve maintenance hygiene

Let me know if you need help preparing a PR for this change.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions