SwaggerHub to use Optimistic locking
Hi,
I have lately encountered a problem updating Domains. Because SwaggerHub always opens links (the "Jump To.." on $ref) in a new browser window - the number of Tabs with SwaggerHub apis/domains increases. It often happens that multiple tabs contains the same Domain - lets call the Tabs "Tab A" and "Tab B".
I do my updates on the Domain (in "Tab A") and then save - no problem. The problem occurs next time I do an update on the same Domain - if I (I know this is my mistake) choose a different Tab ("Tab B" - containing "old" Domain data) and do my updates and save the Domain - the changes I did in "Tab A" disappear π
It would be nice to have some kind of Optimistic locking when saving. In the above scenario "Tab B" should give an error when trying to save - letting you know the Domain has been updated since you loaded the page.
I see two solutions to the above:
- Optimistic locking - letting you know that the Domain you are trying to save has been updated in the meantime
- Try to reuse Tabs when clicking on $ref links (the "Jump to...") - I don't know if this is possible - also it does not solve the problem if multiple people are working on the same Domain...