From 728fd67b40f60d8342db86fe490089a58eeafb40 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 11:39:05 +0000 Subject: [PATCH 1/4] Initial plan From 5c267519b41dead82efb8d63e143c5a3e1add552 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 11:44:21 +0000 Subject: [PATCH 2/4] Prioritise homepage content to align with top 10 Dev Proxy developer scenarios Co-authored-by: garrytrinder <11563347+garrytrinder@users.noreply.github.com> --- src/pages/index.astro | 109 ++++++++++++++++++++---------------------- 1 file changed, 52 insertions(+), 57 deletions(-) diff --git a/src/pages/index.astro b/src/pages/index.astro index be517ab..0432888 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -78,9 +78,31 @@ import Layout from '../layouts/Layout.astro';
- +
+

API Mocking

+

Mock APIs that don't exist yet.

+

+ Stand up a fully-functional CRUD API without writing a single line of server code. Design, prototype, and build your frontend in parallel with your backend. +

+ + Learn more → + +
+
+

// No backend? No problem.

+

GET /products → list

+

POST /products → create

+

PUT /products/:id → update

+

DEL /products/:id → delete

+

// Zero lines of server code.

+
+
+ + +
+

Resilience Testing

See how your app handles API errors.

@@ -90,7 +112,7 @@ import Layout from '../layouts/Layout.astro'; Learn more →

-
+

// Your app makes a normal API call

fetch('https://api.contoso.com/orders')

// Dev Proxy intercepts and returns

@@ -101,7 +123,30 @@ import Layout from '../layouts/Layout.astro';
- + +
+
+

AI / LLM Testing

+

Build & test AI apps without burning tokens.

+

+ Simulate responses from OpenAI, Azure OpenAI, and other language model APIs. Test error handling, content filtering, and rate limits without real API costs. +

+ + Learn more → + +
+
+

// Your app calls an LLM API

+

POST /openai/deployments/chat/completions

+

// Dev Proxy simulates failures

+

429 Rate limit exceeded

+

400 Content filter triggered

+

500 Model unavailable

+

// Save costs. Ship with confidence.

+
+
+ +

Rate Limit Simulation

@@ -141,56 +186,6 @@ import Layout from '../layouts/Layout.astro';
- -
-
-

API Mocking

-

Mock APIs that don't exist yet.

-

- Stand up a fully-functional CRUD API without writing a single line of server code. Design, prototype, and build your frontend in parallel with your backend. -

- - Learn more → - -
-
-

// No backend? No problem.

-

GET /products → list

-

POST /products → create

-

PUT /products/:id → update

-

DEL /products/:id → delete

-

// Zero lines of server code.

-
-
- - -
-
-

Latency Simulation

-

Test what happens when APIs are slow.

-

- Add realistic latency to any API response. Make sure your loading states, timeouts, and cancellation logic work as expected. -

- - Learn more → - -
-
- -

3,200ms

-

simulated response time

-
-
-
@@ -254,12 +249,12 @@ import Layout from '../layouts/Layout.astro';
{[ - { title: 'Test my app handles API errors', time: '5 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/test-my-app-with-random-errors' }, { title: 'Mock an API that doesn\'t exist yet', time: '10 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/simulate-crud-api' }, - { title: 'Check my Microsoft Graph permissions', time: '10 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/check-minimal-api-permissions' }, - { title: 'Discover what APIs my app calls', time: '5 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/discover-urls-to-watch' }, - { title: 'Automate API testing in CI/CD', time: '15 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/use-dev-proxy-in-ci-cd-overview' }, + { title: 'Test my app handles API errors', time: '5 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/test-my-app-with-random-errors' }, { title: 'Simulate LLM API failures', time: '10 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/simulate-errors-from-language-model-apis' }, + { title: 'Simulate rate limiting responses', time: '10 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/simulate-rate-limit-api-responses' }, + { title: 'Automate API testing in CI/CD', time: '15 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/use-dev-proxy-in-ci-cd-overview' }, + { title: 'Discover what APIs my app calls', time: '5 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/discover-urls-to-watch' }, ].map((scenario) => ( Date: Wed, 4 Mar 2026 11:45:15 +0000 Subject: [PATCH 3/4] Fix HTML entity in AI/LLM heading per code review Co-authored-by: garrytrinder <11563347+garrytrinder@users.noreply.github.com> --- src/pages/index.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/index.astro b/src/pages/index.astro index 0432888..bb87b09 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -127,7 +127,7 @@ import Layout from '../layouts/Layout.astro';

AI / LLM Testing

-

Build & test AI apps without burning tokens.

+

Build & test AI apps without burning tokens.

Simulate responses from OpenAI, Azure OpenAI, and other language model APIs. Test error handling, content filtering, and rate limits without real API costs.

From 6e22ce63a92df87fc48cfbbb5ffbc0def78f7cda Mon Sep 17 00:00:00 2001 From: Garry Trinder Date: Wed, 4 Mar 2026 14:26:34 +0000 Subject: [PATCH 4/4] Refactor Dev Proxy output for improved clarity and update links to OpenAI documentation --- src/pages/index.astro | 105 ++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 50 deletions(-) diff --git a/src/pages/index.astro b/src/pages/index.astro index bb87b09..8b00997 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -49,12 +49,17 @@ import Layout from '../layouts/Layout.astro'; terminal
-
-

$ devproxy

-

Listening on 127.0.0.1:8000...

-

200 GET https://api.contoso.com/users

-

429 GET https://api.contoso.com/data ← throttled

-

500 POST https://api.contoso.com/items ← server error

+
+

devproxy

+

  info    Dev Proxy listening on 127.0.0.1:8000...

+

+

  req    GET https://api.contoso.com/posts

+

  skip   GenericRandomErrorPlugin: Pass through

+

  pass   Passed through

+

+

  req    GET https://api.contoso.com/posts

+

  skip   RetryAfterPlugin: Request not throttled

+

  oops   GenericRandomErrorPlugin: 429 429

@@ -91,12 +96,14 @@ import Layout from '../layouts/Layout.astro';
-

// No backend? No problem.

-

GET /products → list

-

POST /products → create

-

PUT /products/:id → update

-

DEL /products/:id → delete

-

// Zero lines of server code.

+

// customers-api.json — CrudApiPlugin

+

"baseUrl": "https://api.contoso.com/customers"

+

getAll GET    /customers

+

getOne GET    /customers/{id}

+

create POST   /customers

+

merge  PATCH  /customers/{id}

+

delete DELETE /customers/{id}

+

// Defined in JSON. Zero server code.

@@ -113,13 +120,13 @@ import Layout from '../layouts/Layout.astro';
-

// Your app makes a normal API call

-

fetch('https://api.contoso.com/orders')

-

// Dev Proxy intercepts and returns

-

500 Internal Server Error

-

429 Too Many Requests

-

503 Service Unavailable

-

// Does your app handle it?

+

// errors-contoso-api.json

+

"url": "https://api.contoso.com/*"

+

"responses":

+

  500 Internal Server Error

+

  429 Too Many Requests

+

  503 Service Unavailable

+

// Random errors at configured failure rate.

@@ -129,20 +136,19 @@ import Layout from '../layouts/Layout.astro';

AI / LLM Testing

Build & test AI apps without burning tokens.

- Simulate responses from OpenAI, Azure OpenAI, and other language model APIs. Test error handling, content filtering, and rate limits without real API costs. + Route OpenAI and Azure OpenAI API calls to a local language model during development. Get real responses while building your AI-powered apps — without spending tokens.

- + Learn more →
-

// Your app calls an LLM API

-

POST /openai/deployments/chat/completions

-

// Dev Proxy simulates failures

-

429 Rate limit exceeded

-

400 Content filter triggered

-

500 Model unavailable

-

// Save costs. Ship with confidence.

+

// Your app calls OpenAI

+

POST /v1/chat/completions

+

// Dev Proxy routes to local LLM

+

Ollama (llama3.2)

+

200 { "choices": [{ "message": ... }] }

+

// Real responses. Zero API costs.

@@ -158,30 +164,27 @@ import Layout from '../layouts/Layout.astro'; Learn more → -
-
+
+

RateLimit-Limit: 3

+
- Request 1 - 200 OK + GET /api/orders + Remaining: 2
- Request 2 - 200 OK + GET /api/orders + Remaining: 1
- Request 3 - 200 OK + GET /api/orders + Remaining: 0
- Request 4 - 429 Throttled + GET /api/orders + 429 Too Many Requests
-
- Request 5 - 429 Throttled -
-

Retry-After: 30s

+

Retry-After: 30

@@ -194,17 +197,19 @@ import Layout from '../layouts/Layout.astro';

Run Dev Proxy as part of your CI/CD pipeline to catch API integration issues before they reach production. Works with GitHub Actions, Azure DevOps, and more.

- + Learn more →

# .github/workflows/test.yml

steps:

-

- name: Install Dev Proxy

-

run: bash install.sh

-

- name: Run tests with proxy

-

run: devproxy & npm test

+

- name: Setup Dev Proxy

+

uses: dev-proxy-tools/actions/setup@v1

+

- name: Run tests

+

run: npm test

+

- name: Stop Dev Proxy

+

uses: dev-proxy-tools/actions/stop@v1

✓ 42 passed, 0 failed

@@ -251,9 +256,9 @@ import Layout from '../layouts/Layout.astro'; {[ { title: 'Mock an API that doesn\'t exist yet', time: '10 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/simulate-crud-api' }, { title: 'Test my app handles API errors', time: '5 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/test-my-app-with-random-errors' }, - { title: 'Simulate LLM API failures', time: '10 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/simulate-errors-from-language-model-apis' }, + { title: 'Simulate OpenAI with a local LLM', time: '15 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/simulate-openai' }, { title: 'Simulate rate limiting responses', time: '10 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/simulate-rate-limit-api-responses' }, - { title: 'Automate API testing in CI/CD', time: '15 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/use-dev-proxy-in-ci-cd-overview' }, + { title: 'Automate API testing in CI/CD', time: '15 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/use-dev-proxy-with-github-actions' }, { title: 'Discover what APIs my app calls', time: '5 min', href: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/how-to/discover-urls-to-watch' }, ].map((scenario) => (