If I expose a Rest end point that anyone can consume. For argument sake let's say it accepts a ticker symbol and I return a json string that has information on that, for example the ceo, stock price and year founded.
{
"symbol": "Abc",
"ceo": "Elon Musket",
"stock price": "$50",
"year founded": "2023"
}
Am I supposed to provide DTOs that can be consumed in Java, C# and other popular languages (for deserializing)? Is that a common practice? Or anyone who consumes my service is supposed to create their own DTOs?
question from:
https://stackoverflow.com/questions/65865096/if-you-expose-a-rest-api-are-you-also-supposed-to-provide-the-dtos-in-popular-l 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…