Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Versioning APIs with ASP.NET Core 2.1

191 visualizaciones

Publicado el

In this talk, I show people how to version their APIs with ASP.NET Core 2.

Publicado en: Software
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

Versioning APIs with ASP.NET Core 2.1

  1. 1. Versioning APIs With ASP.NET Core 2.1 Shawn Wildermuth Microsoft MVP, Speaker, and Filmmaker @shawnwildermuth
  2. 2. Who Am I? Author, Instructor, Coach Pluralsight Author > 20 Courses to my name Wilder Minds Training Courses on Vue, Bootstrap 4 & Font Awesome Making a Film Hello World Film
  3. 3. What Is API Versioning? Once you publish, It’s Set in Stone Users rely on the API not changing But requirements will change Evolve the API without breaking clients API Versioning isn't Product Versioning Don't tie them together
  4. 4. The Problem with API Versioning In typical projects Versioning is accomplished with different versions of the package E.g. Assemblies API versioning is harder Your API needs to support both new and old users Side-by-side deployment isn't feasible most of the time Need to support both versions in same code base
  5. 5. API Versioning Schemes There are lots of ways to version an API Not all of them are recommended If you find a mechanism that works for you that’s all that matters But remember that you’re serving your clients, not yourselves
  6. 6. Versioning in the URI // URI Path // Query String
  7. 7. Versioning with Headers GET /api/camps HTTP/1.1 Host: localhost:44388 Content-Type: application/json X-Version: 2.0
  8. 8. Versioning with Accept Header GET /api/camps HTTP/1.1 Host: localhost:44388 Content-Type: application/json Accept: application/json;version=2.0
  9. 9. Versioning with Content Type GET /api/camps HTTP/1.1 Host: localhost:44388 Content-Type: application/ Accept: application/
  10. 10. Demo Versioning APIs
  11. 11. Takeaways… Important Links My Blog ASP.NET Core ASP.NET Core’s Source: