Resetting old version of a schema to 'latest'

We have come across a situation where we had a schema definition that got updated over time so we had versions [1, 2]. After some time it was decided to revert to the original schema definition.

When I repost the new schema definition (using the api) it does not create a new version which is acceptable since this is identical to version[1]. Yet, getting the latest version of the schema using the api call https://{{avro_uri}}/subjects/<subject_name>/versions/latest does not return the expected definition but is returning version[2]

Using the api is there any way of specifying that the latest is now [1] ?

I think the only work around is to remove the first one, than it will be added as 3 after. Another option would be to do an arbitrary change to the schema, I think you should also get a new version in that case, but I’m not sure. For example add some space or documentation.

Thank you for your reply – we can adopt the approach of doing an arbitary change to the schame as you suggest by adding a “doc” attribute with updated comments in the schema definition .