Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Request for a Simplified Swagger Parser with Minimal Dependencies

Đang mở
#2,148 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
tooling

Hướng nghiên cứu

Không có tệp, bài kiểm thử hoặc điểm vào nào được nêu tên. Hãy bắt đầu bằng việc audit dependency graph và các thành phần parser của dự án; việc triển khai sẽ yêu cầu thống nhất phạm vi cho việc loại bỏ dependency, các thay đổi về reflection và hiện đại hóa trước khi có thể đo lường mức độ hoàn thành.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Issue Description:

Dear Team,

I am using the Swagger parser, and while its functionality is appreciated, the sheer number of dependencies introduced by the library is problematic. Below are my observations and concerns:

  1. Excessive Dependencies: The library adds over 50 additional dependencies to my project. Some examples:
  • org.slf4j: Not necessary for a simple parser. It clutters logs with irrelevant prompts for adding more dependencies.
  • com.github.java-json-tools: This library appears to be inactive.
  • com.sun.activation.jakarta and jakarta.xml.bind: Outdated and unreliable with newer Java versions, especially in stricter environments.
  • org.mozilla:rhino: JavaScript? What?
  • apache.httpclient: The use case here is unclear.
  • com.google.guava, org.apache.commons:commons-lang3, commons-io: Why are these required for basic parsing?
  1. Core Simplicity Missing: For a YAML/JSON parser, dependencies like SnakeYAML and ObjectMapper are understandable, but even these come with their own CVE risks. However, the other dependencies seem unnecessary for the core functionality.
  2. Reflections and Overhead: The library’s reliance on reflection further complicates its use and limits performance optimization.

Proposal:

  • Simplify the Library: Rebuild the parser using plain Java, focusing on minimalism. Most parsing tasks can be achieved without additional libraries.
  • Reduce Dependencies: Restrict dependencies to absolute essentials like SnakeYAML and ObjectMapper, provided their risks are mitigated.
  • Modernize: Remove outdated or dead dependencies like com.github.java-json-tools.
  • Avoid Reflection: Replace reflective mechanisms with straightforward, efficient alternatives.

This library has great potential but could be significantly better with these improvements. My goal is not to replace it, but to help make it a cleaner, more reliable tool for everyone.

Looking forward to your thoughts and potential roadmap for addressing these issues.

Ngôn ngữ chính
Java
Star
868
Fork
560
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của swagger-api/swagger-parser

Tất cả issue của swagger-api/swagger-parser

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.