Conversation
|
@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. |
justin-tay
left a comment
There was a problem hiding this comment.
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 own ObjectMapper to parse it to JsonNode, 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 like public static Optional<SpecificationVersion> fromSchemaNode(JsonNode) was added to SpecificationVersion but would like to know exactly what their use case is and if there is a better way to solve their use case.
|
@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? |
|
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.