Hot answers tagged

3 votes

Should a REST endpoint return always the same JSON fields?

Document what you will be sending. If you want to make client side developers happy, create an endpoint that describes what you will be sending. Only send null fields if there is a difference between ...
  • 40.5k
3 votes
Accepted

Should a REST endpoint return always the same JSON fields?

In my experience is totally fine to return different building type as long as the client agrees on this "contract" and is able to process them as they are. Usually having an explicit type ...
  • 146
2 votes
Accepted

Filter using routes in REST API

Is this a convention that I am unaware of where you can put customers/ in your API URL when there is no resource called customer in your API? No. There's no convention. You could support it tho. Say ...
  • 13.3k
1 vote

Filter using routes in REST API

REST doesn't care what spelling conventions you use for your resource identifiers. When I see customers//orders in the URL, I assume that if I omit /orders and request customers/, the API should give ...
1 vote
Accepted

Exchanging data between two Microservices

For this kind of requirement, it will be better to have the client receive an intermediate response rather than returning the final answer. For this to work, I would make a client request processed ...
  • 126

Only top scored, non community-wiki answers of a minimum length are eligible