2

I have been asked in an interview below question: I have a rest service developed using spring boot and this service is running in production and consumed by 500 other services. I want to change some attributes in this service for new consumers. How do I achieve this one without impacting existing 500 consumers.

2 Answers 2

1
  • Just add a new method with the new attributes for the new customer and leave the old one as it is.

  • Add a new version of your webservice (by using URL encoded versioning) and give the new customer the new version URL.

REST versioning

Sign up to request clarification or add additional context in comments.

Comments

1

You can do this in two ways.

  1. You must have given API documentation to the customers i-e confluence or any other document. Update the document and share with customers the updated one.
  2. You can also do it using API definition scripts called YAML. If you add new attribute, you need to update the YAML configuration of the API and share it with all the customers.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.