From f0df8edbdba576b9e6c587afb1a578f7976aebc9 Mon Sep 17 00:00:00 2001 From: Fahri Gedik Date: Fri, 29 Aug 2025 13:48:05 +0300 Subject: [PATCH] Fix formatting in API versioning article Corrected code block and line break formatting in the Media Type section and Swagger UI configuration example for improved readability. --- .../2025-08-27-backcompat-rest-apis-ms-dotnet/article.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/Community-Articles/2025-08-27-backcompat-rest-apis-ms-dotnet/article.md b/docs/en/Community-Articles/2025-08-27-backcompat-rest-apis-ms-dotnet/article.md index fd87208ff5..f88bb0e41c 100644 --- a/docs/en/Community-Articles/2025-08-27-backcompat-rest-apis-ms-dotnet/article.md +++ b/docs/en/Community-Articles/2025-08-27-backcompat-rest-apis-ms-dotnet/article.md @@ -44,9 +44,9 @@ x-api-version: 2.0 Pros: Clean URLs; multiple reader support. Cons: Needs proxy/CDN rules. 3) **Media Type** -``` Accept: application/json;v=2 + Accept: application/json;v=2 -``` Pros: Semantically accurate. Cons: More complicated to test and implement. **Recommendation:** For the majority of teams, favor **URI segments**, with an optional **`x-api-version`** header for flexibility. + Pros: Semantically accurate.
Cons: More complicated to test and implement.
**Recommendation:** For the majority of teams, favor **URI segments**, with an optional **`x-api-version`** header for flexibility. ### Quick Setup in ASP.NET Core (Asp.Versioning) ```csharp @@ -156,13 +156,13 @@ public async Task Orders_v1_contract_should_match_snapshot() Swagger UI configuration by group name: ```csharp -``` app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "API v1"); c.SwaggerEndpoint("/swagger/v2/swagger.json", "API v2"); -}); ``` +}); +``` --- ## Conclusion