From 8a42bd7905a2e1e249373f60c61ea8d9b681dad1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Nov 2025 17:31:39 +0000 Subject: [PATCH 1/5] Initial plan From da63e48fbec55cbae651e0e88cc315f8a8112b22 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Nov 2025 17:42:25 +0000 Subject: [PATCH 2/5] Add .http files for all API examples Co-authored-by: xavierjohn <1859710+xavierjohn@users.noreply.github.com> --- .../AdvancedODataWebApiExample.http | 88 +++++++++++++ .../BasicODataWebApiExample.http | 56 +++++++++ .../ConventionsODataWebApiExample.http | 56 +++++++++ .../OpenApiODataWebApiExample.http | 111 ++++++++++++++++ .../SomeOpenApiODataWebApiExample.http | 34 +++++ .../BasicWebApiExample.http | 27 ++++ .../ByNamespaceWebApiExample.http | 54 ++++++++ .../ConventionsWebApiExample.http | 46 +++++++ .../OpenApiWebApiExample.http | 118 ++++++++++++++++++ .../ODataAdvancedExample.http | 88 +++++++++++++ .../ODataBasicExample/ODataBasicExample.http | 56 +++++++++ .../ODataConventionsExample.http | 56 +++++++++ .../ODataOpenApiExample.http | 111 ++++++++++++++++ .../SomeODataOpenApiExample.http | 34 +++++ .../WebApi/BasicExample/BasicExample.http | 35 ++++++ .../ByNamespaceExample.http | 54 ++++++++ .../ConventionsExample.http | 46 +++++++ .../MinimalApiExample/MinimalApiExample.http | 33 +++++ .../MinimalOpenApiExample.http | 118 ++++++++++++++++++ .../WebApi/OpenApiExample/OpenApiExample.http | 118 ++++++++++++++++++ 20 files changed, 1339 insertions(+) create mode 100644 examples/AspNet/OData/AdvancedODataWebApiExample/AdvancedODataWebApiExample.http create mode 100644 examples/AspNet/OData/BasicODataWebApiExample/BasicODataWebApiExample.http create mode 100644 examples/AspNet/OData/ConventionsODataWebApiExample/ConventionsODataWebApiExample.http create mode 100644 examples/AspNet/OData/OpenApiODataWebApiExample/OpenApiODataWebApiExample.http create mode 100644 examples/AspNet/OData/SomeOpenApiODataWebApiExample/SomeOpenApiODataWebApiExample.http create mode 100644 examples/AspNet/WebApi/BasicWebApiExample/BasicWebApiExample.http create mode 100644 examples/AspNet/WebApi/ByNamespaceWebApiExample/ByNamespaceWebApiExample.http create mode 100644 examples/AspNet/WebApi/ConventionsWebApiExample/ConventionsWebApiExample.http create mode 100644 examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http create mode 100644 examples/AspNetCore/OData/ODataAdvancedExample/ODataAdvancedExample.http create mode 100644 examples/AspNetCore/OData/ODataBasicExample/ODataBasicExample.http create mode 100644 examples/AspNetCore/OData/ODataConventionsExample/ODataConventionsExample.http create mode 100644 examples/AspNetCore/OData/ODataOpenApiExample/ODataOpenApiExample.http create mode 100644 examples/AspNetCore/OData/SomeODataOpenApiExample/SomeODataOpenApiExample.http create mode 100644 examples/AspNetCore/WebApi/BasicExample/BasicExample.http create mode 100644 examples/AspNetCore/WebApi/ByNamespaceExample/ByNamespaceExample.http create mode 100644 examples/AspNetCore/WebApi/ConventionsExample/ConventionsExample.http create mode 100644 examples/AspNetCore/WebApi/MinimalApiExample/MinimalApiExample.http create mode 100644 examples/AspNetCore/WebApi/MinimalOpenApiExample/MinimalOpenApiExample.http create mode 100644 examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http diff --git a/examples/AspNet/OData/AdvancedODataWebApiExample/AdvancedODataWebApiExample.http b/examples/AspNet/OData/AdvancedODataWebApiExample/AdvancedODataWebApiExample.http new file mode 100644 index 00000000..6e8b71a5 --- /dev/null +++ b/examples/AspNet/OData/AdvancedODataWebApiExample/AdvancedODataWebApiExample.http @@ -0,0 +1,88 @@ +### +# AdvancedODataWebApiExample - ASP.NET OData Web API Advanced Versioning +# This example demonstrates advanced OData scenarios with multiple versioning strategies for legacy ASP.NET Web API +### + +@baseUrl = http://localhost:52667 + +### People - Get All (Default Version) +# Get all people (defaults to latest version when AssumeDefaultVersionWhenUnspecified is enabled) +GET {{baseUrl}}/api/people + +### People - Get All - Version 1.0 +# Get all people using OData query +GET {{baseUrl}}/api/people?api-version=1.0 + +### People - Get All with $select - Version 1.0 +# Get all people with specific fields +GET {{baseUrl}}/api/people?api-version=1.0&$select=FirstName,LastName + +### People - Get All with $filter - Version 1.0 +# Get filtered people +GET {{baseUrl}}/api/people?api-version=1.0&$filter=Id eq 1 + +### People - Get by Key - Version 1.0 +# Get a specific person by ID +GET {{baseUrl}}/api/people/1?api-version=1.0 + +### People - Get All - Version 2.0 +# Get all people using OData query +GET {{baseUrl}}/api/people?api-version=2.0 + +### People - Get All with $select - Version 2.0 +# Get all people with specific fields +GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email + +### People - Get by Key - Version 2.0 +# Get a specific person by ID +GET {{baseUrl}}/api/people/1?api-version=2.0 + +### People - Patch - Version 2.0 +# Update a person using OData PATCH +PATCH {{baseUrl}}/api/people/1?api-version=2.0 +Content-Type: application/json + +{ + "firstName": "Jane", + "email": "jane.mei@somewhere.com" +} + +### People (V2) - Get All - Version 2.0 +# Get all people from version 2 specific controller +GET {{baseUrl}}/api/people2?api-version=2.0 + +### People (V2) - Get by Key - Version 2.0 +# Get a specific person by ID from version 2 controller +GET {{baseUrl}}/api/people2/1?api-version=2.0 + +### Orders - Get All - Version 1.0 +# Get all orders +GET {{baseUrl}}/api/v1/orders + +### Orders - Get All with $select - Version 1.0 +# Get orders with specific fields +GET {{baseUrl}}/api/v1/orders?$select=Id,Customer + +### Orders - Get by Key - Version 1.0 +# Get a specific order by ID +GET {{baseUrl}}/api/v1/orders/1 + +### Orders - Get All - Version 2.0 +# Get all orders for version 2.0 +GET {{baseUrl}}/api/v2/orders + +### Orders - Get by Key - Version 2.0 +# Get a specific order by ID for version 2.0 +GET {{baseUrl}}/api/v2/orders/1 + +### Orders - Get All - Version 3.0 +# Get all orders for version 3.0 +GET {{baseUrl}}/api/v3/orders + +### Orders - Get by Key - Version 3.0 +# Get a specific order by ID for version 3.0 +GET {{baseUrl}}/api/v3/orders/1 + +### Orders - Get All with $expand - Version 3.0 +# Get orders with expanded customer details +GET {{baseUrl}}/api/v3/orders?$expand=customer diff --git a/examples/AspNet/OData/BasicODataWebApiExample/BasicODataWebApiExample.http b/examples/AspNet/OData/BasicODataWebApiExample/BasicODataWebApiExample.http new file mode 100644 index 00000000..818ba152 --- /dev/null +++ b/examples/AspNet/OData/BasicODataWebApiExample/BasicODataWebApiExample.http @@ -0,0 +1,56 @@ +### +# BasicODataWebApiExample - ASP.NET OData Web API with Versioning +# This example demonstrates basic OData endpoints with API versioning for legacy ASP.NET Web API +### + +@baseUrl = http://localhost:52667 + +### People - Get All - Version 1.0 +# Get all people using OData query +GET {{baseUrl}}/api/people?api-version=1.0 + +### People - Get All with $select - Version 1.0 +# Get all people with specific fields +GET {{baseUrl}}/api/people?api-version=1.0&$select=FirstName,LastName + +### People - Get All with $filter - Version 1.0 +# Get filtered people +GET {{baseUrl}}/api/people?api-version=1.0&$filter=Id eq 1 + +### People - Get by Key - Version 1.0 +# Get a specific person by ID +GET {{baseUrl}}/api/people/1?api-version=1.0 + +### People - Get All - Version 2.0 +# Get all people using OData query +GET {{baseUrl}}/api/people?api-version=2.0 + +### People - Get All with $select - Version 2.0 +# Get all people with specific fields +GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email + +### People - Get by Key - Version 2.0 +# Get a specific person by ID +GET {{baseUrl}}/api/people/1?api-version=2.0 + +### People - Patch - Version 2.0 +# Update a person using OData PATCH +PATCH {{baseUrl}}/api/people/1?api-version=2.0 +Content-Type: application/json + +{ + "firstName": "Jane", + "email": "jane.mei@somewhere.com" +} + +### Orders - Get All - Version 1.0 +# Get all orders +GET {{baseUrl}}/api/v1/orders + +### Orders - Get All with $select - Version 1.0 +# Get orders with specific fields +GET {{baseUrl}}/api/v1/orders?$select=Id,Customer + +### Orders - Get by Key - Version 1.0 +# Get a specific order by ID +GET {{baseUrl}}/api/v1/orders/1 diff --git a/examples/AspNet/OData/ConventionsODataWebApiExample/ConventionsODataWebApiExample.http b/examples/AspNet/OData/ConventionsODataWebApiExample/ConventionsODataWebApiExample.http new file mode 100644 index 00000000..b15e46b6 --- /dev/null +++ b/examples/AspNet/OData/ConventionsODataWebApiExample/ConventionsODataWebApiExample.http @@ -0,0 +1,56 @@ +### +# ConventionsODataWebApiExample - ASP.NET OData Web API with Convention-based Versioning +# This example demonstrates OData endpoints configured using conventions for legacy ASP.NET Web API +### + +@baseUrl = http://localhost:52667 + +### People - Get All - Version 1.0 +# Get all people using OData query +GET {{baseUrl}}/api/people?api-version=1.0 + +### People - Get All with $select - Version 1.0 +# Get all people with specific fields +GET {{baseUrl}}/api/people?api-version=1.0&$select=FirstName,LastName + +### People - Get All with $filter - Version 1.0 +# Get filtered people +GET {{baseUrl}}/api/people?api-version=1.0&$filter=Id eq 1 + +### People - Get by Key - Version 1.0 +# Get a specific person by ID +GET {{baseUrl}}/api/people/1?api-version=1.0 + +### People - Get All - Version 2.0 +# Get all people using OData query +GET {{baseUrl}}/api/people?api-version=2.0 + +### People - Get All with $select - Version 2.0 +# Get all people with specific fields +GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email + +### People - Get by Key - Version 2.0 +# Get a specific person by ID +GET {{baseUrl}}/api/people/1?api-version=2.0 + +### People - Patch - Version 2.0 +# Update a person using OData PATCH +PATCH {{baseUrl}}/api/people/1?api-version=2.0 +Content-Type: application/json + +{ + "firstName": "Jane", + "email": "jane.mei@somewhere.com" +} + +### Orders - Get All - Version 1.0 +# Get all orders +GET {{baseUrl}}/api/v1/orders + +### Orders - Get All with $select - Version 1.0 +# Get orders with specific fields +GET {{baseUrl}}/api/v1/orders?$select=Id,Customer + +### Orders - Get by Key - Version 1.0 +# Get a specific order by ID +GET {{baseUrl}}/api/v1/orders/1 diff --git a/examples/AspNet/OData/OpenApiODataWebApiExample/OpenApiODataWebApiExample.http b/examples/AspNet/OData/OpenApiODataWebApiExample/OpenApiODataWebApiExample.http new file mode 100644 index 00000000..b8d237b6 --- /dev/null +++ b/examples/AspNet/OData/OpenApiODataWebApiExample/OpenApiODataWebApiExample.http @@ -0,0 +1,111 @@ +### +# OpenApiODataWebApiExample - ASP.NET OData Web API with OpenAPI/Swagger +# This example demonstrates comprehensive OData endpoints with Swagger documentation for legacy ASP.NET Web API +### + +@baseUrl = http://localhost:52667 + +### Orders - Get by Key - Version 0.9 (Deprecated) +# Get a specific order (deprecated version) +GET {{baseUrl}}/api/orders/1?api-version=0.9 + +### Orders - Get by Key - Version 1.0 +# Get a specific order with $select option +GET {{baseUrl}}/api/orders/1?api-version=1.0 + +### Orders - Get by Key with $select - Version 1.0 +# Get a specific order with selected fields +GET {{baseUrl}}/api/orders/1?api-version=1.0&$select=Id,Customer + +### Orders - Create - Version 1.0 +# Place a new order +POST {{baseUrl}}/api/orders?api-version=1.0 +Content-Type: application/json + +{ + "customer": "John Doe" +} + +### People - Get by Key - Version 1.0 +# Get a specific person +GET {{baseUrl}}/api/people/1?api-version=1.0 + +### Orders - Get All - Version 2.0 +# Get all orders +GET {{baseUrl}}/api/orders?api-version=2.0 + +### Orders - Get All with $select - Version 2.0 +# Get orders with specific fields +GET {{baseUrl}}/api/orders?api-version=2.0&$select=Id,Customer + +### Orders - Get by Key - Version 2.0 +# Get a specific order +GET {{baseUrl}}/api/orders/1?api-version=2.0 + +### Orders - Create - Version 2.0 +# Place a new order with effective date +POST {{baseUrl}}/api/orders?api-version=2.0 +Content-Type: application/json + +{ + "customer": "Bob Smith", + "effectiveDate": "2024-01-15T00:00:00Z" +} + +### People - Get All - Version 2.0 +# Get all people +GET {{baseUrl}}/api/people?api-version=2.0 + +### People - Get All with $select - Version 2.0 +# Get people with specific fields +GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email + +### People - Get by Key - Version 2.0 +# Get a specific person with email +GET {{baseUrl}}/api/people/1?api-version=2.0 + +### Orders - Get All - Version 3.0 +# Get all orders +GET {{baseUrl}}/api/orders?api-version=3.0 + +### Orders - Get All with $filter - Version 3.0 +# Get filtered orders +GET {{baseUrl}}/api/orders?api-version=3.0&$filter=Id gt 1 + +### Orders - Get by Key - Version 3.0 +# Get a specific order +GET {{baseUrl}}/api/orders/1?api-version=3.0 + +### Orders - Create - Version 3.0 +# Place a new order +POST {{baseUrl}}/api/orders?api-version=3.0 +Content-Type: application/json + +{ + "customer": "Charlie Brown", + "effectiveDate": "2024-02-01T00:00:00Z" +} + +### People - Get All - Version 3.0 +# Get all people with phone numbers +GET {{baseUrl}}/api/people?api-version=3.0 + +### People - Get by Key - Version 3.0 +# Get a specific person with phone number +GET {{baseUrl}}/api/people/1?api-version=3.0 + +### Products - Get All - Version 3.0 +# Get all products +GET {{baseUrl}}/api/products?api-version=3.0 + +### Products - Get by Key - Version 3.0 +# Get a specific product +GET {{baseUrl}}/api/products/1?api-version=3.0 + +### Suppliers - Get All - Version 3.0 +# Get all suppliers +GET {{baseUrl}}/api/suppliers?api-version=3.0 + +### Suppliers - Get by Key - Version 3.0 +# Get a specific supplier +GET {{baseUrl}}/api/suppliers/1?api-version=3.0 diff --git a/examples/AspNet/OData/SomeOpenApiODataWebApiExample/SomeOpenApiODataWebApiExample.http b/examples/AspNet/OData/SomeOpenApiODataWebApiExample/SomeOpenApiODataWebApiExample.http new file mode 100644 index 00000000..6e8f56bb --- /dev/null +++ b/examples/AspNet/OData/SomeOpenApiODataWebApiExample/SomeOpenApiODataWebApiExample.http @@ -0,0 +1,34 @@ +### +# SomeOpenApiODataWebApiExample - ASP.NET OData Web API with Minimal OpenAPI +# This example demonstrates a simple OData controller with OpenAPI support for legacy ASP.NET Web API +### + +@baseUrl = http://localhost:52667 + +### Books - Get All - Version 1.0 +# Get all books +GET {{baseUrl}}/api/books?api-version=1.0 + +### Books - Get All with $select - Version 1.0 +# Get books with specific fields +GET {{baseUrl}}/api/books?api-version=1.0&$select=Title,Author + +### Books - Get All with $filter - Version 1.0 +# Get filtered books by author +GET {{baseUrl}}/api/books?api-version=1.0&$filter=Author eq 'Leo Tolstoy' + +### Books - Get All with $orderby - Version 1.0 +# Get books ordered by publication year +GET {{baseUrl}}/api/books?api-version=1.0&$orderby=Published desc + +### Books - Get All with $top - Version 1.0 +# Get top 3 books +GET {{baseUrl}}/api/books?api-version=1.0&$top=3 + +### Books - Get by ID - Version 1.0 +# Get a specific book by ISBN +GET {{baseUrl}}/api/books/9781847490599?api-version=1.0 + +### Books - Get by ID with $select - Version 1.0 +# Get a specific book with selected fields +GET {{baseUrl}}/api/books/9781847490599?api-version=1.0&$select=Title,Published diff --git a/examples/AspNet/WebApi/BasicWebApiExample/BasicWebApiExample.http b/examples/AspNet/WebApi/BasicWebApiExample/BasicWebApiExample.http new file mode 100644 index 00000000..59a6fa24 --- /dev/null +++ b/examples/AspNet/WebApi/BasicWebApiExample/BasicWebApiExample.http @@ -0,0 +1,27 @@ +### +# BasicWebApiExample - ASP.NET Web API Versioning Examples +# This file demonstrates basic API versioning scenarios for legacy ASP.NET Web API +### + +@baseUrl = http://localhost:52667 + +### ValuesController - Version 1.0 +# Get values using query string versioning +GET {{baseUrl}}/api/values?api-version=1.0 + +### ValuesController - Version 2.0 +# Get values using query string versioning +GET {{baseUrl}}/api/values?api-version=2.0 + +### HelloWorldController - Version 1.0 +# Get hello world with URL segment versioning +GET {{baseUrl}}/api/v1.0/helloworld + +### HelloWorldController - Get by ID - Version 1.0 +# Get hello world with specific ID +GET {{baseUrl}}/api/v1.0/helloworld/42 + +### HelloWorldController - Create - Version 1.0 +# Create new hello world resource +POST {{baseUrl}}/api/v1.0/helloworld +Content-Type: application/json diff --git a/examples/AspNet/WebApi/ByNamespaceWebApiExample/ByNamespaceWebApiExample.http b/examples/AspNet/WebApi/ByNamespaceWebApiExample/ByNamespaceWebApiExample.http new file mode 100644 index 00000000..e56dcd2a --- /dev/null +++ b/examples/AspNet/WebApi/ByNamespaceWebApiExample/ByNamespaceWebApiExample.http @@ -0,0 +1,54 @@ +### +# ByNamespaceWebApiExample - ASP.NET Web API Versioning by Namespace +# This example demonstrates organizing API versions by namespace for legacy ASP.NET Web API +### + +@baseUrl = http://localhost:52667 + +### OrdersController - Version 1.0 (URL segment) +# Get orders for an account using URL segment versioning +GET {{baseUrl}}/v1/orders/account123 + +### OrdersController - Version 1.0 (Query string) +# Get orders for an account using query string versioning +GET {{baseUrl}}/orders/account123?api-version=1.0 + +### AgreementsController - Version 1.0 (URL segment) +# Get agreement for an account using URL segment versioning +GET {{baseUrl}}/v1/agreements/account123 + +### AgreementsController - Version 1.0 (Query string) +# Get agreement for an account using query string versioning +GET {{baseUrl}}/agreements/account123?api-version=1.0 + +### OrdersController - Version 2.0 (URL segment) +# Get orders for an account using URL segment versioning +GET {{baseUrl}}/v2/orders/account456 + +### OrdersController - Version 2.0 (Query string) +# Get orders for an account using query string versioning +GET {{baseUrl}}/orders/account456?api-version=2.0 + +### AgreementsController - Version 2.0 (URL segment) +# Get agreement for an account using URL segment versioning +GET {{baseUrl}}/v2/agreements/account456 + +### AgreementsController - Version 2.0 (Query string) +# Get agreement for an account using query string versioning +GET {{baseUrl}}/agreements/account456?api-version=2.0 + +### OrdersController - Version 3.0 (URL segment) +# Get orders for an account using URL segment versioning +GET {{baseUrl}}/v3/orders/account789 + +### OrdersController - Version 3.0 (Query string) +# Get orders for an account using query string versioning +GET {{baseUrl}}/orders/account789?api-version=3.0 + +### AgreementsController - Version 3.0 (URL segment) +# Get agreement for an account using URL segment versioning +GET {{baseUrl}}/v3/agreements/account789 + +### AgreementsController - Version 3.0 (Query string) +# Get agreement for an account using query string versioning +GET {{baseUrl}}/agreements/account789?api-version=3.0 diff --git a/examples/AspNet/WebApi/ConventionsWebApiExample/ConventionsWebApiExample.http b/examples/AspNet/WebApi/ConventionsWebApiExample/ConventionsWebApiExample.http new file mode 100644 index 00000000..606fa551 --- /dev/null +++ b/examples/AspNet/WebApi/ConventionsWebApiExample/ConventionsWebApiExample.http @@ -0,0 +1,46 @@ +### +# ConventionsWebApiExample - ASP.NET Web API Versioning using Conventions +# This example demonstrates API versioning configured using conventions for legacy ASP.NET Web API +### + +@baseUrl = http://localhost:52667 + +### ValuesController - Version 1.0 +# Get values using query string versioning +GET {{baseUrl}}/api/values?api-version=1.0 + +### ValuesController - Get by ID - Version 1.0 +# Get specific value by ID +GET {{baseUrl}}/api/values/42?api-version=1.0 + +### ValuesController - Version 2.0 +# Get values using query string versioning +GET {{baseUrl}}/api/values?api-version=2.0 + +### ValuesController - Get by ID - Version 2.0 +# Get specific value by ID +GET {{baseUrl}}/api/values/42?api-version=2.0 + +### ValuesController - Version 3.0 +# Get values using query string versioning +GET {{baseUrl}}/api/values?api-version=3.0 + +### ValuesController - Get by ID - Version 3.0 +# Get specific value by ID +GET {{baseUrl}}/api/values/42?api-version=3.0 + +### HelloWorldController - Version 1.0 +# Get hello world with URL segment versioning +GET {{baseUrl}}/api/v1.0/helloworld + +### HelloWorldController - Get by ID - Version 1.0 +# Get hello world with specific ID +GET {{baseUrl}}/api/v1.0/helloworld/42 + +### HelloWorldController - Version 2.0 +# Get hello world with URL segment versioning +GET {{baseUrl}}/api/v2.0/helloworld + +### HelloWorldController - Get by ID - Version 2.0 +# Get hello world with specific ID +GET {{baseUrl}}/api/v2.0/helloworld/42 diff --git a/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http b/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http new file mode 100644 index 00000000..61894c7a --- /dev/null +++ b/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http @@ -0,0 +1,118 @@ +### +# OpenApiWebApiExample - ASP.NET Web API with OpenAPI/Swagger +# This example demonstrates comprehensive API versioning with Swagger documentation for legacy ASP.NET Web API +### + +@baseUrl = http://localhost:52667 + +### Orders - Get by ID - Version 0.9 (Deprecated) +# Get a specific order (deprecated version) +GET {{baseUrl}}/api/orders/1?api-version=0.9 + +### Orders - Get by ID - Version 1.0 +# Get a specific order +GET {{baseUrl}}/api/orders/1?api-version=1.0 + +### Orders - Create - Version 1.0 +# Place a new order +POST {{baseUrl}}/api/orders?api-version=1.0 +Content-Type: application/json + +{ + "customer": "John Doe" +} + +### Orders - Update - Version 1.0 +# Update an existing order +PATCH {{baseUrl}}/api/orders/42?api-version=1.0 +Content-Type: application/json + +{ + "customer": "Jane Doe" +} + +### Orders - Get All - Version 2.0 +# Get all orders +GET {{baseUrl}}/api/orders?api-version=2.0 + +### Orders - Get by ID - Version 2.0 +# Get a specific order with effective date +GET {{baseUrl}}/api/orders/1?api-version=2.0 + +### Orders - Create - Version 2.0 +# Place a new order with effective date +POST {{baseUrl}}/api/orders?api-version=2.0 +Content-Type: application/json + +{ + "customer": "Bob Smith", + "effectiveDate": "2024-01-15T00:00:00Z" +} + +### Orders - Update - Version 2.0 +# Update an existing order with effective date +PATCH {{baseUrl}}/api/orders/42?api-version=2.0 +Content-Type: application/json + +{ + "customer": "Alice Johnson", + "effectiveDate": "2024-01-20T00:00:00Z" +} + +### Orders - Get All - Version 3.0 +# Get all orders +GET {{baseUrl}}/api/orders?api-version=3.0 + +### Orders - Get by ID - Version 3.0 +# Get a specific order +GET {{baseUrl}}/api/orders/1?api-version=3.0 + +### Orders - Create - Version 3.0 +# Place a new order +POST {{baseUrl}}/api/orders?api-version=3.0 +Content-Type: application/json + +{ + "customer": "Charlie Brown", + "effectiveDate": "2024-02-01T00:00:00Z" +} + +### Orders - Delete - Version 3.0 +# Delete an order +DELETE {{baseUrl}}/api/orders/42?api-version=3.0 + +### People - Get by ID - Version 0.9 (Deprecated) +# Get a specific person (deprecated version) +GET {{baseUrl}}/api/v0.9/people/1 + +### People - Get by ID - Version 1.0 +# Get a specific person +GET {{baseUrl}}/api/v1.0/people/1 + +### People - Get All - Version 2.0 +# Get all people +GET {{baseUrl}}/api/v2.0/people + +### People - Get by ID - Version 2.0 +# Get a specific person with email +GET {{baseUrl}}/api/v2.0/people/1 + +### People - Get All - Version 3.0 +# Get all people with phone numbers +GET {{baseUrl}}/api/v3.0/people + +### People - Get by ID - Version 3.0 +# Get a specific person with phone number +GET {{baseUrl}}/api/v3.0/people/1 + +### People - Create - Version 3.0 +# Create a new person +POST {{baseUrl}}/api/v3.0/people +Content-Type: application/json + +{ + "firstName": "John", + "lastName": "Doe", + "email": "john.doe@example.com", + "phone": "555-123-4567" +} diff --git a/examples/AspNetCore/OData/ODataAdvancedExample/ODataAdvancedExample.http b/examples/AspNetCore/OData/ODataAdvancedExample/ODataAdvancedExample.http new file mode 100644 index 00000000..f4c18b6f --- /dev/null +++ b/examples/AspNetCore/OData/ODataAdvancedExample/ODataAdvancedExample.http @@ -0,0 +1,88 @@ +### +# ODataAdvancedExample - ASP.NET Core OData Advanced Versioning +# This example demonstrates advanced OData scenarios with multiple versioning strategies +### + +@baseUrl = http://localhost:5000 + +### People - Get All (Default Version) +# Get all people (defaults to latest version when AssumeDefaultVersionWhenUnspecified is enabled) +GET {{baseUrl}}/api/people + +### People - Get All - Version 1.0 +# Get all people using OData query +GET {{baseUrl}}/api/people?api-version=1.0 + +### People - Get All with $select - Version 1.0 +# Get all people with specific fields +GET {{baseUrl}}/api/people?api-version=1.0&$select=FirstName,LastName + +### People - Get All with $filter - Version 1.0 +# Get filtered people +GET {{baseUrl}}/api/people?api-version=1.0&$filter=Id eq 1 + +### People - Get by Key - Version 1.0 +# Get a specific person by ID +GET {{baseUrl}}/api/people/1?api-version=1.0 + +### People - Get All - Version 2.0 +# Get all people using OData query +GET {{baseUrl}}/api/people?api-version=2.0 + +### People - Get All with $select - Version 2.0 +# Get all people with specific fields +GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email + +### People - Get by Key - Version 2.0 +# Get a specific person by ID +GET {{baseUrl}}/api/people/1?api-version=2.0 + +### People - Patch - Version 2.0 +# Update a person using OData PATCH +PATCH {{baseUrl}}/api/people/1?api-version=2.0 +Content-Type: application/json + +{ + "firstName": "Jane", + "email": "jane.mei@somewhere.com" +} + +### People (V2) - Get All - Version 2.0 +# Get all people from version 2 specific controller +GET {{baseUrl}}/api/people2?api-version=2.0 + +### People (V2) - Get by Key - Version 2.0 +# Get a specific person by ID from version 2 controller +GET {{baseUrl}}/api/people2/1?api-version=2.0 + +### Orders - Get All - Version 1.0 +# Get all orders +GET {{baseUrl}}/api/v1/orders + +### Orders - Get All with $select - Version 1.0 +# Get orders with specific fields +GET {{baseUrl}}/api/v1/orders?$select=Id,Customer + +### Orders - Get by Key - Version 1.0 +# Get a specific order by ID +GET {{baseUrl}}/api/v1/orders/1 + +### Orders - Get All - Version 2.0 +# Get all orders for version 2.0 +GET {{baseUrl}}/api/v2/orders + +### Orders - Get by Key - Version 2.0 +# Get a specific order by ID for version 2.0 +GET {{baseUrl}}/api/v2/orders/1 + +### Orders - Get All - Version 3.0 +# Get all orders for version 3.0 +GET {{baseUrl}}/api/v3/orders + +### Orders - Get by Key - Version 3.0 +# Get a specific order by ID for version 3.0 +GET {{baseUrl}}/api/v3/orders/1 + +### Orders - Get All with $expand - Version 3.0 +# Get orders with expanded customer details +GET {{baseUrl}}/api/v3/orders?$expand=customer diff --git a/examples/AspNetCore/OData/ODataBasicExample/ODataBasicExample.http b/examples/AspNetCore/OData/ODataBasicExample/ODataBasicExample.http new file mode 100644 index 00000000..88b57dba --- /dev/null +++ b/examples/AspNetCore/OData/ODataBasicExample/ODataBasicExample.http @@ -0,0 +1,56 @@ +### +# ODataBasicExample - ASP.NET Core OData with API Versioning +# This example demonstrates basic OData endpoints with API versioning +### + +@baseUrl = http://localhost:5000 + +### People - Get All - Version 1.0 +# Get all people using OData query +GET {{baseUrl}}/api/people?api-version=1.0 + +### People - Get All with $select - Version 1.0 +# Get all people with specific fields +GET {{baseUrl}}/api/people?api-version=1.0&$select=FirstName,LastName + +### People - Get All with $filter - Version 1.0 +# Get filtered people +GET {{baseUrl}}/api/people?api-version=1.0&$filter=Id eq 1 + +### People - Get by Key - Version 1.0 +# Get a specific person by ID +GET {{baseUrl}}/api/people/1?api-version=1.0 + +### People - Get All - Version 2.0 +# Get all people using OData query +GET {{baseUrl}}/api/people?api-version=2.0 + +### People - Get All with $select - Version 2.0 +# Get all people with specific fields +GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email + +### People - Get by Key - Version 2.0 +# Get a specific person by ID +GET {{baseUrl}}/api/people/1?api-version=2.0 + +### People - Patch - Version 2.0 +# Update a person using OData PATCH +PATCH {{baseUrl}}/api/people/1?api-version=2.0 +Content-Type: application/json + +{ + "firstName": "Jane", + "email": "jane.mei@somewhere.com" +} + +### Orders - Get All - Version 1.0 +# Get all orders +GET {{baseUrl}}/api/v1/orders + +### Orders - Get All with $select - Version 1.0 +# Get orders with specific fields +GET {{baseUrl}}/api/v1/orders?$select=Id,Customer + +### Orders - Get by Key - Version 1.0 +# Get a specific order by ID +GET {{baseUrl}}/api/v1/orders/1 diff --git a/examples/AspNetCore/OData/ODataConventionsExample/ODataConventionsExample.http b/examples/AspNetCore/OData/ODataConventionsExample/ODataConventionsExample.http new file mode 100644 index 00000000..1d16612e --- /dev/null +++ b/examples/AspNetCore/OData/ODataConventionsExample/ODataConventionsExample.http @@ -0,0 +1,56 @@ +### +# ODataConventionsExample - ASP.NET Core OData with Convention-based Versioning +# This example demonstrates OData endpoints configured using conventions +### + +@baseUrl = http://localhost:5000 + +### People - Get All - Version 1.0 +# Get all people using OData query +GET {{baseUrl}}/api/people?api-version=1.0 + +### People - Get All with $select - Version 1.0 +# Get all people with specific fields +GET {{baseUrl}}/api/people?api-version=1.0&$select=FirstName,LastName + +### People - Get All with $filter - Version 1.0 +# Get filtered people +GET {{baseUrl}}/api/people?api-version=1.0&$filter=Id eq 1 + +### People - Get by Key - Version 1.0 +# Get a specific person by ID +GET {{baseUrl}}/api/people/1?api-version=1.0 + +### People - Get All - Version 2.0 +# Get all people using OData query +GET {{baseUrl}}/api/people?api-version=2.0 + +### People - Get All with $select - Version 2.0 +# Get all people with specific fields +GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email + +### People - Get by Key - Version 2.0 +# Get a specific person by ID +GET {{baseUrl}}/api/people/1?api-version=2.0 + +### People - Patch - Version 2.0 +# Update a person using OData PATCH +PATCH {{baseUrl}}/api/people/1?api-version=2.0 +Content-Type: application/json + +{ + "firstName": "Jane", + "email": "jane.mei@somewhere.com" +} + +### Orders - Get All - Version 1.0 +# Get all orders +GET {{baseUrl}}/api/v1/orders + +### Orders - Get All with $select - Version 1.0 +# Get orders with specific fields +GET {{baseUrl}}/api/v1/orders?$select=Id,Customer + +### Orders - Get by Key - Version 1.0 +# Get a specific order by ID +GET {{baseUrl}}/api/v1/orders/1 diff --git a/examples/AspNetCore/OData/ODataOpenApiExample/ODataOpenApiExample.http b/examples/AspNetCore/OData/ODataOpenApiExample/ODataOpenApiExample.http new file mode 100644 index 00000000..0960b718 --- /dev/null +++ b/examples/AspNetCore/OData/ODataOpenApiExample/ODataOpenApiExample.http @@ -0,0 +1,111 @@ +### +# ODataOpenApiExample - ASP.NET Core OData with OpenAPI/Swagger +# This example demonstrates comprehensive OData endpoints with Swagger documentation +### + +@baseUrl = http://localhost:5000 + +### Orders - Get by Key - Version 0.9 (Deprecated) +# Get a specific order (deprecated version) +GET {{baseUrl}}/api/orders/1?api-version=0.9 + +### Orders - Get by Key - Version 1.0 +# Get a specific order with $select option +GET {{baseUrl}}/api/orders/1?api-version=1.0 + +### Orders - Get by Key with $select - Version 1.0 +# Get a specific order with selected fields +GET {{baseUrl}}/api/orders/1?api-version=1.0&$select=Id,Customer + +### Orders - Create - Version 1.0 +# Place a new order +POST {{baseUrl}}/api/orders?api-version=1.0 +Content-Type: application/json + +{ + "customer": "John Doe" +} + +### People - Get by Key - Version 1.0 +# Get a specific person +GET {{baseUrl}}/api/people/1?api-version=1.0 + +### Orders - Get All - Version 2.0 +# Get all orders +GET {{baseUrl}}/api/orders?api-version=2.0 + +### Orders - Get All with $select - Version 2.0 +# Get orders with specific fields +GET {{baseUrl}}/api/orders?api-version=2.0&$select=Id,Customer + +### Orders - Get by Key - Version 2.0 +# Get a specific order +GET {{baseUrl}}/api/orders/1?api-version=2.0 + +### Orders - Create - Version 2.0 +# Place a new order with effective date +POST {{baseUrl}}/api/orders?api-version=2.0 +Content-Type: application/json + +{ + "customer": "Bob Smith", + "effectiveDate": "2024-01-15T00:00:00Z" +} + +### People - Get All - Version 2.0 +# Get all people +GET {{baseUrl}}/api/people?api-version=2.0 + +### People - Get All with $select - Version 2.0 +# Get people with specific fields +GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email + +### People - Get by Key - Version 2.0 +# Get a specific person with email +GET {{baseUrl}}/api/people/1?api-version=2.0 + +### Orders - Get All - Version 3.0 +# Get all orders +GET {{baseUrl}}/api/orders?api-version=3.0 + +### Orders - Get All with $filter - Version 3.0 +# Get filtered orders +GET {{baseUrl}}/api/orders?api-version=3.0&$filter=Id gt 1 + +### Orders - Get by Key - Version 3.0 +# Get a specific order +GET {{baseUrl}}/api/orders/1?api-version=3.0 + +### Orders - Create - Version 3.0 +# Place a new order +POST {{baseUrl}}/api/orders?api-version=3.0 +Content-Type: application/json + +{ + "customer": "Charlie Brown", + "effectiveDate": "2024-02-01T00:00:00Z" +} + +### People - Get All - Version 3.0 +# Get all people with phone numbers +GET {{baseUrl}}/api/people?api-version=3.0 + +### People - Get by Key - Version 3.0 +# Get a specific person with phone number +GET {{baseUrl}}/api/people/1?api-version=3.0 + +### Products - Get All - Version 3.0 +# Get all products +GET {{baseUrl}}/api/products?api-version=3.0 + +### Products - Get by Key - Version 3.0 +# Get a specific product +GET {{baseUrl}}/api/products/1?api-version=3.0 + +### Suppliers - Get All - Version 3.0 +# Get all suppliers +GET {{baseUrl}}/api/suppliers?api-version=3.0 + +### Suppliers - Get by Key - Version 3.0 +# Get a specific supplier +GET {{baseUrl}}/api/suppliers/1?api-version=3.0 diff --git a/examples/AspNetCore/OData/SomeODataOpenApiExample/SomeODataOpenApiExample.http b/examples/AspNetCore/OData/SomeODataOpenApiExample/SomeODataOpenApiExample.http new file mode 100644 index 00000000..b532d246 --- /dev/null +++ b/examples/AspNetCore/OData/SomeODataOpenApiExample/SomeODataOpenApiExample.http @@ -0,0 +1,34 @@ +### +# SomeODataOpenApiExample - ASP.NET Core OData with Minimal OpenAPI +# This example demonstrates a simple OData controller with OpenAPI support +### + +@baseUrl = http://localhost:5000 + +### Books - Get All - Version 1.0 +# Get all books +GET {{baseUrl}}/api/books?api-version=1.0 + +### Books - Get All with $select - Version 1.0 +# Get books with specific fields +GET {{baseUrl}}/api/books?api-version=1.0&$select=Title,Author + +### Books - Get All with $filter - Version 1.0 +# Get filtered books by author +GET {{baseUrl}}/api/books?api-version=1.0&$filter=Author eq 'Leo Tolstoy' + +### Books - Get All with $orderby - Version 1.0 +# Get books ordered by publication year +GET {{baseUrl}}/api/books?api-version=1.0&$orderby=Published desc + +### Books - Get All with $top - Version 1.0 +# Get top 3 books +GET {{baseUrl}}/api/books?api-version=1.0&$top=3 + +### Books - Get by ID - Version 1.0 +# Get a specific book by ISBN +GET {{baseUrl}}/api/books/9781847490599?api-version=1.0 + +### Books - Get by ID with $select - Version 1.0 +# Get a specific book with selected fields +GET {{baseUrl}}/api/books/9781847490599?api-version=1.0&$select=Title,Published diff --git a/examples/AspNetCore/WebApi/BasicExample/BasicExample.http b/examples/AspNetCore/WebApi/BasicExample/BasicExample.http new file mode 100644 index 00000000..31774989 --- /dev/null +++ b/examples/AspNetCore/WebApi/BasicExample/BasicExample.http @@ -0,0 +1,35 @@ +### +# BasicExample - ASP.NET Core API Versioning Examples +# This file demonstrates basic API versioning scenarios with query string versioning +### + +@baseUrl = http://localhost:5000 + +### ValuesController - Version 1.0 +# Get values using query string versioning +GET {{baseUrl}}/api/values?api-version=1.0 + +### ValuesController - Version 2.0 +# Get values using query string versioning +GET {{baseUrl}}/api/values?api-version=2.0 + +### HelloWorldController - Version 1.0 +# Get hello world with URL segment versioning +GET {{baseUrl}}/api/v1.0/helloworld + +### HelloWorldController - Get by ID - Version 1.0 +# Get hello world with specific ID +GET {{baseUrl}}/api/v1.0/helloworld/42 + +### HelloWorldController - Create - Version 1.0 +# Create new hello world resource +POST {{baseUrl}}/api/v1.0/helloworld +Content-Type: application/json + +### MultiVersionedController - Version 1.0 +# Get from controller that supports multiple versions +GET {{baseUrl}}/api/v1.0/multiversioned + +### MultiVersionedController - Version 2.0 +# Get from controller that supports multiple versions (v2 specific endpoint) +GET {{baseUrl}}/api/v2.0/multiversioned diff --git a/examples/AspNetCore/WebApi/ByNamespaceExample/ByNamespaceExample.http b/examples/AspNetCore/WebApi/ByNamespaceExample/ByNamespaceExample.http new file mode 100644 index 00000000..390b4d9b --- /dev/null +++ b/examples/AspNetCore/WebApi/ByNamespaceExample/ByNamespaceExample.http @@ -0,0 +1,54 @@ +### +# ByNamespaceExample - ASP.NET Core API Versioning by Namespace +# This example demonstrates organizing API versions by namespace +### + +@baseUrl = http://localhost:5000 + +### OrdersController - Version 1.0 (URL segment) +# Get orders for an account using URL segment versioning +GET {{baseUrl}}/v1/orders/account123 + +### OrdersController - Version 1.0 (Query string) +# Get orders for an account using query string versioning +GET {{baseUrl}}/orders/account123?api-version=1.0 + +### AgreementsController - Version 1.0 (URL segment) +# Get agreement for an account using URL segment versioning +GET {{baseUrl}}/v1/agreements/account123 + +### AgreementsController - Version 1.0 (Query string) +# Get agreement for an account using query string versioning +GET {{baseUrl}}/agreements/account123?api-version=1.0 + +### OrdersController - Version 2.0 (URL segment) +# Get orders for an account using URL segment versioning +GET {{baseUrl}}/v2/orders/account456 + +### OrdersController - Version 2.0 (Query string) +# Get orders for an account using query string versioning +GET {{baseUrl}}/orders/account456?api-version=2.0 + +### AgreementsController - Version 2.0 (URL segment) +# Get agreement for an account using URL segment versioning +GET {{baseUrl}}/v2/agreements/account456 + +### AgreementsController - Version 2.0 (Query string) +# Get agreement for an account using query string versioning +GET {{baseUrl}}/agreements/account456?api-version=2.0 + +### OrdersController - Version 3.0 (URL segment) +# Get orders for an account using URL segment versioning +GET {{baseUrl}}/v3/orders/account789 + +### OrdersController - Version 3.0 (Query string) +# Get orders for an account using query string versioning +GET {{baseUrl}}/orders/account789?api-version=3.0 + +### AgreementsController - Version 3.0 (URL segment) +# Get agreement for an account using URL segment versioning +GET {{baseUrl}}/v3/agreements/account789 + +### AgreementsController - Version 3.0 (Query string) +# Get agreement for an account using query string versioning +GET {{baseUrl}}/agreements/account789?api-version=3.0 diff --git a/examples/AspNetCore/WebApi/ConventionsExample/ConventionsExample.http b/examples/AspNetCore/WebApi/ConventionsExample/ConventionsExample.http new file mode 100644 index 00000000..b1bcd615 --- /dev/null +++ b/examples/AspNetCore/WebApi/ConventionsExample/ConventionsExample.http @@ -0,0 +1,46 @@ +### +# ConventionsExample - ASP.NET Core API Versioning using Conventions +# This example demonstrates API versioning configured using conventions +### + +@baseUrl = http://localhost:5000 + +### ValuesController - Version 1.0 +# Get values using query string versioning +GET {{baseUrl}}/api/values?api-version=1.0 + +### ValuesController - Get by ID - Version 1.0 +# Get specific value by ID +GET {{baseUrl}}/api/values/42?api-version=1.0 + +### ValuesController - Version 2.0 +# Get values using query string versioning +GET {{baseUrl}}/api/values?api-version=2.0 + +### ValuesController - Get by ID - Version 2.0 +# Get specific value by ID +GET {{baseUrl}}/api/values/42?api-version=2.0 + +### ValuesController - Version 3.0 +# Get values using query string versioning +GET {{baseUrl}}/api/values?api-version=3.0 + +### ValuesController - Get by ID - Version 3.0 +# Get specific value by ID +GET {{baseUrl}}/api/values/42?api-version=3.0 + +### HelloWorldController - Version 1.0 +# Get hello world with URL segment versioning +GET {{baseUrl}}/api/v1.0/helloworld + +### HelloWorldController - Get by ID - Version 1.0 +# Get hello world with specific ID +GET {{baseUrl}}/api/v1.0/helloworld/42 + +### HelloWorldController - Version 2.0 +# Get hello world with URL segment versioning +GET {{baseUrl}}/api/v2.0/helloworld + +### HelloWorldController - Get by ID - Version 2.0 +# Get hello world with specific ID +GET {{baseUrl}}/api/v2.0/helloworld/42 diff --git a/examples/AspNetCore/WebApi/MinimalApiExample/MinimalApiExample.http b/examples/AspNetCore/WebApi/MinimalApiExample/MinimalApiExample.http new file mode 100644 index 00000000..1a80964e --- /dev/null +++ b/examples/AspNetCore/WebApi/MinimalApiExample/MinimalApiExample.http @@ -0,0 +1,33 @@ +### +# MinimalApiExample - ASP.NET Core Minimal API with Versioning +# This example demonstrates API versioning with Minimal APIs +### + +@baseUrl = http://localhost:5000 + +### WeatherForecast - Version 1.0 +# Get weather forecast (5 days) +GET {{baseUrl}}/weatherforecast?api-version=1.0 + +### WeatherForecast - Version 2.0 +# Get weather forecast (all summaries) +GET {{baseUrl}}/weatherforecast?api-version=2.0 + +### WeatherForecast - Create - Version 2.0 +# Create a new weather forecast +POST {{baseUrl}}/weatherforecast?api-version=2.0 +Content-Type: application/json + +{ + "date": "2024-01-15", + "temperatureC": 25, + "summary": "Warm" +} + +### WeatherForecast - Delete (Version Neutral) +# Delete weather forecast (version neutral endpoint) +DELETE {{baseUrl}}/weatherforecast?api-version=1.0 + +### WeatherForecast - Delete (Version Neutral with v2) +# Delete weather forecast (version neutral endpoint) +DELETE {{baseUrl}}/weatherforecast?api-version=2.0 diff --git a/examples/AspNetCore/WebApi/MinimalOpenApiExample/MinimalOpenApiExample.http b/examples/AspNetCore/WebApi/MinimalOpenApiExample/MinimalOpenApiExample.http new file mode 100644 index 00000000..ea92a76c --- /dev/null +++ b/examples/AspNetCore/WebApi/MinimalOpenApiExample/MinimalOpenApiExample.http @@ -0,0 +1,118 @@ +### +# MinimalOpenApiExample - ASP.NET Core Minimal API with OpenAPI and Versioning +# This example demonstrates API versioning with Minimal APIs and Swagger/OpenAPI support +### + +@baseUrl = http://localhost:5000 + +### Orders - Get by ID - Version 0.9 (Deprecated) +# Get a specific order (deprecated version) +GET {{baseUrl}}/api/orders/1?api-version=0.9 + +### Orders - Get by ID - Version 1.0 +# Get a specific order +GET {{baseUrl}}/api/orders/1?api-version=1.0 + +### Orders - Create - Version 1.0 +# Create a new order +POST {{baseUrl}}/api/orders?api-version=1.0 +Content-Type: application/json + +{ + "customer": "John Doe" +} + +### Orders - Update - Version 1.0 +# Update an existing order +PATCH {{baseUrl}}/api/orders/42?api-version=1.0 +Content-Type: application/json + +{ + "customer": "Jane Doe" +} + +### Orders - Get All - Version 2.0 +# Get all orders +GET {{baseUrl}}/api/orders?api-version=2.0 + +### Orders - Get by ID - Version 2.0 +# Get a specific order +GET {{baseUrl}}/api/orders/1?api-version=2.0 + +### Orders - Create - Version 2.0 +# Create a new order with effective date +POST {{baseUrl}}/api/orders?api-version=2.0 +Content-Type: application/json + +{ + "customer": "Bob Smith", + "effectiveDate": "2024-01-15T00:00:00Z" +} + +### Orders - Update - Version 2.0 +# Update an existing order +PATCH {{baseUrl}}/api/orders/42?api-version=2.0 +Content-Type: application/json + +{ + "customer": "Alice Johnson", + "effectiveDate": "2024-01-20T00:00:00Z" +} + +### Orders - Get All - Version 3.0 +# Get all orders +GET {{baseUrl}}/api/orders?api-version=3.0 + +### Orders - Get by ID - Version 3.0 +# Get a specific order +GET {{baseUrl}}/api/orders/1?api-version=3.0 + +### Orders - Create - Version 3.0 +# Create a new order +POST {{baseUrl}}/api/orders?api-version=3.0 +Content-Type: application/json + +{ + "customer": "Charlie Brown", + "effectiveDate": "2024-02-01T00:00:00Z" +} + +### Orders - Delete - Version 3.0 +# Delete an order +DELETE {{baseUrl}}/api/orders/42?api-version=3.0 + +### People - Get by ID - Version 0.9 (Deprecated) +# Get a specific person (deprecated version) +GET {{baseUrl}}/api/v0.9/people/1 + +### People - Get by ID - Version 1.0 +# Get a specific person +GET {{baseUrl}}/api/v1.0/people/1 + +### People - Get All - Version 2.0 +# Get all people +GET {{baseUrl}}/api/v2.0/people + +### People - Get by ID - Version 2.0 +# Get a specific person with email +GET {{baseUrl}}/api/v2.0/people/1 + +### People - Get All - Version 3.0 +# Get all people with phone numbers +GET {{baseUrl}}/api/v3.0/people + +### People - Get by ID - Version 3.0 +# Get a specific person with phone number +GET {{baseUrl}}/api/v3.0/people/1 + +### People - Create - Version 3.0 +# Create a new person +POST {{baseUrl}}/api/v3.0/people +Content-Type: application/json + +{ + "firstName": "John", + "lastName": "Doe", + "email": "john.doe@example.com", + "phone": "555-123-4567" +} diff --git a/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http b/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http new file mode 100644 index 00000000..9ff969e6 --- /dev/null +++ b/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http @@ -0,0 +1,118 @@ +### +# OpenApiExample - ASP.NET Core API Versioning with OpenAPI/Swagger +# This example demonstrates comprehensive API versioning with Swagger documentation +### + +@baseUrl = http://localhost:5000 + +### Orders - Get by ID - Version 0.9 (Deprecated) +# Get a specific order (deprecated version) +GET {{baseUrl}}/api/orders/1?api-version=0.9 + +### Orders - Get by ID - Version 1.0 +# Get a specific order +GET {{baseUrl}}/api/orders/1?api-version=1.0 + +### Orders - Create - Version 1.0 +# Place a new order +POST {{baseUrl}}/api/orders?api-version=1.0 +Content-Type: application/json + +{ + "customer": "John Doe" +} + +### Orders - Update - Version 1.0 +# Update an existing order +PATCH {{baseUrl}}/api/orders/42?api-version=1.0 +Content-Type: application/json + +{ + "customer": "Jane Doe" +} + +### Orders - Get All - Version 2.0 +# Get all orders +GET {{baseUrl}}/api/orders?api-version=2.0 + +### Orders - Get by ID - Version 2.0 +# Get a specific order with effective date +GET {{baseUrl}}/api/orders/1?api-version=2.0 + +### Orders - Create - Version 2.0 +# Place a new order with effective date +POST {{baseUrl}}/api/orders?api-version=2.0 +Content-Type: application/json + +{ + "customer": "Bob Smith", + "effectiveDate": "2024-01-15T00:00:00Z" +} + +### Orders - Update - Version 2.0 +# Update an existing order with effective date +PATCH {{baseUrl}}/api/orders/42?api-version=2.0 +Content-Type: application/json + +{ + "customer": "Alice Johnson", + "effectiveDate": "2024-01-20T00:00:00Z" +} + +### Orders - Get All - Version 3.0 +# Get all orders +GET {{baseUrl}}/api/orders?api-version=3.0 + +### Orders - Get by ID - Version 3.0 +# Get a specific order +GET {{baseUrl}}/api/orders/1?api-version=3.0 + +### Orders - Create - Version 3.0 +# Place a new order +POST {{baseUrl}}/api/orders?api-version=3.0 +Content-Type: application/json + +{ + "customer": "Charlie Brown", + "effectiveDate": "2024-02-01T00:00:00Z" +} + +### Orders - Delete - Version 3.0 +# Delete an order +DELETE {{baseUrl}}/api/orders/42?api-version=3.0 + +### People - Get by ID - Version 0.9 (Deprecated) +# Get a specific person (deprecated version) +GET {{baseUrl}}/api/v0.9/people/1 + +### People - Get by ID - Version 1.0 +# Get a specific person +GET {{baseUrl}}/api/v1.0/people/1 + +### People - Get All - Version 2.0 +# Get all people +GET {{baseUrl}}/api/v2.0/people + +### People - Get by ID - Version 2.0 +# Get a specific person with email +GET {{baseUrl}}/api/v2.0/people/1 + +### People - Get All - Version 3.0 +# Get all people with phone numbers +GET {{baseUrl}}/api/v3.0/people + +### People - Get by ID - Version 3.0 +# Get a specific person with phone number +GET {{baseUrl}}/api/v3.0/people/1 + +### People - Create - Version 3.0 +# Create a new person +POST {{baseUrl}}/api/v3.0/people +Content-Type: application/json + +{ + "firstName": "John", + "lastName": "Doe", + "email": "john.doe@example.com", + "phone": "555-123-4567" +} From e38747991a4c7b62a0ef54aacbd9fe1f2c3d90cf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Nov 2025 17:44:58 +0000 Subject: [PATCH 3/5] Fix comment consistency in .http files Co-authored-by: xavierjohn <1859710+xavierjohn@users.noreply.github.com> --- .../WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http | 4 ++-- .../WebApi/MinimalOpenApiExample/MinimalOpenApiExample.http | 4 ++-- examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http b/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http index 61894c7a..9882b876 100644 --- a/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http +++ b/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http @@ -14,7 +14,7 @@ GET {{baseUrl}}/api/orders/1?api-version=0.9 GET {{baseUrl}}/api/orders/1?api-version=1.0 ### Orders - Create - Version 1.0 -# Place a new order +# Create a new order POST {{baseUrl}}/api/orders?api-version=1.0 Content-Type: application/json @@ -36,7 +36,7 @@ Content-Type: application/json GET {{baseUrl}}/api/orders?api-version=2.0 ### Orders - Get by ID - Version 2.0 -# Get a specific order with effective date +# Get a specific order GET {{baseUrl}}/api/orders/1?api-version=2.0 ### Orders - Create - Version 2.0 diff --git a/examples/AspNetCore/WebApi/MinimalOpenApiExample/MinimalOpenApiExample.http b/examples/AspNetCore/WebApi/MinimalOpenApiExample/MinimalOpenApiExample.http index ea92a76c..8734a8b7 100644 --- a/examples/AspNetCore/WebApi/MinimalOpenApiExample/MinimalOpenApiExample.http +++ b/examples/AspNetCore/WebApi/MinimalOpenApiExample/MinimalOpenApiExample.http @@ -36,7 +36,7 @@ Content-Type: application/json GET {{baseUrl}}/api/orders?api-version=2.0 ### Orders - Get by ID - Version 2.0 -# Get a specific order +# Get a specific order (supports effective date in v2.0) GET {{baseUrl}}/api/orders/1?api-version=2.0 ### Orders - Create - Version 2.0 @@ -50,7 +50,7 @@ Content-Type: application/json } ### Orders - Update - Version 2.0 -# Update an existing order +# Update an existing order (supports effective date in v2.0) PATCH {{baseUrl}}/api/orders/42?api-version=2.0 Content-Type: application/json diff --git a/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http b/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http index 9ff969e6..9f0b1e2c 100644 --- a/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http +++ b/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http @@ -14,7 +14,7 @@ GET {{baseUrl}}/api/orders/1?api-version=0.9 GET {{baseUrl}}/api/orders/1?api-version=1.0 ### Orders - Create - Version 1.0 -# Place a new order +# Create a new order POST {{baseUrl}}/api/orders?api-version=1.0 Content-Type: application/json @@ -36,7 +36,7 @@ Content-Type: application/json GET {{baseUrl}}/api/orders?api-version=2.0 ### Orders - Get by ID - Version 2.0 -# Get a specific order with effective date +# Get a specific order GET {{baseUrl}}/api/orders/1?api-version=2.0 ### Orders - Create - Version 2.0 From 06fb6212e8029c046bf502989a591db508899403 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Nov 2025 17:47:53 +0000 Subject: [PATCH 4/5] Ensure consistent comment terminology across all .http files Co-authored-by: xavierjohn <1859710+xavierjohn@users.noreply.github.com> --- .../OpenApiODataWebApiExample.http | 6 +++--- .../WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http | 4 ++-- .../OData/ODataOpenApiExample/ODataOpenApiExample.http | 6 +++--- .../AspNetCore/WebApi/OpenApiExample/OpenApiExample.http | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/AspNet/OData/OpenApiODataWebApiExample/OpenApiODataWebApiExample.http b/examples/AspNet/OData/OpenApiODataWebApiExample/OpenApiODataWebApiExample.http index b8d237b6..d5097da9 100644 --- a/examples/AspNet/OData/OpenApiODataWebApiExample/OpenApiODataWebApiExample.http +++ b/examples/AspNet/OData/OpenApiODataWebApiExample/OpenApiODataWebApiExample.http @@ -18,7 +18,7 @@ GET {{baseUrl}}/api/orders/1?api-version=1.0 GET {{baseUrl}}/api/orders/1?api-version=1.0&$select=Id,Customer ### Orders - Create - Version 1.0 -# Place a new order +# Create a new order POST {{baseUrl}}/api/orders?api-version=1.0 Content-Type: application/json @@ -43,7 +43,7 @@ GET {{baseUrl}}/api/orders?api-version=2.0&$select=Id,Customer GET {{baseUrl}}/api/orders/1?api-version=2.0 ### Orders - Create - Version 2.0 -# Place a new order with effective date +# Create a new order with effective date POST {{baseUrl}}/api/orders?api-version=2.0 Content-Type: application/json @@ -77,7 +77,7 @@ GET {{baseUrl}}/api/orders?api-version=3.0&$filter=Id gt 1 GET {{baseUrl}}/api/orders/1?api-version=3.0 ### Orders - Create - Version 3.0 -# Place a new order +# Create a new order POST {{baseUrl}}/api/orders?api-version=3.0 Content-Type: application/json diff --git a/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http b/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http index 9882b876..289a003b 100644 --- a/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http +++ b/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http @@ -40,7 +40,7 @@ GET {{baseUrl}}/api/orders?api-version=2.0 GET {{baseUrl}}/api/orders/1?api-version=2.0 ### Orders - Create - Version 2.0 -# Place a new order with effective date +# Create a new order with effective date POST {{baseUrl}}/api/orders?api-version=2.0 Content-Type: application/json @@ -68,7 +68,7 @@ GET {{baseUrl}}/api/orders?api-version=3.0 GET {{baseUrl}}/api/orders/1?api-version=3.0 ### Orders - Create - Version 3.0 -# Place a new order +# Create a new order POST {{baseUrl}}/api/orders?api-version=3.0 Content-Type: application/json diff --git a/examples/AspNetCore/OData/ODataOpenApiExample/ODataOpenApiExample.http b/examples/AspNetCore/OData/ODataOpenApiExample/ODataOpenApiExample.http index 0960b718..858fe3ff 100644 --- a/examples/AspNetCore/OData/ODataOpenApiExample/ODataOpenApiExample.http +++ b/examples/AspNetCore/OData/ODataOpenApiExample/ODataOpenApiExample.http @@ -18,7 +18,7 @@ GET {{baseUrl}}/api/orders/1?api-version=1.0 GET {{baseUrl}}/api/orders/1?api-version=1.0&$select=Id,Customer ### Orders - Create - Version 1.0 -# Place a new order +# Create a new order POST {{baseUrl}}/api/orders?api-version=1.0 Content-Type: application/json @@ -43,7 +43,7 @@ GET {{baseUrl}}/api/orders?api-version=2.0&$select=Id,Customer GET {{baseUrl}}/api/orders/1?api-version=2.0 ### Orders - Create - Version 2.0 -# Place a new order with effective date +# Create a new order with effective date POST {{baseUrl}}/api/orders?api-version=2.0 Content-Type: application/json @@ -77,7 +77,7 @@ GET {{baseUrl}}/api/orders?api-version=3.0&$filter=Id gt 1 GET {{baseUrl}}/api/orders/1?api-version=3.0 ### Orders - Create - Version 3.0 -# Place a new order +# Create a new order POST {{baseUrl}}/api/orders?api-version=3.0 Content-Type: application/json diff --git a/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http b/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http index 9f0b1e2c..ae9e812b 100644 --- a/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http +++ b/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http @@ -40,7 +40,7 @@ GET {{baseUrl}}/api/orders?api-version=2.0 GET {{baseUrl}}/api/orders/1?api-version=2.0 ### Orders - Create - Version 2.0 -# Place a new order with effective date +# Create a new order with effective date POST {{baseUrl}}/api/orders?api-version=2.0 Content-Type: application/json @@ -68,7 +68,7 @@ GET {{baseUrl}}/api/orders?api-version=3.0 GET {{baseUrl}}/api/orders/1?api-version=3.0 ### Orders - Create - Version 3.0 -# Place a new order +# Create a new order POST {{baseUrl}}/api/orders?api-version=3.0 Content-Type: application/json From bbbade731b28ffc3bd49e8919d8a36dfe27bee55 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Nov 2025 22:41:10 +0000 Subject: [PATCH 5/5] Simplify .http files to only show GET methods with different versions Co-authored-by: xavierjohn <1859710+xavierjohn@users.noreply.github.com> --- .../AdvancedODataWebApiExample.http | 10 --- .../BasicODataWebApiExample.http | 10 --- .../ConventionsODataWebApiExample.http | 10 --- .../OpenApiODataWebApiExample.http | 29 -------- .../BasicWebApiExample.http | 5 -- .../OpenApiWebApiExample.http | 64 ----------------- .../ODataAdvancedExample.http | 10 --- .../ODataBasicExample/ODataBasicExample.http | 10 --- .../ODataConventionsExample.http | 10 --- .../ODataOpenApiExample.http | 29 -------- .../WebApi/BasicExample/BasicExample.http | 5 -- .../MinimalApiExample/MinimalApiExample.http | 19 ----- .../MinimalOpenApiExample.http | 72 ++----------------- .../WebApi/OpenApiExample/OpenApiExample.http | 70 +----------------- 14 files changed, 7 insertions(+), 346 deletions(-) diff --git a/examples/AspNet/OData/AdvancedODataWebApiExample/AdvancedODataWebApiExample.http b/examples/AspNet/OData/AdvancedODataWebApiExample/AdvancedODataWebApiExample.http index 6e8b71a5..e242f170 100644 --- a/examples/AspNet/OData/AdvancedODataWebApiExample/AdvancedODataWebApiExample.http +++ b/examples/AspNet/OData/AdvancedODataWebApiExample/AdvancedODataWebApiExample.http @@ -37,16 +37,6 @@ GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email # Get a specific person by ID GET {{baseUrl}}/api/people/1?api-version=2.0 -### People - Patch - Version 2.0 -# Update a person using OData PATCH -PATCH {{baseUrl}}/api/people/1?api-version=2.0 -Content-Type: application/json - -{ - "firstName": "Jane", - "email": "jane.mei@somewhere.com" -} - ### People (V2) - Get All - Version 2.0 # Get all people from version 2 specific controller GET {{baseUrl}}/api/people2?api-version=2.0 diff --git a/examples/AspNet/OData/BasicODataWebApiExample/BasicODataWebApiExample.http b/examples/AspNet/OData/BasicODataWebApiExample/BasicODataWebApiExample.http index 818ba152..bd9c2106 100644 --- a/examples/AspNet/OData/BasicODataWebApiExample/BasicODataWebApiExample.http +++ b/examples/AspNet/OData/BasicODataWebApiExample/BasicODataWebApiExample.http @@ -33,16 +33,6 @@ GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email # Get a specific person by ID GET {{baseUrl}}/api/people/1?api-version=2.0 -### People - Patch - Version 2.0 -# Update a person using OData PATCH -PATCH {{baseUrl}}/api/people/1?api-version=2.0 -Content-Type: application/json - -{ - "firstName": "Jane", - "email": "jane.mei@somewhere.com" -} - ### Orders - Get All - Version 1.0 # Get all orders GET {{baseUrl}}/api/v1/orders diff --git a/examples/AspNet/OData/ConventionsODataWebApiExample/ConventionsODataWebApiExample.http b/examples/AspNet/OData/ConventionsODataWebApiExample/ConventionsODataWebApiExample.http index b15e46b6..040c6496 100644 --- a/examples/AspNet/OData/ConventionsODataWebApiExample/ConventionsODataWebApiExample.http +++ b/examples/AspNet/OData/ConventionsODataWebApiExample/ConventionsODataWebApiExample.http @@ -33,16 +33,6 @@ GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email # Get a specific person by ID GET {{baseUrl}}/api/people/1?api-version=2.0 -### People - Patch - Version 2.0 -# Update a person using OData PATCH -PATCH {{baseUrl}}/api/people/1?api-version=2.0 -Content-Type: application/json - -{ - "firstName": "Jane", - "email": "jane.mei@somewhere.com" -} - ### Orders - Get All - Version 1.0 # Get all orders GET {{baseUrl}}/api/v1/orders diff --git a/examples/AspNet/OData/OpenApiODataWebApiExample/OpenApiODataWebApiExample.http b/examples/AspNet/OData/OpenApiODataWebApiExample/OpenApiODataWebApiExample.http index d5097da9..b69c476e 100644 --- a/examples/AspNet/OData/OpenApiODataWebApiExample/OpenApiODataWebApiExample.http +++ b/examples/AspNet/OData/OpenApiODataWebApiExample/OpenApiODataWebApiExample.http @@ -17,15 +17,6 @@ GET {{baseUrl}}/api/orders/1?api-version=1.0 # Get a specific order with selected fields GET {{baseUrl}}/api/orders/1?api-version=1.0&$select=Id,Customer -### Orders - Create - Version 1.0 -# Create a new order -POST {{baseUrl}}/api/orders?api-version=1.0 -Content-Type: application/json - -{ - "customer": "John Doe" -} - ### People - Get by Key - Version 1.0 # Get a specific person GET {{baseUrl}}/api/people/1?api-version=1.0 @@ -42,16 +33,6 @@ GET {{baseUrl}}/api/orders?api-version=2.0&$select=Id,Customer # Get a specific order GET {{baseUrl}}/api/orders/1?api-version=2.0 -### Orders - Create - Version 2.0 -# Create a new order with effective date -POST {{baseUrl}}/api/orders?api-version=2.0 -Content-Type: application/json - -{ - "customer": "Bob Smith", - "effectiveDate": "2024-01-15T00:00:00Z" -} - ### People - Get All - Version 2.0 # Get all people GET {{baseUrl}}/api/people?api-version=2.0 @@ -76,16 +57,6 @@ GET {{baseUrl}}/api/orders?api-version=3.0&$filter=Id gt 1 # Get a specific order GET {{baseUrl}}/api/orders/1?api-version=3.0 -### Orders - Create - Version 3.0 -# Create a new order -POST {{baseUrl}}/api/orders?api-version=3.0 -Content-Type: application/json - -{ - "customer": "Charlie Brown", - "effectiveDate": "2024-02-01T00:00:00Z" -} - ### People - Get All - Version 3.0 # Get all people with phone numbers GET {{baseUrl}}/api/people?api-version=3.0 diff --git a/examples/AspNet/WebApi/BasicWebApiExample/BasicWebApiExample.http b/examples/AspNet/WebApi/BasicWebApiExample/BasicWebApiExample.http index 59a6fa24..7d0e2374 100644 --- a/examples/AspNet/WebApi/BasicWebApiExample/BasicWebApiExample.http +++ b/examples/AspNet/WebApi/BasicWebApiExample/BasicWebApiExample.http @@ -20,8 +20,3 @@ GET {{baseUrl}}/api/v1.0/helloworld ### HelloWorldController - Get by ID - Version 1.0 # Get hello world with specific ID GET {{baseUrl}}/api/v1.0/helloworld/42 - -### HelloWorldController - Create - Version 1.0 -# Create new hello world resource -POST {{baseUrl}}/api/v1.0/helloworld -Content-Type: application/json diff --git a/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http b/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http index 289a003b..9feb2bf7 100644 --- a/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http +++ b/examples/AspNet/WebApi/OpenApiWebApiExample/OpenApiWebApiExample.http @@ -13,24 +13,6 @@ GET {{baseUrl}}/api/orders/1?api-version=0.9 # Get a specific order GET {{baseUrl}}/api/orders/1?api-version=1.0 -### Orders - Create - Version 1.0 -# Create a new order -POST {{baseUrl}}/api/orders?api-version=1.0 -Content-Type: application/json - -{ - "customer": "John Doe" -} - -### Orders - Update - Version 1.0 -# Update an existing order -PATCH {{baseUrl}}/api/orders/42?api-version=1.0 -Content-Type: application/json - -{ - "customer": "Jane Doe" -} - ### Orders - Get All - Version 2.0 # Get all orders GET {{baseUrl}}/api/orders?api-version=2.0 @@ -39,26 +21,6 @@ GET {{baseUrl}}/api/orders?api-version=2.0 # Get a specific order GET {{baseUrl}}/api/orders/1?api-version=2.0 -### Orders - Create - Version 2.0 -# Create a new order with effective date -POST {{baseUrl}}/api/orders?api-version=2.0 -Content-Type: application/json - -{ - "customer": "Bob Smith", - "effectiveDate": "2024-01-15T00:00:00Z" -} - -### Orders - Update - Version 2.0 -# Update an existing order with effective date -PATCH {{baseUrl}}/api/orders/42?api-version=2.0 -Content-Type: application/json - -{ - "customer": "Alice Johnson", - "effectiveDate": "2024-01-20T00:00:00Z" -} - ### Orders - Get All - Version 3.0 # Get all orders GET {{baseUrl}}/api/orders?api-version=3.0 @@ -67,20 +29,6 @@ GET {{baseUrl}}/api/orders?api-version=3.0 # Get a specific order GET {{baseUrl}}/api/orders/1?api-version=3.0 -### Orders - Create - Version 3.0 -# Create a new order -POST {{baseUrl}}/api/orders?api-version=3.0 -Content-Type: application/json - -{ - "customer": "Charlie Brown", - "effectiveDate": "2024-02-01T00:00:00Z" -} - -### Orders - Delete - Version 3.0 -# Delete an order -DELETE {{baseUrl}}/api/orders/42?api-version=3.0 - ### People - Get by ID - Version 0.9 (Deprecated) # Get a specific person (deprecated version) GET {{baseUrl}}/api/v0.9/people/1 @@ -104,15 +52,3 @@ GET {{baseUrl}}/api/v3.0/people ### People - Get by ID - Version 3.0 # Get a specific person with phone number GET {{baseUrl}}/api/v3.0/people/1 - -### People - Create - Version 3.0 -# Create a new person -POST {{baseUrl}}/api/v3.0/people -Content-Type: application/json - -{ - "firstName": "John", - "lastName": "Doe", - "email": "john.doe@example.com", - "phone": "555-123-4567" -} diff --git a/examples/AspNetCore/OData/ODataAdvancedExample/ODataAdvancedExample.http b/examples/AspNetCore/OData/ODataAdvancedExample/ODataAdvancedExample.http index f4c18b6f..56d7de86 100644 --- a/examples/AspNetCore/OData/ODataAdvancedExample/ODataAdvancedExample.http +++ b/examples/AspNetCore/OData/ODataAdvancedExample/ODataAdvancedExample.http @@ -37,16 +37,6 @@ GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email # Get a specific person by ID GET {{baseUrl}}/api/people/1?api-version=2.0 -### People - Patch - Version 2.0 -# Update a person using OData PATCH -PATCH {{baseUrl}}/api/people/1?api-version=2.0 -Content-Type: application/json - -{ - "firstName": "Jane", - "email": "jane.mei@somewhere.com" -} - ### People (V2) - Get All - Version 2.0 # Get all people from version 2 specific controller GET {{baseUrl}}/api/people2?api-version=2.0 diff --git a/examples/AspNetCore/OData/ODataBasicExample/ODataBasicExample.http b/examples/AspNetCore/OData/ODataBasicExample/ODataBasicExample.http index 88b57dba..3b78cc6e 100644 --- a/examples/AspNetCore/OData/ODataBasicExample/ODataBasicExample.http +++ b/examples/AspNetCore/OData/ODataBasicExample/ODataBasicExample.http @@ -33,16 +33,6 @@ GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email # Get a specific person by ID GET {{baseUrl}}/api/people/1?api-version=2.0 -### People - Patch - Version 2.0 -# Update a person using OData PATCH -PATCH {{baseUrl}}/api/people/1?api-version=2.0 -Content-Type: application/json - -{ - "firstName": "Jane", - "email": "jane.mei@somewhere.com" -} - ### Orders - Get All - Version 1.0 # Get all orders GET {{baseUrl}}/api/v1/orders diff --git a/examples/AspNetCore/OData/ODataConventionsExample/ODataConventionsExample.http b/examples/AspNetCore/OData/ODataConventionsExample/ODataConventionsExample.http index 1d16612e..a051add9 100644 --- a/examples/AspNetCore/OData/ODataConventionsExample/ODataConventionsExample.http +++ b/examples/AspNetCore/OData/ODataConventionsExample/ODataConventionsExample.http @@ -33,16 +33,6 @@ GET {{baseUrl}}/api/people?api-version=2.0&$select=FirstName,LastName,Email # Get a specific person by ID GET {{baseUrl}}/api/people/1?api-version=2.0 -### People - Patch - Version 2.0 -# Update a person using OData PATCH -PATCH {{baseUrl}}/api/people/1?api-version=2.0 -Content-Type: application/json - -{ - "firstName": "Jane", - "email": "jane.mei@somewhere.com" -} - ### Orders - Get All - Version 1.0 # Get all orders GET {{baseUrl}}/api/v1/orders diff --git a/examples/AspNetCore/OData/ODataOpenApiExample/ODataOpenApiExample.http b/examples/AspNetCore/OData/ODataOpenApiExample/ODataOpenApiExample.http index 858fe3ff..3e0d22d3 100644 --- a/examples/AspNetCore/OData/ODataOpenApiExample/ODataOpenApiExample.http +++ b/examples/AspNetCore/OData/ODataOpenApiExample/ODataOpenApiExample.http @@ -17,15 +17,6 @@ GET {{baseUrl}}/api/orders/1?api-version=1.0 # Get a specific order with selected fields GET {{baseUrl}}/api/orders/1?api-version=1.0&$select=Id,Customer -### Orders - Create - Version 1.0 -# Create a new order -POST {{baseUrl}}/api/orders?api-version=1.0 -Content-Type: application/json - -{ - "customer": "John Doe" -} - ### People - Get by Key - Version 1.0 # Get a specific person GET {{baseUrl}}/api/people/1?api-version=1.0 @@ -42,16 +33,6 @@ GET {{baseUrl}}/api/orders?api-version=2.0&$select=Id,Customer # Get a specific order GET {{baseUrl}}/api/orders/1?api-version=2.0 -### Orders - Create - Version 2.0 -# Create a new order with effective date -POST {{baseUrl}}/api/orders?api-version=2.0 -Content-Type: application/json - -{ - "customer": "Bob Smith", - "effectiveDate": "2024-01-15T00:00:00Z" -} - ### People - Get All - Version 2.0 # Get all people GET {{baseUrl}}/api/people?api-version=2.0 @@ -76,16 +57,6 @@ GET {{baseUrl}}/api/orders?api-version=3.0&$filter=Id gt 1 # Get a specific order GET {{baseUrl}}/api/orders/1?api-version=3.0 -### Orders - Create - Version 3.0 -# Create a new order -POST {{baseUrl}}/api/orders?api-version=3.0 -Content-Type: application/json - -{ - "customer": "Charlie Brown", - "effectiveDate": "2024-02-01T00:00:00Z" -} - ### People - Get All - Version 3.0 # Get all people with phone numbers GET {{baseUrl}}/api/people?api-version=3.0 diff --git a/examples/AspNetCore/WebApi/BasicExample/BasicExample.http b/examples/AspNetCore/WebApi/BasicExample/BasicExample.http index 31774989..6ff45be9 100644 --- a/examples/AspNetCore/WebApi/BasicExample/BasicExample.http +++ b/examples/AspNetCore/WebApi/BasicExample/BasicExample.http @@ -21,11 +21,6 @@ GET {{baseUrl}}/api/v1.0/helloworld # Get hello world with specific ID GET {{baseUrl}}/api/v1.0/helloworld/42 -### HelloWorldController - Create - Version 1.0 -# Create new hello world resource -POST {{baseUrl}}/api/v1.0/helloworld -Content-Type: application/json - ### MultiVersionedController - Version 1.0 # Get from controller that supports multiple versions GET {{baseUrl}}/api/v1.0/multiversioned diff --git a/examples/AspNetCore/WebApi/MinimalApiExample/MinimalApiExample.http b/examples/AspNetCore/WebApi/MinimalApiExample/MinimalApiExample.http index 1a80964e..ebfed59f 100644 --- a/examples/AspNetCore/WebApi/MinimalApiExample/MinimalApiExample.http +++ b/examples/AspNetCore/WebApi/MinimalApiExample/MinimalApiExample.http @@ -12,22 +12,3 @@ GET {{baseUrl}}/weatherforecast?api-version=1.0 ### WeatherForecast - Version 2.0 # Get weather forecast (all summaries) GET {{baseUrl}}/weatherforecast?api-version=2.0 - -### WeatherForecast - Create - Version 2.0 -# Create a new weather forecast -POST {{baseUrl}}/weatherforecast?api-version=2.0 -Content-Type: application/json - -{ - "date": "2024-01-15", - "temperatureC": 25, - "summary": "Warm" -} - -### WeatherForecast - Delete (Version Neutral) -# Delete weather forecast (version neutral endpoint) -DELETE {{baseUrl}}/weatherforecast?api-version=1.0 - -### WeatherForecast - Delete (Version Neutral with v2) -# Delete weather forecast (version neutral endpoint) -DELETE {{baseUrl}}/weatherforecast?api-version=2.0 diff --git a/examples/AspNetCore/WebApi/MinimalOpenApiExample/MinimalOpenApiExample.http b/examples/AspNetCore/WebApi/MinimalOpenApiExample/MinimalOpenApiExample.http index 8734a8b7..f7951be9 100644 --- a/examples/AspNetCore/WebApi/MinimalOpenApiExample/MinimalOpenApiExample.http +++ b/examples/AspNetCore/WebApi/MinimalOpenApiExample/MinimalOpenApiExample.http @@ -13,52 +13,14 @@ GET {{baseUrl}}/api/orders/1?api-version=0.9 # Get a specific order GET {{baseUrl}}/api/orders/1?api-version=1.0 -### Orders - Create - Version 1.0 -# Create a new order -POST {{baseUrl}}/api/orders?api-version=1.0 -Content-Type: application/json - -{ - "customer": "John Doe" -} - -### Orders - Update - Version 1.0 -# Update an existing order -PATCH {{baseUrl}}/api/orders/42?api-version=1.0 -Content-Type: application/json - -{ - "customer": "Jane Doe" -} - ### Orders - Get All - Version 2.0 # Get all orders GET {{baseUrl}}/api/orders?api-version=2.0 ### Orders - Get by ID - Version 2.0 -# Get a specific order (supports effective date in v2.0) +# Get a specific order GET {{baseUrl}}/api/orders/1?api-version=2.0 -### Orders - Create - Version 2.0 -# Create a new order with effective date -POST {{baseUrl}}/api/orders?api-version=2.0 -Content-Type: application/json - -{ - "customer": "Bob Smith", - "effectiveDate": "2024-01-15T00:00:00Z" -} - -### Orders - Update - Version 2.0 -# Update an existing order (supports effective date in v2.0) -PATCH {{baseUrl}}/api/orders/42?api-version=2.0 -Content-Type: application/json - -{ - "customer": "Alice Johnson", - "effectiveDate": "2024-01-20T00:00:00Z" -} - ### Orders - Get All - Version 3.0 # Get all orders GET {{baseUrl}}/api/orders?api-version=3.0 @@ -67,20 +29,6 @@ GET {{baseUrl}}/api/orders?api-version=3.0 # Get a specific order GET {{baseUrl}}/api/orders/1?api-version=3.0 -### Orders - Create - Version 3.0 -# Create a new order -POST {{baseUrl}}/api/orders?api-version=3.0 -Content-Type: application/json - -{ - "customer": "Charlie Brown", - "effectiveDate": "2024-02-01T00:00:00Z" -} - -### Orders - Delete - Version 3.0 -# Delete an order -DELETE {{baseUrl}}/api/orders/42?api-version=3.0 - ### People - Get by ID - Version 0.9 (Deprecated) # Get a specific person (deprecated version) GET {{baseUrl}}/api/v0.9/people/1 @@ -94,25 +42,13 @@ GET {{baseUrl}}/api/v1.0/people/1 GET {{baseUrl}}/api/v2.0/people ### People - Get by ID - Version 2.0 -# Get a specific person with email +# Get a specific person GET {{baseUrl}}/api/v2.0/people/1 ### People - Get All - Version 3.0 -# Get all people with phone numbers +# Get all people GET {{baseUrl}}/api/v3.0/people ### People - Get by ID - Version 3.0 -# Get a specific person with phone number +# Get a specific person GET {{baseUrl}}/api/v3.0/people/1 - -### People - Create - Version 3.0 -# Create a new person -POST {{baseUrl}}/api/v3.0/people -Content-Type: application/json - -{ - "firstName": "John", - "lastName": "Doe", - "email": "john.doe@example.com", - "phone": "555-123-4567" -} diff --git a/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http b/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http index ae9e812b..bac572fa 100644 --- a/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http +++ b/examples/AspNetCore/WebApi/OpenApiExample/OpenApiExample.http @@ -13,24 +13,6 @@ GET {{baseUrl}}/api/orders/1?api-version=0.9 # Get a specific order GET {{baseUrl}}/api/orders/1?api-version=1.0 -### Orders - Create - Version 1.0 -# Create a new order -POST {{baseUrl}}/api/orders?api-version=1.0 -Content-Type: application/json - -{ - "customer": "John Doe" -} - -### Orders - Update - Version 1.0 -# Update an existing order -PATCH {{baseUrl}}/api/orders/42?api-version=1.0 -Content-Type: application/json - -{ - "customer": "Jane Doe" -} - ### Orders - Get All - Version 2.0 # Get all orders GET {{baseUrl}}/api/orders?api-version=2.0 @@ -39,26 +21,6 @@ GET {{baseUrl}}/api/orders?api-version=2.0 # Get a specific order GET {{baseUrl}}/api/orders/1?api-version=2.0 -### Orders - Create - Version 2.0 -# Create a new order with effective date -POST {{baseUrl}}/api/orders?api-version=2.0 -Content-Type: application/json - -{ - "customer": "Bob Smith", - "effectiveDate": "2024-01-15T00:00:00Z" -} - -### Orders - Update - Version 2.0 -# Update an existing order with effective date -PATCH {{baseUrl}}/api/orders/42?api-version=2.0 -Content-Type: application/json - -{ - "customer": "Alice Johnson", - "effectiveDate": "2024-01-20T00:00:00Z" -} - ### Orders - Get All - Version 3.0 # Get all orders GET {{baseUrl}}/api/orders?api-version=3.0 @@ -67,20 +29,6 @@ GET {{baseUrl}}/api/orders?api-version=3.0 # Get a specific order GET {{baseUrl}}/api/orders/1?api-version=3.0 -### Orders - Create - Version 3.0 -# Create a new order -POST {{baseUrl}}/api/orders?api-version=3.0 -Content-Type: application/json - -{ - "customer": "Charlie Brown", - "effectiveDate": "2024-02-01T00:00:00Z" -} - -### Orders - Delete - Version 3.0 -# Delete an order -DELETE {{baseUrl}}/api/orders/42?api-version=3.0 - ### People - Get by ID - Version 0.9 (Deprecated) # Get a specific person (deprecated version) GET {{baseUrl}}/api/v0.9/people/1 @@ -94,25 +42,13 @@ GET {{baseUrl}}/api/v1.0/people/1 GET {{baseUrl}}/api/v2.0/people ### People - Get by ID - Version 2.0 -# Get a specific person with email +# Get a specific person GET {{baseUrl}}/api/v2.0/people/1 ### People - Get All - Version 3.0 -# Get all people with phone numbers +# Get all people GET {{baseUrl}}/api/v3.0/people ### People - Get by ID - Version 3.0 -# Get a specific person with phone number +# Get a specific person GET {{baseUrl}}/api/v3.0/people/1 - -### People - Create - Version 3.0 -# Create a new person -POST {{baseUrl}}/api/v3.0/people -Content-Type: application/json - -{ - "firstName": "John", - "lastName": "Doe", - "email": "john.doe@example.com", - "phone": "555-123-4567" -}