API设计 - 最佳实践以及如何支持多个版本

时间:2022-04-18 05:33:07

What is the best way to design the API's which supports multiple versions. How do I ensure that even if the schema of my data changes(minor changes), the consumers of my api's are not affected? Any reference architecture, guidelines is really helpful.

设计支持多个版本的API的最佳方法是什么。即使我的数据架构发生变化(微小变化),我如何确保我的api的消费者不会受到影响?任何参考架构,指南都非常有用。

1 个解决方案

#1


17  

Mark Nottingham has a good blog post on how to version Web (REST) APIs

Mark Nottingham有一篇关于如何编写Web(REST)API版本的博客文章

http://www.mnot.net/blog/2011/10/25/web_api_versioning_smackdown

http://www.mnot.net/blog/2011/10/25/web_api_versioning_smackdown

Also about API versioning in general:

另外关于API版本控制:

http://theamiableapi.com/2011/10/18/api-design-best-practice-plan-for-evolution/

http://theamiableapi.com/2011/10/18/api-design-best-practice-plan-for-evolution/

#1


17  

Mark Nottingham has a good blog post on how to version Web (REST) APIs

Mark Nottingham有一篇关于如何编写Web(REST)API版本的博客文章

http://www.mnot.net/blog/2011/10/25/web_api_versioning_smackdown

http://www.mnot.net/blog/2011/10/25/web_api_versioning_smackdown

Also about API versioning in general:

另外关于API版本控制:

http://theamiableapi.com/2011/10/18/api-design-best-practice-plan-for-evolution/

http://theamiableapi.com/2011/10/18/api-design-best-practice-plan-for-evolution/