- Notifications
You must be signed in to change notification settings - Fork333
fixes #1206 move the SpecificationVersionDetector to main from test#1220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Conversation
stevehu commentedDec 17, 2025
@sschuberth, This PR targets the master branch and will be backported to the 2.x branch once it has been reviewed and approved. Please let us know if you encounter any issues. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
justin-tay left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I actually don't think this is a good idea particularly as some of what it is doing like determining the version based on the file path seems rather odd to be exposing to users.
I'm not sure if the users really know what they are doing as the dialect is already automatically detected from$schema. A lot of people use their ownObjectMapper to parse it toJsonNode, and this is rather unnecessary, particularly if you want to have line numbers as the library needs to use it's own to do so.
I don't mind if something likepublic static Optional<SpecificationVersion> fromSchemaNode(JsonNode) was added toSpecificationVersion but would like to know exactly what their use case is and if there is a better way to solve their use case.
stevehu commentedDec 17, 2025
@justin-tay, I completely agree with you. I do not think this is the right approach; however, it was our mistake to introduce this class earlier, and some users are already relying on it. Removing it abruptly would break their code. One option is to restore it in the 2.x branch and mark it as deprecated, while removing it from the master branch. What are your thoughts on this approach? |
justin-tay commentedDec 18, 2025
While the approach sounds reasonable, the upgrade to 2.x was already a rather large breaking change. Without resolving the actual underlying issue, this will just come up again for 3.x. |
No description provided.