Initial impl

This commit is contained in:
Torbjörn Molin committed 2026-10-19 09:31:57 +02:00
commit 4b729c5d32
133 files changed
+20475

No files matched your search

@@ -0,0 +1,11 @@
{
"id": "3b0f6f2e-2222-4c1d-8e9a-77a1d0c0ab12",
"name": "Shop dev",
"values": [
{ "key": "baseUrl", "value": "http://localhost:8080/api", "type": "default", "enabled": true },
{ "key": "token", "value": "dev-token-123", "type": "secret", "enabled": true },
{ "key": "adminPass", "value": "hunter2", "type": "secret", "enabled": true },
{ "key": "old", "value": "x", "type": "default", "enabled": false }
],
"_postman_variable_scope": "environment"
}
+164
View File
@@ -0,0 +1,164 @@
{
"info": {
"_postman_id": "8f1c2b6e-1111-4a3b-9c55-0d6f2a7b9e01",
"name": "Shop API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"auth": {
"type": "bearer",
"bearer": [{ "key": "token", "value": "{{token}}", "type": "string" }]
},
"event": [
{ "listen": "prerequest", "script": { "type": "text/javascript", "exec": [""] } }
],
"variable": [
{ "key": "baseUrl", "value": "https://shop.example.com/api" },
{ "key": "pageSize", "value": 20 }
],
"item": [
{
"name": "Health",
"request": {
"auth": { "type": "noauth" },
"method": "GET",
"header": [],
"url": { "raw": "{{baseUrl}}/health", "host": ["{{baseUrl}}"], "path": ["health"] }
}
},
{
"name": "Products",
"item": [
{
"name": "List products",
"request": {
"method": "GET",
"header": [
{ "key": "Accept", "value": "application/json" },
{ "key": "X-Debug", "value": "1", "disabled": true }
],
"url": {
"raw": "{{baseUrl}}/products?limit={{pageSize}}&sort=name",
"host": ["{{baseUrl}}"],
"path": ["products"],
"query": [
{ "key": "limit", "value": "{{pageSize}}" },
{ "key": "sort", "value": "name" }
]
}
},
"event": [
{
"listen": "test",
"script": { "exec": ["pm.test(\"ok\", () => pm.response.to.have.status(200));"], "type": "text/javascript" }
}
]
},
{
"name": "Create product",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"Widget\",\r\n \"price\": 9.5\r\n}",
"options": { "raw": { "language": "json" } }
},
"url": "{{baseUrl}}/products"
}
},
{
"name": "Upload image",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{ "key": "caption", "value": "Front view", "type": "text" },
{ "key": "image", "type": "file", "src": "/home/me/widget.png" },
{ "key": "draft", "value": "true", "type": "text", "disabled": true }
]
},
"url": "{{baseUrl}}/products/1/image"
}
},
{
"name": "Admin",
"auth": {
"type": "basic",
"basic": [
{ "key": "password", "value": "{{adminPass}}", "type": "string" },
{ "key": "username", "value": "admin", "type": "string" }
]
},
"item": [
{
"name": "Delete product",
"request": { "method": "DELETE", "header": [], "url": "{{baseUrl}}/products/1" }
},
{
"name": "Search (GraphQL)",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "graphql",
"graphql": { "query": "query { products { id name } }", "variables": "{\"first\": 5}" }
},
"url": "{{baseUrl}}/graphql"
}
}
]
}
]
},
{
"name": "Auth",
"item": [
{
"name": "Token",
"request": {
"auth": { "type": "noauth" },
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{ "key": "grant_type", "value": "client_credentials" },
{ "key": "client_id", "value": "{{clientId}}" },
{ "key": "scope", "value": "shop", "disabled": true }
]
},
"url": "https://auth.example.com/oauth/token"
},
"event": [
{ "listen": "test", "script": { "exec": ["pm.environment.set('token', pm.response.json().access_token);"] } }
]
},
{
"name": "API key ping",
"request": {
"auth": {
"type": "apikey",
"apikey": [
{ "key": "key", "value": "X-Api-Key" },
{ "key": "value", "value": "{{apiKey}}" },
{ "key": "in", "value": "header" }
]
},
"method": "GET",
"url": "{{baseUrl}}/ping"
}
},
{
"name": "Digest thing",
"request": {
"auth": { "type": "digest", "digest": [] },
"method": "GET",
"url": "{{baseUrl}}/digest"
}
}
]
}
]
}