Fix for handling nested patch level version upgrade.
Fixes #157 (closed). from @akumar290
The current schema validation works with respect to neighboring versions that exists in the system. For example, if the system started evolving from osdu:wks:wellbore:1.0.0 and there does not exist any other neighbor, in that case any changes to this schema kind is possible ie you can add or remove any attribute from this kind.
On the other hand, if system already has below kinds:
- osdu:wks:wellbore:1.0.1
- osdu:wks:wellbore:1.0.4
and user wants to introduce a new version osdu:wks:wellbore:1.0.3, in that case the comparison of 1.0.3 will happen with both versions ie 1.0.1 and 1.0.4.
So, it is not true that user cannot make version lower than what already exists in the system.
Coming to the original root cause of the issue. The validation of schema service fails when there is $ref change at second level. For example:
This issue has previously occurred in the past but at that time the fix was applied only for the MINOR version level
I have tested the fix locally and it is working fine.