Request for a Simplified Swagger Parser with Minimal Dependencies
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
No files, tests, or entry points are named. Start by auditing the project's dependency graph and parser components; implementation would require an agreed scope for dependency removal, reflection changes, and modernization before completion can be measured.
Written by the indexing model from the issue text.
Description
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:
- 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.jakartaandjakarta.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?
- Core Simplicity Missing: For a YAML/JSON parser, dependencies like
SnakeYAMLandObjectMapperare understandable, but even these come with their own CVE risks. However, the other dependencies seem unnecessary for the core functionality. - 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.
- Dominant language
- Java
- Stars
- 868
- Forks
- 560
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from swagger-api/swagger-parser
-
InlineModelResolver.uniqueName throws StringIndexOutOfBoundsException for titles starting with a separator (camelCaseFlattenNaming)Possibly taken @arimu1 claimed this 37 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
swagger-api/swagger-parser#2386 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
swagger-api/swagger-parser#2168 ·
-
ResolveFully fails on internal references when the initial spec is read from a file URLPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
swagger-api/swagger-parser#1922 · 2 comments · 1 reaction ·
-
[Bug]: `ResolverFully` does not process OAS 3.1 combinators and skips nested OAS 3.1 schema-valued keywordsPossibly taken A pull request linked to this issue is open or already merged. OpenBug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
swagger-api/swagger-parser#2403 ·
-
[Bug]: Regression: resolveFully fails when components key does not match external file basenamePossibly taken @goutamadwant claimed this 31 days ago. OpenBug
Difficulty 4/5 3-5 days Newbie friendliness 58/100
swagger-api/swagger-parser#2399 · 3 comments ·
All issues in swagger-api/swagger-parser
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
area/docs
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
BoxChart rejects valid List.of data with NullPointerExceptionPossibly taken @PHJ2000 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100